Function DebugCamField
- Line
- 213
- Location
- cheats.j
- Constant?
- no
- Type
- function
- Arguments
- camerafield whichField, integer cheatLength, real defaultValue
- Returns
- nothing
| 213 | function DebugCamField takes camerafield whichField, integer cheatLength, real defaultValue returns nothing |
| 214 | local string param = SubString(GetEventPlayerChatString(), cheatLength, 50) |
| 215 | local real value = S2R(param) |
| 216 | |
| 217 | // Remove any excess preceding whitespace
|
| 218 | loop
|
| 219 | exitwhen not (SubString(param, 0, 1) == " ") |
| 220 | set param = SubString(param, 1, 50) |
| 221 | endloop
|
| 222 | |
| 223 | if param == "" then |
| 224 | set value = defaultValue |
| 225 | endif
|
| 226 | if (whichField == CAMERA_FIELD_FARZ) and (value <= bj_CAMERA_MIN_FARZ) then |
| 227 | return
|
| 228 | endif
|
| 229 | call SetCameraFieldForPlayer(GetTriggerPlayer(), whichField, value, bj_DEBUG_CAMFIELD_SPEED) |
| 230 | endfunction
|