@amxts/core 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/README.ru.md +5 -5
- package/as/amxts.d.ts +13 -3
- package/as/entities.ts +571 -501
- package/as/events.ts +3323 -557
- package/as/facade.ts +3079 -718
- package/as/fetch.ts +2 -2
- package/as/fs.ts +352 -59
- package/as/hlds.ts +121 -120
- package/as/hooks.ts +10585 -5177
- package/as/lib/check.ts +3 -2
- package/as/natives.ts +856 -1272
- package/as/promise.ts +37 -27
- package/as/vector.ts +94 -14
- package/includes/order.txt +17 -19
- package/node_modules/assemblyscript/std/assembly/index.d.ts +1 -1
- package/package.json +9 -6
- package/runtime/deps/assemblyscript/dist/asc.js +136 -42
- package/runtime/deps/assemblyscript/dist/assemblyscript.js +141 -141
- package/runtime/licenses/README.md +9 -7
- package/runtime/licenses/ReGameDLL-LICENSE +21 -0
- package/runtime/licenses/ReHLDS-LICENSE +21 -0
- package/runtime/licenses/zlib-LICENSE +22 -0
- package/runtime/natives.txt +618 -523
- package/runtime/patches/README.md +87 -1
- package/runtime/patches/assemblyscript-0.28.20-amxts.patch +4838 -416
- package/runtime/patches/wamr-2.4.5-amxts.patch +417 -5
- package/scripts/auto-imports.ts +1 -1
- package/scripts/build-identity.ts +102 -65
- package/scripts/build-wasm.ts +17 -13
- package/scripts/check.ts +4 -1
- package/scripts/client-messages.ts +73 -1
- package/scripts/compile-cache.ts +11 -8
- package/scripts/compile-pool.ts +6 -3
- package/scripts/compile-worker.ts +23 -23
- package/scripts/compile.ts +142 -19
- package/scripts/docs/as/amxts.ts +10 -4
- package/scripts/docs/as/facade.ts +1779 -275
- package/scripts/docs/as/fetch.ts +2 -2
- package/scripts/docs/as/fs.ts +190 -6
- package/scripts/docs/as/vector.ts +81 -0
- package/scripts/docs/entities.ts +12 -0
- package/scripts/docs/events.ts +49 -13
- package/scripts/docs/game.ts +6 -0
- package/scripts/docs/messages.ts +10 -1
- package/scripts/hlds-events.ts +11 -11
- package/scripts/includes.ts +3 -4
- package/scripts/leaf-natives.ts +84 -0
- package/scripts/player-fields.ts +1 -1
- package/scripts/plugin-natives.ts +1 -1
- package/scripts/prebuilt.ts +42 -11
- package/scripts/project.ts +63 -4
- package/scripts/reapi-events.ts +9 -9
- package/scripts/server-env.ts +145 -0
- package/scripts/shared-modules.ts +23 -7
- package/scripts/system.ts +1 -1
- package/scripts/tracked-fs.ts +11 -2
- package/scripts/typed-commands.ts +153 -15
- package/scripts/upgrade-calls.ts +225 -0
- package/scripts/upgrade-names.ts +1 -4
- package/scripts/upgrade.ts +47 -34
- package/src/cli-api.mjs +3 -2
- package/src/system.mjs +21 -11
- package/src/testing/compile.ts +31 -8
- package/src/testing/coroutines.ts +0 -10
- package/src/testing/memory.ts +89 -2
- package/src/testing/natives.ts +67 -30
- package/src/testing/server.ts +1094 -155
- package/src/testing/tables.ts +23 -6
- package/src/typecheck.mjs +110 -0
- package/runtime/licenses/Bun-LICENSE.md +0 -84
package/as/entities.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// reapi documents for it: `entity.gravity = 0.5`, `entity.origin`,
|
|
6
6
|
// `player.hideHud`. Under the hood the module reads and writes each one
|
|
7
7
|
// where the game keeps it, on any server; reapi's include says its type.
|
|
8
|
-
import { ActionOptions, Call, Player, RoundWinner, SoundChannel, SoundOptions, UseType, WeaponName, cellFloat, floatCell,
|
|
8
|
+
import { ActionOptions, Call, Player, RoundWinner, SoundChannel, SoundOptions, UseType, WeaponName, cellFloat, floatCell, __playerOf, __sayOnce } from "./facade";
|
|
9
9
|
import { Vector } from "./vector";
|
|
10
10
|
import { gameNameHlds, setGameNameHlds, timeLimitHlds, setTimeLimitHlds, gameStartTimeHlds, setGameStartTimeHlds, maxPlayersHlds, setMaxPlayersHlds } from "./hlds";
|
|
11
11
|
import {
|
|
@@ -20,8 +20,7 @@ import {
|
|
|
20
20
|
find_ent_by_class, find_ent_in_sphere, get_global_int, entity_set_origin, emit_sound,
|
|
21
21
|
entity_set_model, entity_set_size, is_user_connected, is_user_alive, get_maxplayers, get_user_msgid,
|
|
22
22
|
emessage_begin, ewrite_string, ewrite_short, ewrite_byte, ewrite_long, emessage_end, client_print,
|
|
23
|
-
|
|
24
|
-
NATIVE_get_member_game, NATIVE_set_member_game, NATIVE_ExecuteHam, NATIVE_ExecuteHamB
|
|
23
|
+
NATIVE_ExecuteHam, NATIVE_ExecuteHamB
|
|
25
24
|
} from "./natives";
|
|
26
25
|
import {
|
|
27
26
|
m_bFreezePeriod, m_bBombDropped, m_GameDesc, m_nMaxPlayers, m_UpdateInterval, m_flRestartRoundTime,
|
|
@@ -37,14 +36,15 @@ import {
|
|
|
37
36
|
m_iMaxRoundsWon, m_iStoredSpectValue, m_flForceCameraValue, m_flForceChaseCamValue, m_flFadeToBlackValue, m_pVIP,
|
|
38
37
|
m_flIntermissionEndTime, m_flIntermissionStartTime, m_iEndIntermissionButtonHit, m_tmNextPeriodicThink, m_bGameStarted, m_bSkipSpawn,
|
|
39
38
|
m_bSkipShowMenu, m_bNeededPlayers, m_flEscapeRatio, m_flTimeLimit, m_flGameStartTime, m_bTeamBalanced,
|
|
40
|
-
EV_SZ_classname, EV_SZ_globalname, EV_SZ_model,
|
|
41
|
-
EV_SZ_message, EV_SZ_noise, EV_SZ_noise1, EV_SZ_noise2,
|
|
42
|
-
EV_ENT_owner, FL_KILLME, GL_maxEntities, MSG_ALL,
|
|
43
|
-
print_center, Ham_Spawn, Ham_Activate, Ham_TakeHealth,
|
|
44
|
-
Ham_Use, Ham_Blocked, Ham_CS_Restart, Ham_AddPoints,
|
|
45
|
-
Ham_RemovePlayerItem, Ham_GiveAmmo, Ham_Player_Jump, Ham_Player_Duck,
|
|
46
|
-
Ham_Item_Holster, Ham_Item_Drop, Ham_Item_AttachToPlayer, Ham_Weapon_ExtractAmmo,
|
|
47
|
-
Ham_Weapon_PrimaryAttack, Ham_Weapon_SecondaryAttack, Ham_Weapon_Reload, Ham_Weapon_WeaponIdle,
|
|
39
|
+
EV_SZ_classname, EV_SZ_globalname, EV_SZ_model, EV_SZ_viewmodel, EV_SZ_weaponmodel, EV_SZ_target,
|
|
40
|
+
EV_SZ_targetname, EV_SZ_netname, EV_SZ_message, EV_SZ_noise, EV_SZ_noise1, EV_SZ_noise2,
|
|
41
|
+
EV_SZ_noise3, EV_INT_flags, EV_ENT_owner, FL_KILLME, GL_maxEntities, MSG_ALL,
|
|
42
|
+
MSG_ONE, ARMOR_VESTHELM, print_center, Ham_Spawn, Ham_Activate, Ham_TakeHealth,
|
|
43
|
+
Ham_Killed, Ham_Think, Ham_Use, Ham_Blocked, Ham_CS_Restart, Ham_AddPoints,
|
|
44
|
+
Ham_AddPointsToTeam, Ham_AddPlayerItem, Ham_RemovePlayerItem, Ham_GiveAmmo, Ham_Player_Jump, Ham_Player_Duck,
|
|
45
|
+
Ham_Item_AddToPlayer, Ham_Item_Deploy, Ham_Item_Holster, Ham_Item_Drop, Ham_Item_AttachToPlayer, Ham_Weapon_ExtractAmmo,
|
|
46
|
+
Ham_Weapon_ExtractClipAmmo, Ham_Weapon_ResetEmptySound, Ham_Weapon_PrimaryAttack, Ham_Weapon_SecondaryAttack, Ham_Weapon_Reload, Ham_Weapon_WeaponIdle,
|
|
47
|
+
Ham_Weapon_RetireWeapon, Ham_CS_Weapon_SendWeaponAnim
|
|
48
48
|
} from "./constants";
|
|
49
49
|
|
|
50
50
|
/** A name's number when it has none ("unknown"): the setter then leaves the field alone. */
|
|
@@ -53,9 +53,24 @@ const UNNAMED = i32.MIN_VALUE;
|
|
|
53
53
|
// A use's type, USE_OFF to USE_TOGGLE in their numbers' order.
|
|
54
54
|
const USE_TYPES: UseType[] = ["off", "on", "set", "toggle"];
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
// @ts-ignore: decorator
|
|
57
|
+
@external("env", "ham_bypass") declare function _hamBypass(fn: i32, id: i32): void;
|
|
58
|
+
// ReGameDLL's Observer_SetMode: -1 on a server without it.
|
|
59
|
+
// @ts-ignore: decorator
|
|
60
|
+
@external("env", "player_observe") declare function _playerObserve(id: i32, mode: i32): i32;
|
|
61
|
+
// The engine's DropToFloor: 1 landed, 0 nothing under it, -1 stuck.
|
|
62
|
+
// @ts-ignore: decorator
|
|
63
|
+
@external("env", "entity_drop") declare function _entityDrop(id: i32): i32;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* An action's call: every plugin's listeners run on it, unless
|
|
67
|
+
* `{ hooks: false }` - then the module's own hook of the function lets this
|
|
68
|
+
* one call past (ham_bypass), as Ham Sandwich's ExecuteHam goes past its own.
|
|
69
|
+
*/
|
|
57
70
|
function hamCall(fn: i32, id: number, options: ActionOptions): Call {
|
|
58
|
-
|
|
71
|
+
const hooks = options.hooks ?? true;
|
|
72
|
+
if (!hooks) _hamBypass(fn, <i32>id);
|
|
73
|
+
return new Call(hooks ? NATIVE_ExecuteHamB : NATIVE_ExecuteHam).num(fn).num(id);
|
|
59
74
|
}
|
|
60
75
|
|
|
61
76
|
// ---------------------------------------------------------------- fields
|
|
@@ -69,6 +84,9 @@ function hamCall(fn: i32, id: number, options: ActionOptions): Call {
|
|
|
69
84
|
@external("env", "ent_get") declare function _entGet(id: i32, offset: i32): i32;
|
|
70
85
|
// @ts-ignore: decorator
|
|
71
86
|
@external("env", "ent_set") declare function _entSet(id: i32, offset: i32, cell: i32): void;
|
|
87
|
+
// A leaf: it only writes the three numbers, so a call to it collects nothing.
|
|
88
|
+
// @ts-ignore: decorator
|
|
89
|
+
@external("env", "ent_vector") @leaf declare function _entVector(id: i32, offset: i32, out: usize): void;
|
|
72
90
|
// @ts-ignore: decorator
|
|
73
91
|
@external("env", "ent_entity") declare function _entEntity(id: i32, offset: i32): i32;
|
|
74
92
|
// @ts-ignore: decorator
|
|
@@ -85,10 +103,22 @@ function hamCall(fn: i32, id: number, options: ActionOptions): Call {
|
|
|
85
103
|
@external("env", "member_set_text") declare function _memberSetText(id: i32, slot: i32, text: string): void;
|
|
86
104
|
// @ts-ignore: decorator
|
|
87
105
|
@external("env", "game_rules") declare function _gameRules(): i32;
|
|
88
|
-
//
|
|
89
|
-
//
|
|
106
|
+
// A message a setter sends with its field, to one player in the game, through
|
|
107
|
+
// the engine as the game's own go: every plugin's message hooks hear it.
|
|
108
|
+
// send_one answers 0, and begins nothing, for a player who is not in the game.
|
|
109
|
+
// @ts-ignore: decorator
|
|
110
|
+
@external("env", "send_one") declare function _sendOne(player: i32, type: i32): i32;
|
|
111
|
+
// @ts-ignore: decorator
|
|
112
|
+
@external("env", "send_byte") declare function _sendByte(value: i32): void;
|
|
113
|
+
// @ts-ignore: decorator
|
|
114
|
+
@external("env", "send_long") declare function _sendLong(value: i32): void;
|
|
115
|
+
// @ts-ignore: decorator
|
|
116
|
+
@external("env", "send_string") declare function _sendString(text: string): void;
|
|
117
|
+
// @ts-ignore: decorator
|
|
118
|
+
@external("env", "send_end") declare function _sendEnd(): void;
|
|
119
|
+
// A message of one or two numbers, begun, written as `kinds` says (SEND_*) and sent in one call.
|
|
90
120
|
// @ts-ignore: decorator
|
|
91
|
-
@external("env", "
|
|
121
|
+
@external("env", "send_cells") declare function _sendCells(player: i32, type: i32, first: i32, second: i32, kinds: i32): void;
|
|
92
122
|
|
|
93
123
|
/** The id the module reads the game rules' members by. */
|
|
94
124
|
const RULES: i32 = -1;
|
|
@@ -220,6 +250,7 @@ const MEMBERS: StaticArray<string> = [
|
|
|
220
250
|
"CBasePlayer", "m_pentSndLast", // m_pentSndLast
|
|
221
251
|
"CBasePlayer", "m_flSndRoomtype", // m_flSndRoomtype
|
|
222
252
|
"CBasePlayer", "m_flSndRange", // m_flSndRange
|
|
253
|
+
"CBasePlayer", "m_flFallVelocity", // m_flFallVelocity
|
|
223
254
|
"CBasePlayer", "m_fNewAmmo", // m_fNewAmmo
|
|
224
255
|
"CBasePlayer", "m_afPhysicsFlags", // m_afPhysicsFlags
|
|
225
256
|
"CBasePlayer", "m_fNextSuicideTime", // m_fNextSuicideTime
|
|
@@ -308,6 +339,9 @@ const MEMBERS: StaticArray<string> = [
|
|
|
308
339
|
"CBasePlayer", "m_tmNextAccountHealthUpdate", // m_tmNextAccountHealthUpdate
|
|
309
340
|
"CGameRules", "m_bFreezePeriod", // m_bFreezePeriod
|
|
310
341
|
"CGameRules", "m_bBombDropped", // m_bBombDropped
|
|
342
|
+
"CHalfLifeMultiplay", "m_GameDesc", // m_GameDesc
|
|
343
|
+
"CHalfLifeMultiplay", "m_nMaxPlayers", // m_nMaxPlayers
|
|
344
|
+
"CHalfLifeMultiplay", "m_UpdateInterval", // m_UpdateInterval
|
|
311
345
|
"CHalfLifeMultiplay", "m_fTeamCount", // m_flRestartRoundTime
|
|
312
346
|
"CHalfLifeMultiplay", "m_flCheckWinConditions", // m_flCheckWinConditions
|
|
313
347
|
"CHalfLifeMultiplay", "m_fRoundCount", // m_fRoundStartTime
|
|
@@ -373,6 +407,12 @@ const MEMBERS: StaticArray<string> = [
|
|
|
373
407
|
"CHalfLifeMultiplay", "m_tmNextPeriodicThink", // m_tmNextPeriodicThink
|
|
374
408
|
"CHalfLifeMultiplay", "m_bFirstConnected", // m_bGameStarted
|
|
375
409
|
"CHalfLifeMultiplay", "m_bSkipSpawn", // m_bSkipSpawn
|
|
410
|
+
"CHalfLifeMultiplay", "m_bSkipShowMenu", // m_bSkipShowMenu
|
|
411
|
+
"CHalfLifeMultiplay", "m_bNeededPlayers", // m_bNeededPlayers
|
|
412
|
+
"CHalfLifeMultiplay", "m_flEscapeRatio", // m_flEscapeRatio
|
|
413
|
+
"CHalfLifeMultiplay", "m_flTimeLimit", // m_flTimeLimit
|
|
414
|
+
"CHalfLifeMultiplay", "m_flGameStartTime", // m_flGameStartTime
|
|
415
|
+
"CHalfLifeMultiplay", "m_bTeamBalanced", // m_bTeamBalanced
|
|
376
416
|
"CBasePlayerItem", "m_pPlayer", // m_pPlayer
|
|
377
417
|
"CBasePlayerWeapon", "m_iPlayEmptySound", // m_Weapon_iPlayEmptySound
|
|
378
418
|
"CBasePlayerWeapon", "m_fFireOnEmpty", // m_Weapon_fFireOnEmpty
|
|
@@ -532,16 +572,41 @@ const MEMBERS: StaticArray<string> = [
|
|
|
532
572
|
// var_euser4 672
|
|
533
573
|
|
|
534
574
|
/** The module's slot of each member, plus one: 0 until the member is first used. */
|
|
535
|
-
const memberSlots = new StaticArray<i32>(
|
|
575
|
+
const memberSlots = new StaticArray<i32>(314);
|
|
536
576
|
|
|
537
|
-
/** The module's slot of the member at `at` in MEMBERS. */
|
|
577
|
+
/** The module's slot of the member at `at` in MEMBERS; -1 for one of ReGameDLL's own on another server. */
|
|
538
578
|
function slotOf(at: i32): i32 {
|
|
539
579
|
let slot = unchecked(memberSlots[at]);
|
|
540
580
|
if (slot == 0) {
|
|
541
|
-
slot = _memberSlot(unchecked(MEMBERS[at * 2]), unchecked(MEMBERS[at * 2 + 1])) +
|
|
581
|
+
slot = _memberSlot(unchecked(MEMBERS[at * 2]), unchecked(MEMBERS[at * 2 + 1])) + 2;
|
|
542
582
|
unchecked(memberSlots[at] = slot);
|
|
543
583
|
}
|
|
544
|
-
return slot -
|
|
584
|
+
return slot - 2;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// The text of a class's or a model's string_t: the engine points one
|
|
588
|
+
// string_t at one text for the whole map - a class name, a model's name in
|
|
589
|
+
// its precache list - so a read is a cell, and the text is made once a
|
|
590
|
+
// string_t. Kept by the string_t, a slot of the table each; one another
|
|
591
|
+
// string_t takes is read again. Not netname: the engine points a player's at
|
|
592
|
+
// his name's buffer, which it rewrites.
|
|
593
|
+
const KEPT_TEXTS: i32 = 256;
|
|
594
|
+
const keptKeys = new StaticArray<i32>(KEPT_TEXTS);
|
|
595
|
+
const keptTexts = new StaticArray<string | null>(KEPT_TEXTS);
|
|
596
|
+
|
|
597
|
+
/** The text of the string_t entvar at `offset` (keptTexts); `key` is its EV_SZ_, for the engine module's read of one not kept. */
|
|
598
|
+
function keptText(id: number, offset: i32, key: i32): string {
|
|
599
|
+
const at = _entGet(<i32>id, offset);
|
|
600
|
+
const slot = (at ^ (at >>> 8)) & (KEPT_TEXTS - 1);
|
|
601
|
+
const kept = unchecked(keptTexts[slot]);
|
|
602
|
+
// A kept text is a load and a compare: `kept != null` on a string is a call.
|
|
603
|
+
if (at != 0 && changetype<usize>(kept) != 0 && unchecked(keptKeys[slot]) == at) return changetype<string>(kept);
|
|
604
|
+
// 0 is no text, or no entity: the engine module's read says which.
|
|
605
|
+
const text = entity_get_string(id, key);
|
|
606
|
+
if (at == 0) return text;
|
|
607
|
+
unchecked(keptKeys[slot] = at);
|
|
608
|
+
unchecked(keptTexts[slot] = text);
|
|
609
|
+
return text;
|
|
545
610
|
}
|
|
546
611
|
|
|
547
612
|
/** An entvar's cell: a whole number, or a Float's bits. */
|
|
@@ -570,9 +635,7 @@ function entvarVector(id: number, offset: i32): Vector {
|
|
|
570
635
|
|
|
571
636
|
/** A vector entvar written into a Vector the plugin keeps: get<Field>(target). */
|
|
572
637
|
function entvarVectorInto(id: number, offset: i32, target: Vector): Vector {
|
|
573
|
-
|
|
574
|
-
target.y = cellFloat(_entGet(<i32>id, offset + 4));
|
|
575
|
-
target.z = cellFloat(_entGet(<i32>id, offset + 8));
|
|
638
|
+
_entVector(<i32>id, offset, target.dataStart);
|
|
576
639
|
return target;
|
|
577
640
|
}
|
|
578
641
|
|
|
@@ -621,79 +684,67 @@ function setMemberText(id: number, at: i32, value: string): void {
|
|
|
621
684
|
}
|
|
622
685
|
|
|
623
686
|
/**
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
* every offset after it is off - so a server with reapi, which runs
|
|
628
|
-
* ReGameDLL, reads them through reapi.
|
|
687
|
+
* The game rules are read in memory on every server, where the module finds
|
|
688
|
+
* them (runtime/src/fields.h): the original game's members by the gamedata,
|
|
689
|
+
* ReGameDLL's moved as ReGameDLL lays them out.
|
|
629
690
|
*/
|
|
630
|
-
let
|
|
691
|
+
let rulesSaid = false;
|
|
631
692
|
|
|
632
|
-
function rulesHere():
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
return rulesInMemory == 1;
|
|
693
|
+
function rulesHere(): void {
|
|
694
|
+
if (rulesSaid) return;
|
|
695
|
+
rulesSaid = true;
|
|
696
|
+
if (_gameRules() == 0) __sayOnce("the game rules are not in AMX Mod X's gamedata for this server: game's fields read 0");
|
|
638
697
|
}
|
|
639
698
|
|
|
640
|
-
/** A game rules member's cell: `at` in MEMBERS
|
|
641
|
-
function gameCell(at: i32
|
|
642
|
-
|
|
699
|
+
/** A game rules member's cell: `at` in MEMBERS. */
|
|
700
|
+
function gameCell(at: i32): i32 {
|
|
701
|
+
rulesHere();
|
|
702
|
+
return _memberGet(RULES, slotOf(at), 0);
|
|
643
703
|
}
|
|
644
704
|
|
|
645
|
-
function setGameCell(at: i32,
|
|
646
|
-
|
|
647
|
-
|
|
705
|
+
function setGameCell(at: i32, cell: i32): void {
|
|
706
|
+
rulesHere();
|
|
707
|
+
_memberSet(RULES, slotOf(at), 0, cell);
|
|
648
708
|
}
|
|
649
709
|
|
|
650
|
-
// A game rules member of ReGameDLL's own, which
|
|
651
|
-
//
|
|
652
|
-
// AMX Mod X keeps - is read and written through `hlds` (as/hlds.ts);
|
|
653
|
-
// other reads 0 and says so once.
|
|
654
|
-
function
|
|
655
|
-
if (
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
}
|
|
660
|
-
return <i32>new Call(NATIVE_get_member_game).num(field).run();
|
|
710
|
+
// A game rules member of ReGameDLL's own, which a server without ReGameDLL
|
|
711
|
+
// does not have: there a member plain HLDS has another way to - a cvar, a
|
|
712
|
+
// count AMX Mod X keeps - is read and written through `hlds` (as/hlds.ts);
|
|
713
|
+
// any other reads 0 and says so once.
|
|
714
|
+
function regameCell(at: i32, name: string, hlds: (() => i32) | null = null): i32 {
|
|
715
|
+
if (slotOf(at) >= 0) return gameCell(at);
|
|
716
|
+
if (hlds) return hlds();
|
|
717
|
+
__sayOnce(`game.${name} is ReGameDLL's, which this server does not have: it reads 0 and writes nothing`);
|
|
718
|
+
return 0;
|
|
661
719
|
}
|
|
662
720
|
|
|
663
|
-
function
|
|
664
|
-
if (
|
|
721
|
+
function setRegameCell(at: i32, name: string, cell: i32, hlds: ((cell: i32) => void) | null = null): void {
|
|
722
|
+
if (slotOf(at) >= 0) setGameCell(at, cell);
|
|
665
723
|
else if (hlds) hlds(cell);
|
|
666
|
-
else
|
|
724
|
+
else regameCell(at, name);
|
|
667
725
|
}
|
|
668
726
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
return get_member_game<string>(field);
|
|
727
|
+
// A text member of ReGameDLL's own: the game's own text in memory, which
|
|
728
|
+
// the game allocates, so it is read and written the way every server has.
|
|
729
|
+
function regameText(name: string, hlds: (() => string) | null = null): string {
|
|
730
|
+
if (hlds) return hlds();
|
|
731
|
+
__sayOnce(`game.${name} is not read on this server: it reads "" and writes nothing`);
|
|
732
|
+
return "";
|
|
676
733
|
}
|
|
677
734
|
|
|
678
|
-
function
|
|
679
|
-
if (
|
|
680
|
-
else
|
|
681
|
-
else reapiGameText(field, name);
|
|
735
|
+
function setRegameText(name: string, value: string, hlds: ((value: string) => void) | null = null): void {
|
|
736
|
+
if (hlds) hlds(value);
|
|
737
|
+
else regameText(name);
|
|
682
738
|
}
|
|
683
739
|
|
|
684
740
|
/**
|
|
685
|
-
* Both teams' scores, sent to the scoreboard at once:
|
|
686
|
-
*
|
|
687
|
-
* message
|
|
688
|
-
* message listeners hear it, as they would the game's.
|
|
741
|
+
* Both teams' scores, sent to the scoreboard at once: the members, and the
|
|
742
|
+
* TeamScore message the game's UpdateTeamScores sends - sent so that other
|
|
743
|
+
* plugins' message listeners hear it, as they would the game's.
|
|
689
744
|
*/
|
|
690
745
|
function setTeamScores(ct: number, terrorists: number): void {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
setGameCell(3, m_iNumCTWins, <i32>ct);
|
|
696
|
-
setGameCell(4, m_iNumTerroristWins, <i32>terrorists);
|
|
746
|
+
setGameCell(3, <i32>ct);
|
|
747
|
+
setGameCell(4, <i32>terrorists);
|
|
697
748
|
sendTeamScore("CT", ct);
|
|
698
749
|
sendTeamScore("TERRORIST", terrorists);
|
|
699
750
|
}
|
|
@@ -711,10 +762,22 @@ function sendTeamScore(team: string, score: number): void {
|
|
|
711
762
|
* a player who is not in the game.
|
|
712
763
|
*/
|
|
713
764
|
function messageTo(id: number, message: GameMessage): bool {
|
|
714
|
-
|
|
765
|
+
return _sendOne(<i32>id, messageId(message)) != 0;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/** The message's id, looked up the first time. */
|
|
769
|
+
function messageId(message: GameMessage): i32 {
|
|
715
770
|
if (message.id == 0) message.id = get_user_msgid(message.name);
|
|
716
|
-
|
|
717
|
-
|
|
771
|
+
return message.id;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// How sendCells writes each of its numbers, two bits a number (SEND_* in runtime/src/enginehooks.h).
|
|
775
|
+
const SEND_BYTE: i32 = 1;
|
|
776
|
+
const SEND_LONG: i32 = 2;
|
|
777
|
+
|
|
778
|
+
/** A message of one or two numbers to the player, if he is in the game, in one call into the module. */
|
|
779
|
+
function sendCells(id: number, message: GameMessage, first: i32, second: i32, kinds: i32): void {
|
|
780
|
+
_sendCells(<i32>id, messageId(message), first, second, kinds);
|
|
718
781
|
}
|
|
719
782
|
|
|
720
783
|
/** A message the setters send: its name, and its id, looked up the first time it is sent. */
|
|
@@ -730,32 +793,22 @@ const NIGHT_VISION_TOGGLE = new GameMessage("NVGToggle");
|
|
|
730
793
|
const STATUS_ICON = new GameMessage("StatusIcon");
|
|
731
794
|
const ITEM_STATUS = new GameMessage("ItemStatus");
|
|
732
795
|
|
|
733
|
-
/** The origin a message to one player is sent from: none. */
|
|
734
|
-
const NOWHERE = new StaticArray<i32>(3);
|
|
735
|
-
|
|
736
796
|
/** The player's money, and the Money message that shows it on his HUD, flashing - what cs_set_user_money sends. */
|
|
737
797
|
function setMoney(id: number, cell: i32): void {
|
|
738
798
|
setMemberCell(id, 7, cell);
|
|
739
|
-
|
|
740
|
-
ewrite_long(cell);
|
|
741
|
-
ewrite_byte(1);
|
|
742
|
-
emessage_end();
|
|
799
|
+
sendCells(id, MONEY, cell, 1, SEND_LONG | (SEND_BYTE << 2));
|
|
743
800
|
}
|
|
744
801
|
|
|
745
802
|
/** The player's armour kind, and ArmorType: whether his HUD shows a helmet. */
|
|
746
803
|
function setKevlar(id: number, cell: i32): void {
|
|
747
804
|
setMemberCell(id, 8, cell);
|
|
748
|
-
|
|
749
|
-
ewrite_byte(cell == ARMOR_VESTHELM ? 1 : 0);
|
|
750
|
-
emessage_end();
|
|
805
|
+
sendCells(id, ARMOR_TYPE, cell == ARMOR_VESTHELM ? 1 : 0, 0, SEND_BYTE);
|
|
751
806
|
}
|
|
752
807
|
|
|
753
808
|
/** The flashlight's charge, and FlashBat: the bar on his HUD. */
|
|
754
809
|
function setFlashlightBattery(id: number, cell: i32): void {
|
|
755
810
|
setMemberCell(id, 9, cell);
|
|
756
|
-
|
|
757
|
-
ewrite_byte(cell);
|
|
758
|
-
emessage_end();
|
|
811
|
+
sendCells(id, FLASHLIGHT_BATTERY, cell, 0, SEND_BYTE);
|
|
759
812
|
}
|
|
760
813
|
|
|
761
814
|
/** Whether he owns night vision goggles, told to his buy menu (ItemStatus). */
|
|
@@ -767,9 +820,7 @@ function setNightVision(id: number, cell: i32): void {
|
|
|
767
820
|
/** Night vision switched on or off, and NVGToggle: his screen turns green or back. */
|
|
768
821
|
function setNightVisionOn(id: number, cell: i32): void {
|
|
769
822
|
setMemberCell(id, 11, cell);
|
|
770
|
-
|
|
771
|
-
ewrite_byte(cell);
|
|
772
|
-
emessage_end();
|
|
823
|
+
sendCells(id, NIGHT_VISION_TOGGLE, cell, 0, SEND_BYTE);
|
|
773
824
|
}
|
|
774
825
|
|
|
775
826
|
/**
|
|
@@ -780,37 +831,32 @@ function setDefuser(id: number, cell: i32): void {
|
|
|
780
831
|
setMemberCell(id, 12, cell);
|
|
781
832
|
setEntvarCell(id, 276, cell);
|
|
782
833
|
if (messageTo(id, STATUS_ICON)) {
|
|
783
|
-
|
|
784
|
-
|
|
834
|
+
_sendByte(cell);
|
|
835
|
+
_sendString("defuser");
|
|
785
836
|
if (cell != 0) {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
837
|
+
_sendByte(0);
|
|
838
|
+
_sendByte(160);
|
|
839
|
+
_sendByte(0);
|
|
789
840
|
}
|
|
790
|
-
|
|
841
|
+
_sendEnd();
|
|
791
842
|
}
|
|
792
843
|
sendItemStatus(id);
|
|
793
844
|
}
|
|
794
845
|
|
|
795
846
|
/** ItemStatus: the night vision and the defuse kit the player owns, which his buy menu shows. */
|
|
796
847
|
function sendItemStatus(id: number): void {
|
|
797
|
-
|
|
798
|
-
ewrite_byte((memberCell(id, 10) != 0 ? 1 : 0) | (memberCell(id, 12) != 0 ? 2 : 0));
|
|
799
|
-
emessage_end();
|
|
848
|
+
sendCells(id, ITEM_STATUS, (memberCell(id, 10) != 0 ? 1 : 0) | (memberCell(id, 12) != 0 ? 2 : 0), 0, SEND_BYTE);
|
|
800
849
|
}
|
|
801
850
|
|
|
802
851
|
/**
|
|
803
852
|
* Switches a spectator's mode as the game's Observer_SetMode does: reapi's
|
|
804
|
-
*
|
|
853
|
+
* ReGameDLL's Observer_SetMode, or, without it, the same steps here - the target
|
|
805
854
|
* kept while it is another living player, the next one found otherwise,
|
|
806
855
|
* "roaming" when there is none, the mode asked for kept as the last one,
|
|
807
856
|
* and the mode's name on his screen.
|
|
808
857
|
*/
|
|
809
858
|
function setObserverMode(id: number, mode: i32): void {
|
|
810
|
-
if (
|
|
811
|
-
rg_set_observer_mode(id, mode);
|
|
812
|
-
return;
|
|
813
|
-
}
|
|
859
|
+
if (_playerObserve(<i32>id, mode) >= 0) return;
|
|
814
860
|
if (entvarCell(id, 580) == mode) return;
|
|
815
861
|
|
|
816
862
|
let target = memberCell(id, 5);
|
|
@@ -1755,6 +1801,10 @@ function vipSafetyZoneCell(name: VipSafetyZone): i32 {
|
|
|
1755
1801
|
return UNNAMED;
|
|
1756
1802
|
}
|
|
1757
1803
|
|
|
1804
|
+
// A trace's hit group (trace.line), a point's contents (pointContents) and an
|
|
1805
|
+
// entity's state as a player is sent it (entityState) read as the fields' do.
|
|
1806
|
+
export { contentsName, hitGroupName, renderFxCell, renderFxName, renderModeCell, renderModeName };
|
|
1807
|
+
|
|
1758
1808
|
/** The WeaponKind names and the bit each has in var_weapons: 1 << its id. */
|
|
1759
1809
|
const WEAPON_BITS = new FlagFamily(
|
|
1760
1810
|
["p228", "glock", "scout", "hegrenade", "xm1014", "c4", "mac10", "aug", "smokegrenade", "elite", "fiveseven", "ump45", "sg550", "galil", "famas", "usp", "glock18", "awp", "mp5n", "m249", "m3", "m4a1", "tmp", "g3sg1", "flashbang", "deagle", "sg552", "ak47", "knife", "p90"],
|
|
@@ -1842,6 +1892,15 @@ export class Entity {
|
|
|
1842
1892
|
entity_set_int(this.id, EV_INT_flags, entity_get_int(this.id, EV_INT_flags) | FL_KILLME);
|
|
1843
1893
|
}
|
|
1844
1894
|
|
|
1895
|
+
/**
|
|
1896
|
+
* Drops the entity straight down onto what is under it, as the game puts an item on the floor when a map starts: `true` when it landed, `false` when there is nothing under it within 256 units or it is stuck in something.
|
|
1897
|
+
*
|
|
1898
|
+
* Pawn: `drop_to_floor`, `engfunc(EngFunc_DropToFloor, ...)`
|
|
1899
|
+
*/
|
|
1900
|
+
dropToFloor(): boolean {
|
|
1901
|
+
return _entityDrop(this.id) == 1;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1845
1904
|
// is_valid_ent rather than reapi's is_entity: it answers false for 0 and
|
|
1846
1905
|
// for a number past the last entity instead of logging an error.
|
|
1847
1906
|
/**
|
|
@@ -1882,7 +1941,7 @@ export class Entity {
|
|
|
1882
1941
|
*
|
|
1883
1942
|
* Pawn: `pev->classname`
|
|
1884
1943
|
*/
|
|
1885
|
-
get classname(): string { return
|
|
1944
|
+
get classname(): string { return keptText(this.id, 0, EV_SZ_classname); }
|
|
1886
1945
|
set classname(value: string) { entity_set_string(this.id, EV_SZ_classname, value); }
|
|
1887
1946
|
|
|
1888
1947
|
/**
|
|
@@ -2169,7 +2228,7 @@ export class Entity {
|
|
|
2169
2228
|
*
|
|
2170
2229
|
* Pawn: `pev->model`
|
|
2171
2230
|
*/
|
|
2172
|
-
get model(): string { return
|
|
2231
|
+
get model(): string { return keptText(this.id, 184, EV_SZ_model); }
|
|
2173
2232
|
set model(value: string) { entity_set_model(this.id, value); }
|
|
2174
2233
|
|
|
2175
2234
|
/**
|
|
@@ -2177,16 +2236,16 @@ export class Entity {
|
|
|
2177
2236
|
*
|
|
2178
2237
|
* Pawn: `pev->viewmodel`
|
|
2179
2238
|
*/
|
|
2180
|
-
get viewModel():
|
|
2181
|
-
set viewModel(value:
|
|
2239
|
+
get viewModel(): string { return keptText(this.id, 188, EV_SZ_viewmodel); }
|
|
2240
|
+
set viewModel(value: string) { entity_set_string(this.id, EV_SZ_viewmodel, value); }
|
|
2182
2241
|
|
|
2183
2242
|
/**
|
|
2184
2243
|
* The weapon model other players see in the player's hands, e.g. `"models/p_knife.mdl"`.
|
|
2185
2244
|
*
|
|
2186
2245
|
* Pawn: `pev->weaponmodel`
|
|
2187
2246
|
*/
|
|
2188
|
-
get weaponModel():
|
|
2189
|
-
set weaponModel(value:
|
|
2247
|
+
get weaponModel(): string { return keptText(this.id, 192, EV_SZ_weaponmodel); }
|
|
2248
|
+
set weaponModel(value: string) { entity_set_string(this.id, EV_SZ_weaponmodel, value); }
|
|
2190
2249
|
|
|
2191
2250
|
/**
|
|
2192
2251
|
* The low corner of the entity's bounding box in world coordinates; the engine recomputes it when the entity moves.
|
|
@@ -4103,262 +4162,273 @@ export class PlayerFields extends Entity {
|
|
|
4103
4162
|
get soundRange(): number { return cellFloat(memberCell(this.id, 120)); }
|
|
4104
4163
|
set soundRange(value: number) { setMemberCell(this.id, 120, <i32>floatCell(value)); }
|
|
4105
4164
|
|
|
4165
|
+
/**
|
|
4166
|
+
* The player's falling speed, units per second, positive downwards: the one the game works fall damage out from on landing. Setting it sets the entity's `fallVelocity` too - `player.fallVelocity = 0` lands him without damage.
|
|
4167
|
+
*
|
|
4168
|
+
* Pawn: `CBasePlayer::m_flFallVelocity`
|
|
4169
|
+
*/
|
|
4170
|
+
get fallVelocity(): number { return cellFloat(memberCell(this.id, 121)); }
|
|
4171
|
+
set fallVelocity(value: number) {
|
|
4172
|
+
setMemberCell(this.id, 121, <i32>floatCell(value));
|
|
4173
|
+
setEntvarCell(this.id, 564, <i32>floatCell(value));
|
|
4174
|
+
}
|
|
4175
|
+
|
|
4106
4176
|
/**
|
|
4107
4177
|
* The player's “new ammo to send” flag from Half-Life. CS does not use the field.
|
|
4108
4178
|
*
|
|
4109
4179
|
* Pawn: `CBasePlayer::m_fNewAmmo`
|
|
4110
4180
|
*/
|
|
4111
|
-
get newAmmo(): number { return memberCell(this.id,
|
|
4112
|
-
set newAmmo(value: number) { setMemberCell(this.id,
|
|
4181
|
+
get newAmmo(): number { return memberCell(this.id, 122); }
|
|
4182
|
+
set newAmmo(value: number) { setMemberCell(this.id, 122, <i32>value); }
|
|
4113
4183
|
|
|
4114
4184
|
/**
|
|
4115
4185
|
* The player's physics state, a list of any of: `"onLadder"`, `"onTrain"`, `"onBarnacle"`, `"ducking"` - crouching down right now, `"using"` - holding an object's use key, `"observer"` - a spectator locked in place.
|
|
4116
4186
|
*
|
|
4117
4187
|
* Pawn: `CBasePlayer::m_afPhysicsFlags`, `PFLAG_*`
|
|
4118
4188
|
*/
|
|
4119
|
-
get physicsFlags(): PhysicsFlag[] { return flagList<PhysicsFlag>(new MemberFlags(this.id,
|
|
4120
|
-
set physicsFlags(values: PhysicsFlag[]) { setMemberCell(this.id,
|
|
4189
|
+
get physicsFlags(): PhysicsFlag[] { return flagList<PhysicsFlag>(new MemberFlags(this.id, 123), PHYSICS_FLAG); }
|
|
4190
|
+
set physicsFlags(values: PhysicsFlag[]) { setMemberCell(this.id, 123, PHYSICS_FLAG.maskOf(values)); }
|
|
4121
4191
|
|
|
4122
4192
|
/**
|
|
4123
4193
|
* The game time when the kill command works for the player again, a second after the last one.
|
|
4124
4194
|
*
|
|
4125
4195
|
* Pawn: `CBasePlayer::m_fNextSuicideTime`
|
|
4126
4196
|
*/
|
|
4127
|
-
get nextSuicideTime(): number { return cellFloat(memberCell(this.id,
|
|
4128
|
-
set nextSuicideTime(value: number) { setMemberCell(this.id,
|
|
4197
|
+
get nextSuicideTime(): number { return cellFloat(memberCell(this.id, 124)); }
|
|
4198
|
+
set nextSuicideTime(value: number) { setMemberCell(this.id, 124, <i32>floatCell(value)); }
|
|
4129
4199
|
|
|
4130
4200
|
/**
|
|
4131
4201
|
* The player's idle timer from Half-Life; CS keeps it on the weapon (a Weapon's `nextIdle`) and does not use this one.
|
|
4132
4202
|
*
|
|
4133
4203
|
* Pawn: `CBasePlayer::m_flTimeWeaponIdle`
|
|
4134
4204
|
*/
|
|
4135
|
-
get timeWeaponIdle(): number { return cellFloat(memberCell(this.id,
|
|
4136
|
-
set timeWeaponIdle(value: number) { setMemberCell(this.id,
|
|
4205
|
+
get timeWeaponIdle(): number { return cellFloat(memberCell(this.id, 125)); }
|
|
4206
|
+
set timeWeaponIdle(value: number) { setMemberCell(this.id, 125, <i32>floatCell(value)); }
|
|
4137
4207
|
|
|
4138
4208
|
/**
|
|
4139
4209
|
* The player's wall-jump timer from Half-Life. CS does not use the field.
|
|
4140
4210
|
*
|
|
4141
4211
|
* Pawn: `CBasePlayer::m_flWallJumpTime`
|
|
4142
4212
|
*/
|
|
4143
|
-
get wallJumpTime(): number { return cellFloat(memberCell(this.id,
|
|
4144
|
-
set wallJumpTime(value: number) { setMemberCell(this.id,
|
|
4213
|
+
get wallJumpTime(): number { return cellFloat(memberCell(this.id, 126)); }
|
|
4214
|
+
set wallJumpTime(value: number) { setMemberCell(this.id, 126, <i32>floatCell(value)); }
|
|
4145
4215
|
|
|
4146
4216
|
/**
|
|
4147
4217
|
* The game time of the next HEV suit phrase (Half-Life); `0` for none.
|
|
4148
4218
|
*
|
|
4149
4219
|
* Pawn: `CBasePlayer::m_flSuitUpdate`
|
|
4150
4220
|
*/
|
|
4151
|
-
get suitUpdate(): number { return cellFloat(memberCell(this.id,
|
|
4152
|
-
set suitUpdate(value: number) { setMemberCell(this.id,
|
|
4221
|
+
get suitUpdate(): number { return cellFloat(memberCell(this.id, 127)); }
|
|
4222
|
+
set suitUpdate(value: number) { setMemberCell(this.id, 127, <i32>floatCell(value)); }
|
|
4153
4223
|
|
|
4154
4224
|
/**
|
|
4155
4225
|
* The next place in the HEV suit's phrase queue (Half-Life).
|
|
4156
4226
|
*
|
|
4157
4227
|
* Pawn: `CBasePlayer::m_iSuitPlayNext`
|
|
4158
4228
|
*/
|
|
4159
|
-
get suitPlayNext(): number { return memberCell(this.id,
|
|
4160
|
-
set suitPlayNext(value: number) { setMemberCell(this.id,
|
|
4229
|
+
get suitPlayNext(): number { return memberCell(this.id, 128); }
|
|
4230
|
+
set suitPlayNext(value: number) { setMemberCell(this.id, 128, <i32>value); }
|
|
4161
4231
|
|
|
4162
4232
|
/**
|
|
4163
4233
|
* The damage the player took from the last hit.
|
|
4164
4234
|
*
|
|
4165
4235
|
* Pawn: `CBasePlayer::m_lastDamageAmount`
|
|
4166
4236
|
*/
|
|
4167
|
-
get lastDamageAmount(): number { return memberCell(this.id,
|
|
4168
|
-
set lastDamageAmount(value: number) { setMemberCell(this.id,
|
|
4237
|
+
get lastDamageAmount(): number { return memberCell(this.id, 129); }
|
|
4238
|
+
set lastDamageAmount(value: number) { setMemberCell(this.id, 129, <i32>value); }
|
|
4169
4239
|
|
|
4170
4240
|
/**
|
|
4171
4241
|
* The game time when damage over time (poison, burn, drowning recovery) was last applied to the player.
|
|
4172
4242
|
*
|
|
4173
4243
|
* Pawn: `CBasePlayer::m_tbdPrev`
|
|
4174
4244
|
*/
|
|
4175
|
-
get timeBasedDamagePrev(): number { return cellFloat(memberCell(this.id,
|
|
4176
|
-
set timeBasedDamagePrev(value: number) { setMemberCell(this.id,
|
|
4245
|
+
get timeBasedDamagePrev(): number { return cellFloat(memberCell(this.id, 130)); }
|
|
4246
|
+
set timeBasedDamagePrev(value: number) { setMemberCell(this.id, 130, <i32>floatCell(value)); }
|
|
4177
4247
|
|
|
4178
4248
|
/**
|
|
4179
4249
|
* The distance to the nearest radiation, for Half-Life's Geiger counter.
|
|
4180
4250
|
*
|
|
4181
4251
|
* Pawn: `CBasePlayer::m_flgeigerRange`
|
|
4182
4252
|
*/
|
|
4183
|
-
get geigerRange(): number { return cellFloat(memberCell(this.id,
|
|
4184
|
-
set geigerRange(value: number) { setMemberCell(this.id,
|
|
4253
|
+
get geigerRange(): number { return cellFloat(memberCell(this.id, 131)); }
|
|
4254
|
+
set geigerRange(value: number) { setMemberCell(this.id, 131, <i32>floatCell(value)); }
|
|
4185
4255
|
|
|
4186
4256
|
/**
|
|
4187
4257
|
* The game time of the next Geiger counter update (Half-Life).
|
|
4188
4258
|
*
|
|
4189
4259
|
* Pawn: `CBasePlayer::m_flgeigerDelay`
|
|
4190
4260
|
*/
|
|
4191
|
-
get geigerDelay(): number { return cellFloat(memberCell(this.id,
|
|
4192
|
-
set geigerDelay(value: number) { setMemberCell(this.id,
|
|
4261
|
+
get geigerDelay(): number { return cellFloat(memberCell(this.id, 132)); }
|
|
4262
|
+
set geigerDelay(value: number) { setMemberCell(this.id, 132, <i32>floatCell(value)); }
|
|
4193
4263
|
|
|
4194
4264
|
/**
|
|
4195
4265
|
* The Geiger counter reading last sent to the client (Half-Life).
|
|
4196
4266
|
*
|
|
4197
4267
|
* Pawn: `CBasePlayer::m_igeigerRangePrev`
|
|
4198
4268
|
*/
|
|
4199
|
-
get geigerRangePrev(): number { return memberCell(this.id,
|
|
4200
|
-
set geigerRangePrev(value: number) { setMemberCell(this.id,
|
|
4269
|
+
get geigerRangePrev(): number { return memberCell(this.id, 133); }
|
|
4270
|
+
set geigerRangePrev(value: number) { setMemberCell(this.id, 133, <i32>value); }
|
|
4201
4271
|
|
|
4202
4272
|
/**
|
|
4203
4273
|
* The name of the texture the player last stood on, which his footsteps sound by.
|
|
4204
4274
|
*
|
|
4205
4275
|
* Pawn: `CBasePlayer::m_szTextureName`
|
|
4206
4276
|
*/
|
|
4207
|
-
get textureName(): string { return memberText(this.id,
|
|
4208
|
-
set textureName(value: string) { setMemberText(this.id,
|
|
4277
|
+
get textureName(): string { return memberText(this.id, 134); }
|
|
4278
|
+
set textureName(value: string) { setMemberText(this.id, 134, value); }
|
|
4209
4279
|
|
|
4210
4280
|
/**
|
|
4211
4281
|
* The type of texture under the player, for step sounds. CS does not use the field.
|
|
4212
4282
|
*
|
|
4213
4283
|
* Pawn: `CBasePlayer::m_chTextureType`
|
|
4214
4284
|
*/
|
|
4215
|
-
get textureType(): number { return memberCell(this.id,
|
|
4216
|
-
set textureType(value: number) { setMemberCell(this.id,
|
|
4285
|
+
get textureType(): number { return memberCell(this.id, 135); }
|
|
4286
|
+
set textureType(value: number) { setMemberCell(this.id, 135, <i32>value); }
|
|
4217
4287
|
|
|
4218
4288
|
/**
|
|
4219
4289
|
* The health drowning has taken from the player; it is given back once he surfaces.
|
|
4220
4290
|
*
|
|
4221
4291
|
* Pawn: `CBasePlayer::m_idrowndmg`
|
|
4222
4292
|
*/
|
|
4223
|
-
get drownDamage(): number { return memberCell(this.id,
|
|
4224
|
-
set drownDamage(value: number) { setMemberCell(this.id,
|
|
4293
|
+
get drownDamage(): number { return memberCell(this.id, 136); }
|
|
4294
|
+
set drownDamage(value: number) { setMemberCell(this.id, 136, <i32>value); }
|
|
4225
4295
|
|
|
4226
4296
|
/**
|
|
4227
4297
|
* The part of the drowning damage already given back to the player.
|
|
4228
4298
|
*
|
|
4229
4299
|
* Pawn: `CBasePlayer::m_idrownrestored`
|
|
4230
4300
|
*/
|
|
4231
|
-
get drownRestored(): number { return memberCell(this.id,
|
|
4232
|
-
set drownRestored(value: number) { setMemberCell(this.id,
|
|
4301
|
+
get drownRestored(): number { return memberCell(this.id, 137); }
|
|
4302
|
+
set drownRestored(value: number) { setMemberCell(this.id, 137, <i32>value); }
|
|
4233
4303
|
|
|
4234
4304
|
/**
|
|
4235
4305
|
* The kinds of damage last shown on the player's HUD, as bits; `-1` makes the game send them again.
|
|
4236
4306
|
*
|
|
4237
4307
|
* Pawn: `CBasePlayer::m_bitsHUDDamage`, `DMG_*`
|
|
4238
4308
|
*/
|
|
4239
|
-
get hudDamage(): number { return memberCell(this.id,
|
|
4240
|
-
set hudDamage(value: number) { setMemberCell(this.id,
|
|
4309
|
+
get hudDamage(): number { return memberCell(this.id, 138); }
|
|
4310
|
+
set hudDamage(value: number) { setMemberCell(this.id, 138, <i32>value); }
|
|
4241
4311
|
|
|
4242
4312
|
/**
|
|
4243
4313
|
* `true` when the player's HUD has to be reset on his next update (after a spawn).
|
|
4244
4314
|
*
|
|
4245
4315
|
* Pawn: `CBasePlayer::m_fInitHUD`
|
|
4246
4316
|
*/
|
|
4247
|
-
get initHud(): boolean { return memberCell(this.id,
|
|
4248
|
-
set initHud(value: boolean) { setMemberCell(this.id,
|
|
4317
|
+
get initHud(): boolean { return memberCell(this.id, 139) != 0; }
|
|
4318
|
+
set initHud(value: boolean) { setMemberCell(this.id, 139, value ? 1 : 0); }
|
|
4249
4319
|
|
|
4250
4320
|
/**
|
|
4251
4321
|
* `true` once the player's HUD has been set up since he connected.
|
|
4252
4322
|
*
|
|
4253
4323
|
* Pawn: `CBasePlayer::m_fGameHUDInitialized`
|
|
4254
4324
|
*/
|
|
4255
|
-
get gameHudInitialized(): boolean { return memberCell(this.id,
|
|
4256
|
-
set gameHudInitialized(value: boolean) { setMemberCell(this.id,
|
|
4325
|
+
get gameHudInitialized(): boolean { return memberCell(this.id, 140) != 0; }
|
|
4326
|
+
set gameHudInitialized(value: boolean) { setMemberCell(this.id, 140, value ? 1 : 0); }
|
|
4257
4327
|
|
|
4258
4328
|
/**
|
|
4259
4329
|
* The train control on the player's HUD: `0` off, `1` to `5` the speed notch, plus bits for `"changed"` and `"active"`.
|
|
4260
4330
|
*
|
|
4261
4331
|
* Pawn: `CBasePlayer::m_iTrain`, `TRAIN_*`
|
|
4262
4332
|
*/
|
|
4263
|
-
get trainControls(): number { return memberCell(this.id,
|
|
4264
|
-
set trainControls(value: number) { setMemberCell(this.id,
|
|
4333
|
+
get trainControls(): number { return memberCell(this.id, 141); }
|
|
4334
|
+
set trainControls(value: number) { setMemberCell(this.id, 141, <i32>value); }
|
|
4265
4335
|
|
|
4266
4336
|
/**
|
|
4267
4337
|
* `false` when the player's weapon list has to be sent again.
|
|
4268
4338
|
*
|
|
4269
4339
|
* Pawn: `CBasePlayer::m_fWeapon`
|
|
4270
4340
|
*/
|
|
4271
|
-
get weaponHudValid(): boolean { return memberCell(this.id,
|
|
4272
|
-
set weaponHudValid(value: boolean) { setMemberCell(this.id,
|
|
4341
|
+
get weaponHudValid(): boolean { return memberCell(this.id, 142) != 0; }
|
|
4342
|
+
set weaponHudValid(value: boolean) { setMemberCell(this.id, 142, value ? 1 : 0); }
|
|
4273
4343
|
|
|
4274
4344
|
/**
|
|
4275
4345
|
* The mounted gun (`func_tank`) the player is using.
|
|
4276
4346
|
*
|
|
4277
4347
|
* Pawn: `CBasePlayer::m_pTank`
|
|
4278
4348
|
*/
|
|
4279
|
-
get mountedGun(): number { return memberCell(this.id,
|
|
4280
|
-
set mountedGun(value: number) { setMemberCell(this.id,
|
|
4349
|
+
get mountedGun(): number { return memberCell(this.id, 143); }
|
|
4350
|
+
set mountedGun(value: number) { setMemberCell(this.id, 143, <i32>value); }
|
|
4281
4351
|
|
|
4282
4352
|
/**
|
|
4283
4353
|
* The game time of the player's death.
|
|
4284
4354
|
*
|
|
4285
4355
|
* Pawn: `CBasePlayer::m_fDeadTime`
|
|
4286
4356
|
*/
|
|
4287
|
-
get deadTime(): number { return cellFloat(memberCell(this.id,
|
|
4288
|
-
set deadTime(value: number) { setMemberCell(this.id,
|
|
4357
|
+
get deadTime(): number { return cellFloat(memberCell(this.id, 144)); }
|
|
4358
|
+
set deadTime(value: number) { setMemberCell(this.id, 144, <i32>floatCell(value)); }
|
|
4289
4359
|
|
|
4290
4360
|
/**
|
|
4291
4361
|
* `true` if monsters do not hear the player.
|
|
4292
4362
|
*
|
|
4293
4363
|
* Pawn: `CBasePlayer::m_fNoPlayerSound`
|
|
4294
4364
|
*/
|
|
4295
|
-
get noPlayerSound(): boolean { return memberCell(this.id,
|
|
4296
|
-
set noPlayerSound(value: boolean) { setMemberCell(this.id,
|
|
4365
|
+
get noPlayerSound(): boolean { return memberCell(this.id, 145) != 0; }
|
|
4366
|
+
set noPlayerSound(value: boolean) { setMemberCell(this.id, 145, value ? 1 : 0); }
|
|
4297
4367
|
|
|
4298
4368
|
/**
|
|
4299
4369
|
* `true` if the player has the long jump module from Half-Life.
|
|
4300
4370
|
*
|
|
4301
4371
|
* Pawn: `CBasePlayer::m_fLongJump`
|
|
4302
4372
|
*/
|
|
4303
|
-
get hasLongJump(): boolean { return memberCell(this.id,
|
|
4304
|
-
set hasLongJump(value: boolean) { setMemberCell(this.id,
|
|
4373
|
+
get hasLongJump(): boolean { return memberCell(this.id, 146) != 0; }
|
|
4374
|
+
set hasLongJump(value: boolean) { setMemberCell(this.id, 146, value ? 1 : 0); }
|
|
4305
4375
|
|
|
4306
4376
|
/**
|
|
4307
4377
|
* The game time from which the player counts as sneaking (Half-Life).
|
|
4308
4378
|
*
|
|
4309
4379
|
* Pawn: `CBasePlayer::m_tSneaking`
|
|
4310
4380
|
*/
|
|
4311
|
-
get sneakingUntil(): number { return cellFloat(memberCell(this.id,
|
|
4312
|
-
set sneakingUntil(value: number) { setMemberCell(this.id,
|
|
4381
|
+
get sneakingUntil(): number { return cellFloat(memberCell(this.id, 147)); }
|
|
4382
|
+
set sneakingUntil(value: number) { setMemberCell(this.id, 147, <i32>floatCell(value)); }
|
|
4313
4383
|
|
|
4314
4384
|
/**
|
|
4315
4385
|
* The player's update counter: set to `5` on reset, never read by the game.
|
|
4316
4386
|
*
|
|
4317
4387
|
* Pawn: `CBasePlayer::m_iUpdateTime`
|
|
4318
4388
|
*/
|
|
4319
|
-
get updateTime(): number { return memberCell(this.id,
|
|
4320
|
-
set updateTime(value: number) { setMemberCell(this.id,
|
|
4389
|
+
get updateTime(): number { return memberCell(this.id, 148); }
|
|
4390
|
+
set updateTime(value: number) { setMemberCell(this.id, 148, <i32>value); }
|
|
4321
4391
|
|
|
4322
4392
|
/**
|
|
4323
4393
|
* The health last sent to the player's HUD; when it differs from his health, the game sends the new one.
|
|
4324
4394
|
*
|
|
4325
4395
|
* Pawn: `CBasePlayer::m_iClientHealth`
|
|
4326
4396
|
*/
|
|
4327
|
-
get healthSent(): number { return memberCell(this.id,
|
|
4328
|
-
set healthSent(value: number) { setMemberCell(this.id,
|
|
4397
|
+
get healthSent(): number { return memberCell(this.id, 149); }
|
|
4398
|
+
set healthSent(value: number) { setMemberCell(this.id, 149, <i32>value); }
|
|
4329
4399
|
|
|
4330
4400
|
/**
|
|
4331
4401
|
* The armour last sent to the player's HUD; `-1` makes the game send it again.
|
|
4332
4402
|
*
|
|
4333
4403
|
* Pawn: `CBasePlayer::m_iClientBattery`
|
|
4334
4404
|
*/
|
|
4335
|
-
get batterySent(): number { return memberCell(this.id,
|
|
4336
|
-
set batterySent(value: number) { setMemberCell(this.id,
|
|
4405
|
+
get batterySent(): number { return memberCell(this.id, 150); }
|
|
4406
|
+
set batterySent(value: number) { setMemberCell(this.id, 150, <i32>value); }
|
|
4337
4407
|
|
|
4338
4408
|
/**
|
|
4339
4409
|
* The parts of the player's HUD that are hidden: `["money", "timer"]`; the game sends the change itself.
|
|
4340
4410
|
*
|
|
4341
4411
|
* Pawn: `CBasePlayer::m_iHideHUD`
|
|
4342
4412
|
*/
|
|
4343
|
-
get hideHud(): HideHud[] { return flagList<HideHud>(new MemberFlags(this.id,
|
|
4344
|
-
set hideHud(values: HideHud[]) { setMemberCell(this.id,
|
|
4413
|
+
get hideHud(): HideHud[] { return flagList<HideHud>(new MemberFlags(this.id, 151), HIDE_HUD); }
|
|
4414
|
+
set hideHud(values: HideHud[]) { setMemberCell(this.id, 151, HIDE_HUD.maskOf(values)); }
|
|
4345
4415
|
|
|
4346
4416
|
/**
|
|
4347
4417
|
* The hidden HUD parts last sent to the player; when they differ from `hideHud`, the game sends `hideHud`.
|
|
4348
4418
|
*
|
|
4349
4419
|
* Pawn: `CBasePlayer::m_iClientHideHUD`
|
|
4350
4420
|
*/
|
|
4351
|
-
get hideHudSent(): HideHud[] { return flagList<HideHud>(new MemberFlags(this.id,
|
|
4352
|
-
set hideHudSent(values: HideHud[]) { setMemberCell(this.id,
|
|
4421
|
+
get hideHudSent(): HideHud[] { return flagList<HideHud>(new MemberFlags(this.id, 152), HIDE_HUD); }
|
|
4422
|
+
set hideHudSent(values: HideHud[]) { setMemberCell(this.id, 152, HIDE_HUD.maskOf(values)); }
|
|
4353
4423
|
|
|
4354
4424
|
/**
|
|
4355
4425
|
* The player's field of view in degrees: `90` is normal, `40` and `10` through a sniper scope. Setting it widens or narrows his view - `110` shows more - until the game sets it again: at spawn, when he draws a weapon, when he zooms.
|
|
4356
4426
|
*
|
|
4357
4427
|
* Pawn: `CBasePlayer::m_iFOV`
|
|
4358
4428
|
*/
|
|
4359
|
-
get fov(): number { return memberCell(this.id,
|
|
4429
|
+
get fov(): number { return memberCell(this.id, 153); }
|
|
4360
4430
|
set fov(value: number) {
|
|
4361
|
-
setMemberCell(this.id,
|
|
4431
|
+
setMemberCell(this.id, 153, <i32>value);
|
|
4362
4432
|
setEntvarCell(this.id, 532, <i32>floatCell(value));
|
|
4363
4433
|
}
|
|
4364
4434
|
|
|
@@ -4367,24 +4437,24 @@ export class PlayerFields extends Entity {
|
|
|
4367
4437
|
*
|
|
4368
4438
|
* Pawn: `CBasePlayer::m_iClientFOV`
|
|
4369
4439
|
*/
|
|
4370
|
-
get fovSent(): number { return memberCell(this.id,
|
|
4371
|
-
set fovSent(value: number) { setMemberCell(this.id,
|
|
4440
|
+
get fovSent(): number { return memberCell(this.id, 154); }
|
|
4441
|
+
set fovSent(value: number) { setMemberCell(this.id, 154, <i32>value); }
|
|
4372
4442
|
|
|
4373
4443
|
/**
|
|
4374
4444
|
* The number of times the player has spawned this round; with `mp_forcerespawn` off, a second spawn is refused.
|
|
4375
4445
|
*
|
|
4376
4446
|
* Pawn: `CBasePlayer::m_iNumSpawns`
|
|
4377
4447
|
*/
|
|
4378
|
-
get spawnCount(): number { return memberCell(this.id,
|
|
4379
|
-
set spawnCount(value: number) { setMemberCell(this.id,
|
|
4448
|
+
get spawnCount(): number { return memberCell(this.id, 155); }
|
|
4449
|
+
set spawnCount(value: number) { setMemberCell(this.id, 155, <i32>value); }
|
|
4380
4450
|
|
|
4381
4451
|
/**
|
|
4382
4452
|
* An observer entity tied to the player; the game never creates one and only removes it when he disconnects.
|
|
4383
4453
|
*
|
|
4384
4454
|
* Pawn: `CBasePlayer::m_pObserver`
|
|
4385
4455
|
*/
|
|
4386
|
-
get observer(): number { return memberCell(this.id,
|
|
4387
|
-
set observer(value: number) { setMemberCell(this.id,
|
|
4456
|
+
get observer(): number { return memberCell(this.id, 156); }
|
|
4457
|
+
set observer(value: number) { setMemberCell(this.id, 156, <i32>value); }
|
|
4388
4458
|
|
|
4389
4459
|
/**
|
|
4390
4460
|
* The weapon in the player's hands, or `null`. Read only.
|
|
@@ -4392,7 +4462,7 @@ export class PlayerFields extends Entity {
|
|
|
4392
4462
|
* Pawn: `CBasePlayer::m_pActiveItem`
|
|
4393
4463
|
*/
|
|
4394
4464
|
get activeItem(): Weapon | null {
|
|
4395
|
-
const index = memberCell(this.id,
|
|
4465
|
+
const index = memberCell(this.id, 157);
|
|
4396
4466
|
return index > 0 ? new Weapon(index) : null;
|
|
4397
4467
|
}
|
|
4398
4468
|
|
|
@@ -4402,7 +4472,7 @@ export class PlayerFields extends Entity {
|
|
|
4402
4472
|
* Pawn: `CBasePlayer::m_pClientActiveItem`
|
|
4403
4473
|
*/
|
|
4404
4474
|
get activeItemSent(): Weapon | null {
|
|
4405
|
-
const index = memberCell(this.id,
|
|
4475
|
+
const index = memberCell(this.id, 158);
|
|
4406
4476
|
return index > 0 ? new Weapon(index) : null;
|
|
4407
4477
|
}
|
|
4408
4478
|
|
|
@@ -4412,7 +4482,7 @@ export class PlayerFields extends Entity {
|
|
|
4412
4482
|
* Pawn: `CBasePlayer::m_pLastItem`
|
|
4413
4483
|
*/
|
|
4414
4484
|
get lastItem(): Weapon | null {
|
|
4415
|
-
const index = memberCell(this.id,
|
|
4485
|
+
const index = memberCell(this.id, 159);
|
|
4416
4486
|
return index > 0 ? new Weapon(index) : null;
|
|
4417
4487
|
}
|
|
4418
4488
|
|
|
@@ -4421,7 +4491,7 @@ export class PlayerFields extends Entity {
|
|
|
4421
4491
|
*
|
|
4422
4492
|
* Pawn: `CBasePlayer::m_vecAutoAim`
|
|
4423
4493
|
*/
|
|
4424
|
-
get autoAim(): Vector { return memberVector(this.id,
|
|
4494
|
+
get autoAim(): Vector { return memberVector(this.id, 160); }
|
|
4425
4495
|
/**
|
|
4426
4496
|
* `autoAim`, written into `target`, which is returned: no new `Vector` is made - for code that runs every frame.
|
|
4427
4497
|
*
|
|
@@ -4430,119 +4500,119 @@ export class PlayerFields extends Entity {
|
|
|
4430
4500
|
* player.getAutoAim(autoAim);
|
|
4431
4501
|
* ```
|
|
4432
4502
|
*/
|
|
4433
|
-
getAutoAim(target: Vector): Vector { return memberVectorInto(this.id,
|
|
4434
|
-
set autoAim(value: number[]) { setMemberVector(this.id,
|
|
4503
|
+
getAutoAim(target: Vector): Vector { return memberVectorInto(this.id, 160, target); }
|
|
4504
|
+
set autoAim(value: number[]) { setMemberVector(this.id, 160, value); }
|
|
4435
4505
|
|
|
4436
4506
|
/**
|
|
4437
4507
|
* `true` while the player's aim assist has a target under the crosshair.
|
|
4438
4508
|
*
|
|
4439
4509
|
* Pawn: `CBasePlayer::m_fOnTarget`
|
|
4440
4510
|
*/
|
|
4441
|
-
get aimingAtTarget(): boolean { return memberCell(this.id,
|
|
4442
|
-
set aimingAtTarget(value: boolean) { setMemberCell(this.id,
|
|
4511
|
+
get aimingAtTarget(): boolean { return memberCell(this.id, 161) != 0; }
|
|
4512
|
+
set aimingAtTarget(value: boolean) { setMemberCell(this.id, 161, value ? 1 : 0); }
|
|
4443
4513
|
|
|
4444
4514
|
/**
|
|
4445
4515
|
* The game time of the next update of the player's status bar (the name under the crosshair), every 0.2 seconds.
|
|
4446
4516
|
*
|
|
4447
4517
|
* Pawn: `CBasePlayer::m_flNextSBarUpdateTime`
|
|
4448
4518
|
*/
|
|
4449
|
-
get nextStatusBarUpdate(): number { return cellFloat(memberCell(this.id,
|
|
4450
|
-
set nextStatusBarUpdate(value: number) { setMemberCell(this.id,
|
|
4519
|
+
get nextStatusBarUpdate(): number { return cellFloat(memberCell(this.id, 162)); }
|
|
4520
|
+
set nextStatusBarUpdate(value: number) { setMemberCell(this.id, 162, <i32>floatCell(value)); }
|
|
4451
4521
|
|
|
4452
4522
|
/**
|
|
4453
4523
|
* The game time the status bar about the player under the crosshair stays until: 2 seconds after he leaves the crosshair.
|
|
4454
4524
|
*
|
|
4455
4525
|
* Pawn: `CBasePlayer::m_flStatusBarDisappearDelay`
|
|
4456
4526
|
*/
|
|
4457
|
-
get statusBarDisappearDelay(): number { return cellFloat(memberCell(this.id,
|
|
4458
|
-
set statusBarDisappearDelay(value: number) { setMemberCell(this.id,
|
|
4527
|
+
get statusBarDisappearDelay(): number { return cellFloat(memberCell(this.id, 163)); }
|
|
4528
|
+
set statusBarDisappearDelay(value: number) { setMemberCell(this.id, 163, <i32>floatCell(value)); }
|
|
4459
4529
|
|
|
4460
4530
|
/**
|
|
4461
4531
|
* The status bar text the game last sent the player - the line that names whom he aims at, as a format his client fills in.
|
|
4462
4532
|
*
|
|
4463
4533
|
* Pawn: `CBasePlayer::m_SbarString0`
|
|
4464
4534
|
*/
|
|
4465
|
-
get statusBarText(): string { return memberText(this.id,
|
|
4466
|
-
set statusBarText(value: string) { setMemberText(this.id,
|
|
4535
|
+
get statusBarText(): string { return memberText(this.id, 164); }
|
|
4536
|
+
set statusBarText(value: string) { setMemberText(this.id, 164, value); }
|
|
4467
4537
|
|
|
4468
4538
|
/**
|
|
4469
4539
|
* The horizontal aim assist correction last sent to the player's client.
|
|
4470
4540
|
*
|
|
4471
4541
|
* Pawn: `CBasePlayer::m_lastx`
|
|
4472
4542
|
*/
|
|
4473
|
-
get lastX(): number { return memberCell(this.id,
|
|
4474
|
-
set lastX(value: number) { setMemberCell(this.id,
|
|
4543
|
+
get lastX(): number { return memberCell(this.id, 165); }
|
|
4544
|
+
set lastX(value: number) { setMemberCell(this.id, 165, <i32>value); }
|
|
4475
4545
|
|
|
4476
4546
|
/**
|
|
4477
4547
|
* The vertical aim assist correction last sent to the player's client.
|
|
4478
4548
|
*
|
|
4479
4549
|
* Pawn: `CBasePlayer::m_lasty`
|
|
4480
4550
|
*/
|
|
4481
|
-
get lastY(): number { return memberCell(this.id,
|
|
4482
|
-
set lastY(value: number) { setMemberCell(this.id,
|
|
4551
|
+
get lastY(): number { return memberCell(this.id, 166); }
|
|
4552
|
+
set lastY(value: number) { setMemberCell(this.id, 166, <i32>value); }
|
|
4483
4553
|
|
|
4484
4554
|
/**
|
|
4485
4555
|
* The number of frames in the player's own spray logo; `-1` for none.
|
|
4486
4556
|
*
|
|
4487
4557
|
* Pawn: `CBasePlayer::m_nCustomSprayFrames`
|
|
4488
4558
|
*/
|
|
4489
|
-
get customSprayFrames(): number { return memberCell(this.id,
|
|
4490
|
-
set customSprayFrames(value: number) { setMemberCell(this.id,
|
|
4559
|
+
get customSprayFrames(): number { return memberCell(this.id, 167); }
|
|
4560
|
+
set customSprayFrames(value: number) { setMemberCell(this.id, 167, <i32>value); }
|
|
4491
4561
|
|
|
4492
4562
|
/**
|
|
4493
4563
|
* The game time when the player can spray again (decalfrequency).
|
|
4494
4564
|
*
|
|
4495
4565
|
* Pawn: `CBasePlayer::m_flNextDecalTime`
|
|
4496
4566
|
*/
|
|
4497
|
-
get nextDecalTime(): number { return cellFloat(memberCell(this.id,
|
|
4498
|
-
set nextDecalTime(value: number) { setMemberCell(this.id,
|
|
4567
|
+
get nextDecalTime(): number { return cellFloat(memberCell(this.id, 168)); }
|
|
4568
|
+
set nextDecalTime(value: number) { setMemberCell(this.id, 168, <i32>floatCell(value)); }
|
|
4499
4569
|
|
|
4500
4570
|
/**
|
|
4501
4571
|
* The index of the player's own model; the game sets `modelIndex` back to it, at spawn for one.
|
|
4502
4572
|
*
|
|
4503
4573
|
* Pawn: `CBasePlayer::m_modelIndexPlayer`
|
|
4504
4574
|
*/
|
|
4505
|
-
get modelIndexPlayer(): number { return memberCell(this.id,
|
|
4506
|
-
set modelIndexPlayer(value: number) { setMemberCell(this.id,
|
|
4575
|
+
get modelIndexPlayer(): number { return memberCell(this.id, 169); }
|
|
4576
|
+
set modelIndexPlayer(value: number) { setMemberCell(this.id, 169, <i32>value); }
|
|
4507
4577
|
|
|
4508
4578
|
/**
|
|
4509
4579
|
* The animation set the player's model holds his weapon with, e.g. `"knife"`, `"rifle"`, `"c4"`.
|
|
4510
4580
|
*
|
|
4511
4581
|
* Pawn: `CBasePlayer::m_szAnimExtention`
|
|
4512
4582
|
*/
|
|
4513
|
-
get animExtension(): string { return memberText(this.id,
|
|
4514
|
-
set animExtension(value: string) { setMemberText(this.id,
|
|
4583
|
+
get animExtension(): string { return memberText(this.id, 170); }
|
|
4584
|
+
set animExtension(value: string) { setMemberText(this.id, 170, value); }
|
|
4515
4585
|
|
|
4516
4586
|
/**
|
|
4517
4587
|
* The legs' animation the game picked for the player this frame.
|
|
4518
4588
|
*
|
|
4519
4589
|
* Pawn: `CBasePlayer::m_iGaitsequence`
|
|
4520
4590
|
*/
|
|
4521
|
-
get playerGaitSequence(): number { return memberCell(this.id,
|
|
4522
|
-
set playerGaitSequence(value: number) { setMemberCell(this.id,
|
|
4591
|
+
get playerGaitSequence(): number { return memberCell(this.id, 171); }
|
|
4592
|
+
set playerGaitSequence(value: number) { setMemberCell(this.id, 171, <i32>value); }
|
|
4523
4593
|
|
|
4524
4594
|
/**
|
|
4525
4595
|
* The playback position of the player's legs' animation, in frames.
|
|
4526
4596
|
*
|
|
4527
4597
|
* Pawn: `CBasePlayer::m_flGaitframe`
|
|
4528
4598
|
*/
|
|
4529
|
-
get gaitFrame(): number { return cellFloat(memberCell(this.id,
|
|
4530
|
-
set gaitFrame(value: number) { setMemberCell(this.id,
|
|
4599
|
+
get gaitFrame(): number { return cellFloat(memberCell(this.id, 172)); }
|
|
4600
|
+
set gaitFrame(value: number) { setMemberCell(this.id, 172, <i32>floatCell(value)); }
|
|
4531
4601
|
|
|
4532
4602
|
/**
|
|
4533
4603
|
* The direction the player's legs face, in degrees; it catches up with the body's.
|
|
4534
4604
|
*
|
|
4535
4605
|
* Pawn: `CBasePlayer::m_flGaityaw`
|
|
4536
4606
|
*/
|
|
4537
|
-
get gaitYaw(): number { return cellFloat(memberCell(this.id,
|
|
4538
|
-
set gaitYaw(value: number) { setMemberCell(this.id,
|
|
4607
|
+
get gaitYaw(): number { return cellFloat(memberCell(this.id, 173)); }
|
|
4608
|
+
set gaitYaw(value: number) { setMemberCell(this.id, 173, <i32>floatCell(value)); }
|
|
4539
4609
|
|
|
4540
4610
|
/**
|
|
4541
4611
|
* The player's position on the previous animation update, to estimate his speed.
|
|
4542
4612
|
*
|
|
4543
4613
|
* Pawn: `CBasePlayer::m_prevgaitorigin`
|
|
4544
4614
|
*/
|
|
4545
|
-
get prevGaitOrigin(): Vector { return memberVector(this.id,
|
|
4615
|
+
get prevGaitOrigin(): Vector { return memberVector(this.id, 174); }
|
|
4546
4616
|
/**
|
|
4547
4617
|
* `prevGaitOrigin`, written into `target`, which is returned: no new `Vector` is made - for code that runs every frame.
|
|
4548
4618
|
*
|
|
@@ -4551,250 +4621,250 @@ export class PlayerFields extends Entity {
|
|
|
4551
4621
|
* player.getPrevGaitOrigin(prevGaitOrigin);
|
|
4552
4622
|
* ```
|
|
4553
4623
|
*/
|
|
4554
|
-
getPrevGaitOrigin(target: Vector): Vector { return memberVectorInto(this.id,
|
|
4555
|
-
set prevGaitOrigin(value: number[]) { setMemberVector(this.id,
|
|
4624
|
+
getPrevGaitOrigin(target: Vector): Vector { return memberVectorInto(this.id, 174, target); }
|
|
4625
|
+
set prevGaitOrigin(value: number[]) { setMemberVector(this.id, 174, value); }
|
|
4556
4626
|
|
|
4557
4627
|
/**
|
|
4558
4628
|
* The upper body's tilt the game worked out for the player's model.
|
|
4559
4629
|
*
|
|
4560
4630
|
* Pawn: `CBasePlayer::m_flPitch`
|
|
4561
4631
|
*/
|
|
4562
|
-
get pitch(): number { return cellFloat(memberCell(this.id,
|
|
4563
|
-
set pitch(value: number) { setMemberCell(this.id,
|
|
4632
|
+
get pitch(): number { return cellFloat(memberCell(this.id, 175)); }
|
|
4633
|
+
set pitch(value: number) { setMemberCell(this.id, 175, <i32>floatCell(value)); }
|
|
4564
4634
|
|
|
4565
4635
|
/**
|
|
4566
4636
|
* The turn of the player's upper body against the legs, in degrees.
|
|
4567
4637
|
*
|
|
4568
4638
|
* Pawn: `CBasePlayer::m_flYaw`
|
|
4569
4639
|
*/
|
|
4570
|
-
get yaw(): number { return cellFloat(memberCell(this.id,
|
|
4571
|
-
set yaw(value: number) { setMemberCell(this.id,
|
|
4640
|
+
get yaw(): number { return cellFloat(memberCell(this.id, 176)); }
|
|
4641
|
+
set yaw(value: number) { setMemberCell(this.id, 176, <i32>floatCell(value)); }
|
|
4572
4642
|
|
|
4573
4643
|
/**
|
|
4574
4644
|
* The distance the player moved since the previous animation update, for the legs' animation.
|
|
4575
4645
|
*
|
|
4576
4646
|
* Pawn: `CBasePlayer::m_flGaitMovement`
|
|
4577
4647
|
*/
|
|
4578
|
-
get gaitMovement(): number { return cellFloat(memberCell(this.id,
|
|
4579
|
-
set gaitMovement(value: number) { setMemberCell(this.id,
|
|
4648
|
+
get gaitMovement(): number { return cellFloat(memberCell(this.id, 177)); }
|
|
4649
|
+
set gaitMovement(value: number) { setMemberCell(this.id, 177, <i32>floatCell(value)); }
|
|
4580
4650
|
|
|
4581
4651
|
/**
|
|
4582
4652
|
* The player's `_cl_autowepswitch` setting: `0` never switch to a picked-up weapon, `1` always, `2` only when not firing.
|
|
4583
4653
|
*
|
|
4584
4654
|
* Pawn: `CBasePlayer::m_iAutoWepSwitch`
|
|
4585
4655
|
*/
|
|
4586
|
-
get autoSwitchWeapon(): number { return memberCell(this.id,
|
|
4587
|
-
set autoSwitchWeapon(value: number) { setMemberCell(this.id,
|
|
4656
|
+
get autoSwitchWeapon(): number { return memberCell(this.id, 178); }
|
|
4657
|
+
set autoSwitchWeapon(value: number) { setMemberCell(this.id, 178, <i32>value); }
|
|
4588
4658
|
|
|
4589
4659
|
/**
|
|
4590
4660
|
* `true` if the player uses the graphical (VGUI) menus — his `_vgui_menus` setting.
|
|
4591
4661
|
*
|
|
4592
4662
|
* Pawn: `CBasePlayer::m_bVGUIMenus`
|
|
4593
4663
|
*/
|
|
4594
|
-
get vguiMenus(): boolean { return memberCell(this.id,
|
|
4595
|
-
set vguiMenus(value: boolean) { setMemberCell(this.id,
|
|
4664
|
+
get vguiMenus(): boolean { return memberCell(this.id, 179) != 0; }
|
|
4665
|
+
set vguiMenus(value: boolean) { setMemberCell(this.id, 179, value ? 1 : 0); }
|
|
4596
4666
|
|
|
4597
4667
|
/**
|
|
4598
4668
|
* `true` if the player wants hints — his _ah setting.
|
|
4599
4669
|
*
|
|
4600
4670
|
* Pawn: `CBasePlayer::m_bShowHints`
|
|
4601
4671
|
*/
|
|
4602
|
-
get showHints(): boolean { return memberCell(this.id,
|
|
4603
|
-
set showHints(value: boolean) { setMemberCell(this.id,
|
|
4672
|
+
get showHints(): boolean { return memberCell(this.id, 180) != 0; }
|
|
4673
|
+
set showHints(value: boolean) { setMemberCell(this.id, 180, value ? 1 : 0); }
|
|
4604
4674
|
|
|
4605
4675
|
/**
|
|
4606
4676
|
* `true` while the player holds his shield up.
|
|
4607
4677
|
*
|
|
4608
4678
|
* Pawn: `CBasePlayer::m_bShieldDrawn`
|
|
4609
4679
|
*/
|
|
4610
|
-
get shieldDrawn(): boolean { return memberCell(this.id,
|
|
4611
|
-
set shieldDrawn(value: boolean) { setMemberCell(this.id,
|
|
4680
|
+
get shieldDrawn(): boolean { return memberCell(this.id, 181) != 0; }
|
|
4681
|
+
set shieldDrawn(value: boolean) { setMemberCell(this.id, 181, value ? 1 : 0); }
|
|
4612
4682
|
|
|
4613
4683
|
/**
|
|
4614
4684
|
* `true` if the player has a tactical shield.
|
|
4615
4685
|
*
|
|
4616
4686
|
* Pawn: `CBasePlayer::m_bOwnsShield`
|
|
4617
4687
|
*/
|
|
4618
|
-
get ownsShield(): boolean { return memberCell(this.id,
|
|
4619
|
-
set ownsShield(value: boolean) { setMemberCell(this.id,
|
|
4688
|
+
get ownsShield(): boolean { return memberCell(this.id, 182) != 0; }
|
|
4689
|
+
set ownsShield(value: boolean) { setMemberCell(this.id, 182, value ? 1 : 0); }
|
|
4620
4690
|
|
|
4621
4691
|
/**
|
|
4622
4692
|
* `true` if the spectator was following a player before he switched to free look.
|
|
4623
4693
|
*
|
|
4624
4694
|
* Pawn: `CBasePlayer::m_bWasFollowing`
|
|
4625
4695
|
*/
|
|
4626
|
-
get wasFollowing(): boolean { return memberCell(this.id,
|
|
4627
|
-
set wasFollowing(value: boolean) { setMemberCell(this.id,
|
|
4696
|
+
get wasFollowing(): boolean { return memberCell(this.id, 183) != 0; }
|
|
4697
|
+
set wasFollowing(value: boolean) { setMemberCell(this.id, 183, value ? 1 : 0); }
|
|
4628
4698
|
|
|
4629
4699
|
/**
|
|
4630
4700
|
* The game time when the spectator can switch to the next player again.
|
|
4631
4701
|
*
|
|
4632
4702
|
* Pawn: `CBasePlayer::m_flNextFollowTime`
|
|
4633
4703
|
*/
|
|
4634
|
-
get nextFollowTime(): number { return cellFloat(memberCell(this.id,
|
|
4635
|
-
set nextFollowTime(value: number) { setMemberCell(this.id,
|
|
4704
|
+
get nextFollowTime(): number { return cellFloat(memberCell(this.id, 184)); }
|
|
4705
|
+
set nextFollowTime(value: number) { setMemberCell(this.id, 184, <i32>floatCell(value)); }
|
|
4636
4706
|
|
|
4637
4707
|
/**
|
|
4638
4708
|
* The speed at which the player's legs turn after the body, for his animation.
|
|
4639
4709
|
*
|
|
4640
4710
|
* Pawn: `CBasePlayer::m_flYawModifier`
|
|
4641
4711
|
*/
|
|
4642
|
-
get yawModifier(): number { return cellFloat(memberCell(this.id,
|
|
4643
|
-
set yawModifier(value: number) { setMemberCell(this.id,
|
|
4712
|
+
get yawModifier(): number { return cellFloat(memberCell(this.id, 185)); }
|
|
4713
|
+
set yawModifier(value: number) { setMemberCell(this.id, 185, <i32>floatCell(value)); }
|
|
4644
4714
|
|
|
4645
4715
|
/**
|
|
4646
4716
|
* The game time when the player's flashbang blindness ends. Writing it does not blind the screen — that is `player.screen.fade`.
|
|
4647
4717
|
*
|
|
4648
4718
|
* Pawn: `CBasePlayer::m_blindUntilTime`
|
|
4649
4719
|
*/
|
|
4650
|
-
get blindUntilTime(): number { return cellFloat(memberCell(this.id,
|
|
4651
|
-
set blindUntilTime(value: number) { setMemberCell(this.id,
|
|
4720
|
+
get blindUntilTime(): number { return cellFloat(memberCell(this.id, 186)); }
|
|
4721
|
+
set blindUntilTime(value: number) { setMemberCell(this.id, 186, <i32>floatCell(value)); }
|
|
4652
4722
|
|
|
4653
4723
|
/**
|
|
4654
4724
|
* The game time when the player was blinded.
|
|
4655
4725
|
*
|
|
4656
4726
|
* Pawn: `CBasePlayer::m_blindStartTime`
|
|
4657
4727
|
*/
|
|
4658
|
-
get blindStartTime(): number { return cellFloat(memberCell(this.id,
|
|
4659
|
-
set blindStartTime(value: number) { setMemberCell(this.id,
|
|
4728
|
+
get blindStartTime(): number { return cellFloat(memberCell(this.id, 187)); }
|
|
4729
|
+
set blindStartTime(value: number) { setMemberCell(this.id, 187, <i32>floatCell(value)); }
|
|
4660
4730
|
|
|
4661
4731
|
/**
|
|
4662
4732
|
* The time the player's blindness stays full, in seconds.
|
|
4663
4733
|
*
|
|
4664
4734
|
* Pawn: `CBasePlayer::m_blindHoldTime`
|
|
4665
4735
|
*/
|
|
4666
|
-
get blindHoldTime(): number { return cellFloat(memberCell(this.id,
|
|
4667
|
-
set blindHoldTime(value: number) { setMemberCell(this.id,
|
|
4736
|
+
get blindHoldTime(): number { return cellFloat(memberCell(this.id, 188)); }
|
|
4737
|
+
set blindHoldTime(value: number) { setMemberCell(this.id, 188, <i32>floatCell(value)); }
|
|
4668
4738
|
|
|
4669
4739
|
/**
|
|
4670
4740
|
* The time the player's blindness takes to fade, in seconds.
|
|
4671
4741
|
*
|
|
4672
4742
|
* Pawn: `CBasePlayer::m_blindFadeTime`
|
|
4673
4743
|
*/
|
|
4674
|
-
get blindFadeTime(): number { return cellFloat(memberCell(this.id,
|
|
4675
|
-
set blindFadeTime(value: number) { setMemberCell(this.id,
|
|
4744
|
+
get blindFadeTime(): number { return cellFloat(memberCell(this.id, 189)); }
|
|
4745
|
+
set blindFadeTime(value: number) { setMemberCell(this.id, 189, <i32>floatCell(value)); }
|
|
4676
4746
|
|
|
4677
4747
|
/**
|
|
4678
4748
|
* The strength of the player's blindness, `0` to `255`; `255` is fully blind.
|
|
4679
4749
|
*
|
|
4680
4750
|
* Pawn: `CBasePlayer::m_blindAlpha`
|
|
4681
4751
|
*/
|
|
4682
|
-
get blindAlpha(): number { return memberCell(this.id,
|
|
4683
|
-
set blindAlpha(value: number) { setMemberCell(this.id,
|
|
4752
|
+
get blindAlpha(): number { return memberCell(this.id, 190); }
|
|
4753
|
+
set blindAlpha(value: number) { setMemberCell(this.id, 190, <i32>value); }
|
|
4684
4754
|
|
|
4685
4755
|
/**
|
|
4686
4756
|
* The game time from which a bot may follow teammates on its own.
|
|
4687
4757
|
*
|
|
4688
4758
|
* Pawn: `CBasePlayer::m_allowAutoFollowTime`
|
|
4689
4759
|
*/
|
|
4690
|
-
get allowAutoFollowTime(): number { return cellFloat(memberCell(this.id,
|
|
4691
|
-
set allowAutoFollowTime(value: number) { setMemberCell(this.id,
|
|
4760
|
+
get allowAutoFollowTime(): number { return cellFloat(memberCell(this.id, 191)); }
|
|
4761
|
+
set allowAutoFollowTime(value: number) { setMemberCell(this.id, 191, <i32>floatCell(value)); }
|
|
4692
4762
|
|
|
4693
4763
|
/**
|
|
4694
4764
|
* The player's autobuy list: the items his client sent for `autobuy`.
|
|
4695
4765
|
*
|
|
4696
4766
|
* Pawn: `CBasePlayer::m_autoBuyString`
|
|
4697
4767
|
*/
|
|
4698
|
-
get autoBuyString(): string { return memberText(this.id,
|
|
4699
|
-
set autoBuyString(value: string) { setMemberText(this.id,
|
|
4768
|
+
get autoBuyString(): string { return memberText(this.id, 192); }
|
|
4769
|
+
set autoBuyString(value: string) { setMemberText(this.id, 192, value); }
|
|
4700
4770
|
|
|
4701
4771
|
/**
|
|
4702
4772
|
* The player's rebuy list: the items his client sent for `rebuy`.
|
|
4703
4773
|
*
|
|
4704
4774
|
* Pawn: `CBasePlayer::m_rebuyString`
|
|
4705
4775
|
*/
|
|
4706
|
-
get rebuyString(): string { return memberText(this.id,
|
|
4707
|
-
set rebuyString(value: string) { setMemberText(this.id,
|
|
4776
|
+
get rebuyString(): string { return memberText(this.id, 193); }
|
|
4777
|
+
set rebuyString(value: string) { setMemberText(this.id, 193, value); }
|
|
4708
4778
|
|
|
4709
4779
|
/**
|
|
4710
4780
|
* `true` while the rebuy command is buying the player's last equipment.
|
|
4711
4781
|
*
|
|
4712
4782
|
* Pawn: `CBasePlayer::m_bIsInRebuy`
|
|
4713
4783
|
*/
|
|
4714
|
-
get isInRebuy(): boolean { return memberCell(this.id,
|
|
4715
|
-
set isInRebuy(value: boolean) { setMemberCell(this.id,
|
|
4784
|
+
get isInRebuy(): boolean { return memberCell(this.id, 194) != 0; }
|
|
4785
|
+
set isInRebuy(value: boolean) { setMemberCell(this.id, 194, value ? 1 : 0); }
|
|
4716
4786
|
|
|
4717
4787
|
/**
|
|
4718
4788
|
* The game time of the last update of the player's location name (the place on the map).
|
|
4719
4789
|
*
|
|
4720
4790
|
* Pawn: `CBasePlayer::m_flLastUpdateTime`
|
|
4721
4791
|
*/
|
|
4722
|
-
get lastUpdateTime(): number { return cellFloat(memberCell(this.id,
|
|
4723
|
-
set lastUpdateTime(value: number) { setMemberCell(this.id,
|
|
4792
|
+
get lastUpdateTime(): number { return cellFloat(memberCell(this.id, 195)); }
|
|
4793
|
+
set lastUpdateTime(value: number) { setMemberCell(this.id, 195, <i32>floatCell(value)); }
|
|
4724
4794
|
|
|
4725
4795
|
/**
|
|
4726
4796
|
* The name of the place on the map the player was last in, which the radio and team chat name, e.g. `"BombsiteA"`.
|
|
4727
4797
|
*
|
|
4728
4798
|
* Pawn: `CBasePlayer::m_lastLocation`
|
|
4729
4799
|
*/
|
|
4730
|
-
get lastLocation(): string { return memberText(this.id,
|
|
4731
|
-
set lastLocation(value: string) { setMemberText(this.id,
|
|
4800
|
+
get lastLocation(): string { return memberText(this.id, 196); }
|
|
4801
|
+
set lastLocation(value: string) { setMemberText(this.id, 196, value); }
|
|
4732
4802
|
|
|
4733
4803
|
/**
|
|
4734
4804
|
* The game time when the player's progress bar (defusing, planting) started; `0` for none.
|
|
4735
4805
|
*
|
|
4736
4806
|
* Pawn: `CBasePlayer::m_progressStart`
|
|
4737
4807
|
*/
|
|
4738
|
-
get progressBarStart(): number { return cellFloat(memberCell(this.id,
|
|
4739
|
-
set progressBarStart(value: number) { setMemberCell(this.id,
|
|
4808
|
+
get progressBarStart(): number { return cellFloat(memberCell(this.id, 197)); }
|
|
4809
|
+
set progressBarStart(value: number) { setMemberCell(this.id, 197, <i32>floatCell(value)); }
|
|
4740
4810
|
|
|
4741
4811
|
/**
|
|
4742
4812
|
* The game time when the player's progress bar fills.
|
|
4743
4813
|
*
|
|
4744
4814
|
* Pawn: `CBasePlayer::m_progressEnd`
|
|
4745
4815
|
*/
|
|
4746
|
-
get progressBarEnd(): number { return cellFloat(memberCell(this.id,
|
|
4747
|
-
set progressBarEnd(value: number) { setMemberCell(this.id,
|
|
4816
|
+
get progressBarEnd(): number { return cellFloat(memberCell(this.id, 198)); }
|
|
4817
|
+
set progressBarEnd(value: number) { setMemberCell(this.id, 198, <i32>floatCell(value)); }
|
|
4748
4818
|
|
|
4749
4819
|
/**
|
|
4750
4820
|
* `true` if the spectator's chase camera follows the target's view rather than turning freely.
|
|
4751
4821
|
*
|
|
4752
4822
|
* Pawn: `CBasePlayer::m_bObserverAutoDirector`
|
|
4753
4823
|
*/
|
|
4754
|
-
get observerAutoDirector(): boolean { return memberCell(this.id,
|
|
4755
|
-
set observerAutoDirector(value: boolean) { setMemberCell(this.id,
|
|
4824
|
+
get observerAutoDirector(): boolean { return memberCell(this.id, 199) != 0; }
|
|
4825
|
+
set observerAutoDirector(value: boolean) { setMemberCell(this.id, 199, value ? 1 : 0); }
|
|
4756
4826
|
|
|
4757
4827
|
/**
|
|
4758
4828
|
* `true` if the spectator may change his view mode; `false` right after death.
|
|
4759
4829
|
*
|
|
4760
4830
|
* Pawn: `CBasePlayer::m_canSwitchObserverModes`
|
|
4761
4831
|
*/
|
|
4762
|
-
get canSwitchObserverModes(): boolean { return memberCell(this.id,
|
|
4763
|
-
set canSwitchObserverModes(value: boolean) { setMemberCell(this.id,
|
|
4832
|
+
get canSwitchObserverModes(): boolean { return memberCell(this.id, 200) != 0; }
|
|
4833
|
+
set canSwitchObserverModes(value: boolean) { setMemberCell(this.id, 200, value ? 1 : 0); }
|
|
4764
4834
|
|
|
4765
4835
|
/**
|
|
4766
4836
|
* A Condition Zero leftover; the game does not use it.
|
|
4767
4837
|
*
|
|
4768
4838
|
* Pawn: `CBasePlayer::m_heartBeatTime`
|
|
4769
4839
|
*/
|
|
4770
|
-
get heartBeatTime(): number { return cellFloat(memberCell(this.id,
|
|
4771
|
-
set heartBeatTime(value: number) { setMemberCell(this.id,
|
|
4840
|
+
get heartBeatTime(): number { return cellFloat(memberCell(this.id, 201)); }
|
|
4841
|
+
set heartBeatTime(value: number) { setMemberCell(this.id, 201, <i32>floatCell(value)); }
|
|
4772
4842
|
|
|
4773
4843
|
/**
|
|
4774
4844
|
* A Condition Zero leftover; the game does not use it.
|
|
4775
4845
|
*
|
|
4776
4846
|
* Pawn: `CBasePlayer::m_intenseTimestamp`
|
|
4777
4847
|
*/
|
|
4778
|
-
get intenseTimestamp(): number { return cellFloat(memberCell(this.id,
|
|
4779
|
-
set intenseTimestamp(value: number) { setMemberCell(this.id,
|
|
4848
|
+
get intenseTimestamp(): number { return cellFloat(memberCell(this.id, 202)); }
|
|
4849
|
+
set intenseTimestamp(value: number) { setMemberCell(this.id, 202, <i32>floatCell(value)); }
|
|
4780
4850
|
|
|
4781
4851
|
/**
|
|
4782
4852
|
* A Condition Zero leftover; the game does not use it.
|
|
4783
4853
|
*
|
|
4784
4854
|
* Pawn: `CBasePlayer::m_silentTimestamp`
|
|
4785
4855
|
*/
|
|
4786
|
-
get silentTimestamp(): number { return cellFloat(memberCell(this.id,
|
|
4787
|
-
set silentTimestamp(value: number) { setMemberCell(this.id,
|
|
4856
|
+
get silentTimestamp(): number { return cellFloat(memberCell(this.id, 203)); }
|
|
4857
|
+
set silentTimestamp(value: number) { setMemberCell(this.id, 203, <i32>floatCell(value)); }
|
|
4788
4858
|
|
|
4789
4859
|
/**
|
|
4790
4860
|
* A Condition Zero leftover, one of: `"silent"`, `"calm"`, `"intense"`; the game does not use it.
|
|
4791
4861
|
*
|
|
4792
4862
|
* Pawn: `CBasePlayer::m_musicState`
|
|
4793
4863
|
*/
|
|
4794
|
-
get musicState(): MusicState { return musicStateName(memberCell(this.id,
|
|
4864
|
+
get musicState(): MusicState { return musicStateName(memberCell(this.id, 204)); }
|
|
4795
4865
|
set musicState(value: MusicState) {
|
|
4796
4866
|
const cell = musicStateCell(value);
|
|
4797
|
-
if (cell != UNNAMED) setMemberCell(this.id,
|
|
4867
|
+
if (cell != UNNAMED) setMemberCell(this.id, 204, cell);
|
|
4798
4868
|
}
|
|
4799
4869
|
|
|
4800
4870
|
/**
|
|
@@ -4802,24 +4872,24 @@ export class PlayerFields extends Entity {
|
|
|
4802
4872
|
*
|
|
4803
4873
|
* Pawn: `CBasePlayer::m_iLastAccount`
|
|
4804
4874
|
*/
|
|
4805
|
-
get lastSentMoney(): number { return memberCell(this.id,
|
|
4806
|
-
set lastSentMoney(value: number) { setMemberCell(this.id,
|
|
4875
|
+
get lastSentMoney(): number { return memberCell(this.id, 205); }
|
|
4876
|
+
set lastSentMoney(value: number) { setMemberCell(this.id, 205, <i32>value); }
|
|
4807
4877
|
|
|
4808
4878
|
/**
|
|
4809
4879
|
* The player's health last sent to the other players' scoreboards.
|
|
4810
4880
|
*
|
|
4811
4881
|
* Pawn: `CBasePlayer::m_iLastClientHealth`
|
|
4812
4882
|
*/
|
|
4813
|
-
get lastClientHealth(): number { return memberCell(this.id,
|
|
4814
|
-
set lastClientHealth(value: number) { setMemberCell(this.id,
|
|
4883
|
+
get lastClientHealth(): number { return memberCell(this.id, 206); }
|
|
4884
|
+
set lastClientHealth(value: number) { setMemberCell(this.id, 206, <i32>value); }
|
|
4815
4885
|
|
|
4816
4886
|
/**
|
|
4817
4887
|
* The game time when the player's money and health are next sent to the scoreboards, even unchanged; every 5 seconds.
|
|
4818
4888
|
*
|
|
4819
4889
|
* Pawn: `CBasePlayer::m_tmNextAccountHealthUpdate`
|
|
4820
4890
|
*/
|
|
4821
|
-
get nextScoreboardUpdate(): number { return cellFloat(memberCell(this.id,
|
|
4822
|
-
set nextScoreboardUpdate(value: number) { setMemberCell(this.id,
|
|
4891
|
+
get nextScoreboardUpdate(): number { return cellFloat(memberCell(this.id, 207)); }
|
|
4892
|
+
set nextScoreboardUpdate(value: number) { setMemberCell(this.id, 207, <i32>floatCell(value)); }
|
|
4823
4893
|
|
|
4824
4894
|
/**
|
|
4825
4895
|
* The player's spectator mode, one of: `"none"` - not spectating; `"chaseLocked"` - a camera behind the target that turns with him; `"chaseFree"` - a camera behind the target that turns freely; `"roaming"` - flies freely; `"inEye"` - first person, through the target's eyes; `"mapFree"` - the overview map, moving freely; `"mapChase"` - the overview map, following the target. Setting a mode switches his camera as the game does when he picks it: onto someone he may watch, `"roaming"` when there is nobody; the target is iuser2. Setting `"none"` only clears the field: the game ends spectating when he spawns.
|
|
@@ -4924,186 +4994,186 @@ export class GameFields {
|
|
|
4924
4994
|
*
|
|
4925
4995
|
* Pawn: `CSGameRules::m_bFreezePeriod`
|
|
4926
4996
|
*/
|
|
4927
|
-
get isFreezeTime(): boolean { return gameCell(
|
|
4928
|
-
set isFreezeTime(value: boolean) { setGameCell(
|
|
4997
|
+
get isFreezeTime(): boolean { return gameCell(208) != 0; }
|
|
4998
|
+
set isFreezeTime(value: boolean) { setGameCell(208, value ? 1 : 0); }
|
|
4929
4999
|
|
|
4930
5000
|
/**
|
|
4931
5001
|
* `true` while the bomb lies on the ground, dropped by its carrier.
|
|
4932
5002
|
*
|
|
4933
5003
|
* Pawn: `CSGameRules::m_bBombDropped`
|
|
4934
5004
|
*/
|
|
4935
|
-
get bombDropped(): boolean { return gameCell(
|
|
4936
|
-
set bombDropped(value: boolean) { setGameCell(
|
|
5005
|
+
get bombDropped(): boolean { return gameCell(209) != 0; }
|
|
5006
|
+
set bombDropped(value: boolean) { setGameCell(209, value ? 1 : 0); }
|
|
4937
5007
|
|
|
4938
5008
|
/**
|
|
4939
5009
|
* The game's name in the server browser, e.g. `"Counter-Strike"`.
|
|
4940
5010
|
*
|
|
4941
5011
|
* Pawn: `CSGameRules::m_GameDesc`
|
|
4942
5012
|
*/
|
|
4943
|
-
get gameName(): string { return
|
|
4944
|
-
set gameName(value: string) {
|
|
5013
|
+
get gameName(): string { return regameText("gameName", gameNameHlds); }
|
|
5014
|
+
set gameName(value: string) { setRegameText("gameName", value, setGameNameHlds); }
|
|
4945
5015
|
|
|
4946
5016
|
/**
|
|
4947
5017
|
* The number of player slots, as the game's voice code counts them.
|
|
4948
5018
|
*
|
|
4949
5019
|
* Pawn: `CSGameRules::m_nMaxPlayers`
|
|
4950
5020
|
*/
|
|
4951
|
-
get maxPlayers(): number { return
|
|
4952
|
-
set maxPlayers(value: number) {
|
|
5021
|
+
get maxPlayers(): number { return regameCell(211, "maxPlayers", maxPlayersHlds); }
|
|
5022
|
+
set maxPlayers(value: number) { setRegameCell(211, "maxPlayers", <i32>value, setMaxPlayersHlds); }
|
|
4953
5023
|
|
|
4954
5024
|
/**
|
|
4955
5025
|
* The seconds between the game's updates of who hears whom on the voice chat.
|
|
4956
5026
|
*
|
|
4957
5027
|
* Pawn: `CSGameRules::m_UpdateInterval`
|
|
4958
5028
|
*/
|
|
4959
|
-
get updateInterval(): number { return cellFloat(
|
|
4960
|
-
set updateInterval(value: number) {
|
|
5029
|
+
get updateInterval(): number { return cellFloat(regameCell(212, "updateInterval")); }
|
|
5030
|
+
set updateInterval(value: number) { setRegameCell(212, "updateInterval", <i32>floatCell(value)); }
|
|
4961
5031
|
|
|
4962
5032
|
/**
|
|
4963
5033
|
* The game time the next round starts at, after a round's end or a restart; `0` when none is due.
|
|
4964
5034
|
*
|
|
4965
5035
|
* Pawn: `CSGameRules::m_flRestartRoundTime`
|
|
4966
5036
|
*/
|
|
4967
|
-
get newRoundTime(): number { return cellFloat(gameCell(
|
|
4968
|
-
set newRoundTime(value: number) { setGameCell(
|
|
5037
|
+
get newRoundTime(): number { return cellFloat(gameCell(213)); }
|
|
5038
|
+
set newRoundTime(value: number) { setGameCell(213, <i32>floatCell(value)); }
|
|
4969
5039
|
|
|
4970
5040
|
/**
|
|
4971
5041
|
* The game time of the game's next check whether a side has won; `0` when none is due.
|
|
4972
5042
|
*
|
|
4973
5043
|
* Pawn: `CSGameRules::m_flCheckWinConditions`
|
|
4974
5044
|
*/
|
|
4975
|
-
get checkWinConditionsTime(): number { return cellFloat(gameCell(
|
|
4976
|
-
set checkWinConditionsTime(value: number) { setGameCell(
|
|
5045
|
+
get checkWinConditionsTime(): number { return cellFloat(gameCell(214)); }
|
|
5046
|
+
set checkWinConditionsTime(value: number) { setGameCell(214, <i32>floatCell(value)); }
|
|
4977
5047
|
|
|
4978
5048
|
/**
|
|
4979
5049
|
* The game time the round's play began: the end of the freeze time.
|
|
4980
5050
|
*
|
|
4981
5051
|
* Pawn: `CSGameRules::m_fRoundStartTime`
|
|
4982
5052
|
*/
|
|
4983
|
-
get roundStartTime(): number { return cellFloat(gameCell(
|
|
4984
|
-
set roundStartTime(value: number) { setGameCell(
|
|
5053
|
+
get roundStartTime(): number { return cellFloat(gameCell(215)); }
|
|
5054
|
+
set roundStartTime(value: number) { setGameCell(215, <i32>floatCell(value)); }
|
|
4985
5055
|
|
|
4986
5056
|
/**
|
|
4987
5057
|
* The round's length in seconds; during the freeze time, the freeze time's.
|
|
4988
5058
|
*
|
|
4989
5059
|
* Pawn: `CSGameRules::m_iRoundTime`
|
|
4990
5060
|
*/
|
|
4991
|
-
get roundTime(): number { return gameCell(
|
|
4992
|
-
set roundTime(value: number) { setGameCell(
|
|
5061
|
+
get roundTime(): number { return gameCell(216); }
|
|
5062
|
+
set roundTime(value: number) { setGameCell(216, <i32>value); }
|
|
4993
5063
|
|
|
4994
5064
|
/**
|
|
4995
5065
|
* The round's length in seconds, from `mp_roundtime`.
|
|
4996
5066
|
*
|
|
4997
5067
|
* Pawn: `CSGameRules::m_iRoundTimeSecs`
|
|
4998
5068
|
*/
|
|
4999
|
-
get roundTimeSecs(): number { return gameCell(
|
|
5000
|
-
set roundTimeSecs(value: number) { setGameCell(
|
|
5069
|
+
get roundTimeSecs(): number { return gameCell(217); }
|
|
5070
|
+
set roundTimeSecs(value: number) { setGameCell(217, <i32>value); }
|
|
5001
5071
|
|
|
5002
5072
|
/**
|
|
5003
5073
|
* The freeze time's length in seconds, from `mp_freezetime`.
|
|
5004
5074
|
*
|
|
5005
5075
|
* Pawn: `CSGameRules::m_iIntroRoundTime`
|
|
5006
5076
|
*/
|
|
5007
|
-
get freezeTime(): number { return gameCell(
|
|
5008
|
-
set freezeTime(value: number) { setGameCell(
|
|
5077
|
+
get freezeTime(): number { return gameCell(218); }
|
|
5078
|
+
set freezeTime(value: number) { setGameCell(218, <i32>value); }
|
|
5009
5079
|
|
|
5010
5080
|
/**
|
|
5011
5081
|
* The game time the round started, the freeze time included.
|
|
5012
5082
|
*
|
|
5013
5083
|
* Pawn: `CSGameRules::m_fRoundStartTimeReal`
|
|
5014
5084
|
*/
|
|
5015
|
-
get freezeStartTime(): number { return cellFloat(gameCell(
|
|
5016
|
-
set freezeStartTime(value: number) { setGameCell(
|
|
5085
|
+
get freezeStartTime(): number { return cellFloat(gameCell(219)); }
|
|
5086
|
+
set freezeStartTime(value: number) { setGameCell(219, <i32>floatCell(value)); }
|
|
5017
5087
|
|
|
5018
5088
|
/**
|
|
5019
5089
|
* The money every terrorist is paid when the next round starts, for how this one went.
|
|
5020
5090
|
*
|
|
5021
5091
|
* Pawn: `CSGameRules::m_iAccountTerrorist`
|
|
5022
5092
|
*/
|
|
5023
|
-
get terroristRoundBonus(): number { return gameCell(
|
|
5024
|
-
set terroristRoundBonus(value: number) { setGameCell(
|
|
5093
|
+
get terroristRoundBonus(): number { return gameCell(220); }
|
|
5094
|
+
set terroristRoundBonus(value: number) { setGameCell(220, <i32>value); }
|
|
5025
5095
|
|
|
5026
5096
|
/**
|
|
5027
5097
|
* The money every counter-terrorist is paid when the next round starts, for how this one went.
|
|
5028
5098
|
*
|
|
5029
5099
|
* Pawn: `CSGameRules::m_iAccountCT`
|
|
5030
5100
|
*/
|
|
5031
|
-
get ctRoundBonus(): number { return gameCell(
|
|
5032
|
-
set ctRoundBonus(value: number) { setGameCell(
|
|
5101
|
+
get ctRoundBonus(): number { return gameCell(221); }
|
|
5102
|
+
set ctRoundBonus(value: number) { setGameCell(221, <i32>value); }
|
|
5033
5103
|
|
|
5034
5104
|
/**
|
|
5035
5105
|
* The number of terrorists, counted when a round ends.
|
|
5036
5106
|
*
|
|
5037
5107
|
* Pawn: `CSGameRules::m_iNumTerrorist`
|
|
5038
5108
|
*/
|
|
5039
|
-
get terroristCount(): number { return gameCell(
|
|
5040
|
-
set terroristCount(value: number) { setGameCell(
|
|
5109
|
+
get terroristCount(): number { return gameCell(222); }
|
|
5110
|
+
set terroristCount(value: number) { setGameCell(222, <i32>value); }
|
|
5041
5111
|
|
|
5042
5112
|
/**
|
|
5043
5113
|
* The number of counter-terrorists, counted when a round ends.
|
|
5044
5114
|
*
|
|
5045
5115
|
* Pawn: `CSGameRules::m_iNumCT`
|
|
5046
5116
|
*/
|
|
5047
|
-
get ctCount(): number { return gameCell(
|
|
5048
|
-
set ctCount(value: number) { setGameCell(
|
|
5117
|
+
get ctCount(): number { return gameCell(223); }
|
|
5118
|
+
set ctCount(value: number) { setGameCell(223, <i32>value); }
|
|
5049
5119
|
|
|
5050
5120
|
/**
|
|
5051
5121
|
* The number of terrorists who can spawn in the next round, counted when a round ends.
|
|
5052
5122
|
*
|
|
5053
5123
|
* Pawn: `CSGameRules::m_iNumSpawnableTerrorist`
|
|
5054
5124
|
*/
|
|
5055
|
-
get spawnableTerrorists(): number { return gameCell(
|
|
5056
|
-
set spawnableTerrorists(value: number) { setGameCell(
|
|
5125
|
+
get spawnableTerrorists(): number { return gameCell(224); }
|
|
5126
|
+
set spawnableTerrorists(value: number) { setGameCell(224, <i32>value); }
|
|
5057
5127
|
|
|
5058
5128
|
/**
|
|
5059
5129
|
* The number of counter-terrorists who can spawn in the next round, counted when a round ends.
|
|
5060
5130
|
*
|
|
5061
5131
|
* Pawn: `CSGameRules::m_iNumSpawnableCT`
|
|
5062
5132
|
*/
|
|
5063
|
-
get spawnableCts(): number { return gameCell(
|
|
5064
|
-
set spawnableCts(value: number) { setGameCell(
|
|
5133
|
+
get spawnableCts(): number { return gameCell(225); }
|
|
5134
|
+
set spawnableCts(value: number) { setGameCell(225, <i32>value); }
|
|
5065
5135
|
|
|
5066
5136
|
/**
|
|
5067
5137
|
* The number of the map's terrorist spawn points.
|
|
5068
5138
|
*
|
|
5069
5139
|
* Pawn: `CSGameRules::m_iSpawnPointCount_Terrorist`
|
|
5070
5140
|
*/
|
|
5071
|
-
get spawnPointCountTerrorist(): number { return gameCell(
|
|
5072
|
-
set spawnPointCountTerrorist(value: number) { setGameCell(
|
|
5141
|
+
get spawnPointCountTerrorist(): number { return gameCell(226); }
|
|
5142
|
+
set spawnPointCountTerrorist(value: number) { setGameCell(226, <i32>value); }
|
|
5073
5143
|
|
|
5074
5144
|
/**
|
|
5075
5145
|
* The number of the map's counter-terrorist spawn points.
|
|
5076
5146
|
*
|
|
5077
5147
|
* Pawn: `CSGameRules::m_iSpawnPointCount_CT`
|
|
5078
5148
|
*/
|
|
5079
|
-
get spawnPointCountCt(): number { return gameCell(
|
|
5080
|
-
set spawnPointCountCt(value: number) { setGameCell(
|
|
5149
|
+
get spawnPointCountCt(): number { return gameCell(227); }
|
|
5150
|
+
set spawnPointCountCt(value: number) { setGameCell(227, <i32>value); }
|
|
5081
5151
|
|
|
5082
5152
|
/**
|
|
5083
5153
|
* The number of hostages rescued this round.
|
|
5084
5154
|
*
|
|
5085
5155
|
* Pawn: `CSGameRules::m_iHostagesRescued`
|
|
5086
5156
|
*/
|
|
5087
|
-
get hostagesRescued(): number { return gameCell(
|
|
5088
|
-
set hostagesRescued(value: number) { setGameCell(
|
|
5157
|
+
get hostagesRescued(): number { return gameCell(228); }
|
|
5158
|
+
set hostagesRescued(value: number) { setGameCell(228, <i32>value); }
|
|
5089
5159
|
|
|
5090
5160
|
/**
|
|
5091
5161
|
* The number of hostages a counter-terrorist has led away this round.
|
|
5092
5162
|
*
|
|
5093
5163
|
* Pawn: `CSGameRules::m_iHostagesTouched`
|
|
5094
5164
|
*/
|
|
5095
|
-
get hostagesTouched(): number { return gameCell(
|
|
5096
|
-
set hostagesTouched(value: number) { setGameCell(
|
|
5165
|
+
get hostagesTouched(): number { return gameCell(229); }
|
|
5166
|
+
set hostagesTouched(value: number) { setGameCell(229, <i32>value); }
|
|
5097
5167
|
|
|
5098
5168
|
/**
|
|
5099
5169
|
* The last round's winner, one of `"CT"`, `"TERRORIST"`, `"draw"`, or `"none"` while the round goes on.
|
|
5100
5170
|
*
|
|
5101
5171
|
* Pawn: `CSGameRules::m_iRoundWinStatus`
|
|
5102
5172
|
*/
|
|
5103
|
-
get roundWinner(): RoundWinner { return roundWinnerName(gameCell(
|
|
5173
|
+
get roundWinner(): RoundWinner { return roundWinnerName(gameCell(230)); }
|
|
5104
5174
|
set roundWinner(value: RoundWinner) {
|
|
5105
5175
|
const cell = roundWinnerCell(value);
|
|
5106
|
-
if (cell != UNNAMED) setGameCell(
|
|
5176
|
+
if (cell != UNNAMED) setGameCell(230, cell);
|
|
5107
5177
|
}
|
|
5108
5178
|
|
|
5109
5179
|
/**
|
|
@@ -5111,7 +5181,7 @@ export class GameFields {
|
|
|
5111
5181
|
*
|
|
5112
5182
|
* Pawn: `CSGameRules::m_iNumCTWins`, `rg_update_teamscores`
|
|
5113
5183
|
*/
|
|
5114
|
-
get ctWins(): number { return gameCell(3
|
|
5184
|
+
get ctWins(): number { return gameCell(3); }
|
|
5115
5185
|
set ctWins(value: number) { setTeamScores(value, this.terroristWins); }
|
|
5116
5186
|
|
|
5117
5187
|
/**
|
|
@@ -5119,7 +5189,7 @@ export class GameFields {
|
|
|
5119
5189
|
*
|
|
5120
5190
|
* Pawn: `CSGameRules::m_iNumTerroristWins`, `rg_update_teamscores`
|
|
5121
5191
|
*/
|
|
5122
|
-
get terroristWins(): number { return gameCell(4
|
|
5192
|
+
get terroristWins(): number { return gameCell(4); }
|
|
5123
5193
|
set terroristWins(value: number) { setTeamScores(this.ctWins, value); }
|
|
5124
5194
|
|
|
5125
5195
|
/**
|
|
@@ -5127,66 +5197,66 @@ export class GameFields {
|
|
|
5127
5197
|
*
|
|
5128
5198
|
* Pawn: `CSGameRules::m_bTargetBombed`
|
|
5129
5199
|
*/
|
|
5130
|
-
get targetBombed(): boolean { return gameCell(
|
|
5131
|
-
set targetBombed(value: boolean) { setGameCell(
|
|
5200
|
+
get targetBombed(): boolean { return gameCell(231) != 0; }
|
|
5201
|
+
set targetBombed(value: boolean) { setGameCell(231, value ? 1 : 0); }
|
|
5132
5202
|
|
|
5133
5203
|
/**
|
|
5134
5204
|
* `true` once the bomb has been defused this round.
|
|
5135
5205
|
*
|
|
5136
5206
|
* Pawn: `CSGameRules::m_bBombDefused`
|
|
5137
5207
|
*/
|
|
5138
|
-
get bombDefused(): boolean { return gameCell(
|
|
5139
|
-
set bombDefused(value: boolean) { setGameCell(
|
|
5208
|
+
get bombDefused(): boolean { return gameCell(232) != 0; }
|
|
5209
|
+
set bombDefused(value: boolean) { setGameCell(232, value ? 1 : 0); }
|
|
5140
5210
|
|
|
5141
5211
|
/**
|
|
5142
5212
|
* `true` when the map has a bomb site.
|
|
5143
5213
|
*
|
|
5144
5214
|
* Pawn: `CSGameRules::m_bMapHasBombTarget`
|
|
5145
5215
|
*/
|
|
5146
|
-
get mapHasBombTarget(): boolean { return gameCell(
|
|
5147
|
-
set mapHasBombTarget(value: boolean) { setGameCell(
|
|
5216
|
+
get mapHasBombTarget(): boolean { return gameCell(233) != 0; }
|
|
5217
|
+
set mapHasBombTarget(value: boolean) { setGameCell(233, value ? 1 : 0); }
|
|
5148
5218
|
|
|
5149
5219
|
/**
|
|
5150
5220
|
* `true` when the map has a bomb zone a planter must stand in.
|
|
5151
5221
|
*
|
|
5152
5222
|
* Pawn: `CSGameRules::m_bMapHasBombZone`
|
|
5153
5223
|
*/
|
|
5154
|
-
get mapHasBombZone(): boolean { return gameCell(
|
|
5155
|
-
set mapHasBombZone(value: boolean) { setGameCell(
|
|
5224
|
+
get mapHasBombZone(): boolean { return gameCell(234) != 0; }
|
|
5225
|
+
set mapHasBombZone(value: boolean) { setGameCell(234, value ? 1 : 0); }
|
|
5156
5226
|
|
|
5157
5227
|
/**
|
|
5158
5228
|
* `true` when the map has buy zones of its own.
|
|
5159
5229
|
*
|
|
5160
5230
|
* Pawn: `CSGameRules::m_bMapHasBuyZone`
|
|
5161
5231
|
*/
|
|
5162
|
-
get mapHasBuyZone(): boolean { return gameCell(
|
|
5163
|
-
set mapHasBuyZone(value: boolean) { setGameCell(
|
|
5232
|
+
get mapHasBuyZone(): boolean { return gameCell(235) != 0; }
|
|
5233
|
+
set mapHasBuyZone(value: boolean) { setGameCell(235, value ? 1 : 0); }
|
|
5164
5234
|
|
|
5165
5235
|
/**
|
|
5166
5236
|
* `true` when the map has a hostage rescue zone.
|
|
5167
5237
|
*
|
|
5168
5238
|
* Pawn: `CSGameRules::m_bMapHasRescueZone`
|
|
5169
5239
|
*/
|
|
5170
|
-
get mapHasRescueZone(): boolean { return gameCell(
|
|
5171
|
-
set mapHasRescueZone(value: boolean) { setGameCell(
|
|
5240
|
+
get mapHasRescueZone(): boolean { return gameCell(236) != 0; }
|
|
5241
|
+
set mapHasRescueZone(value: boolean) { setGameCell(236, value ? 1 : 0); }
|
|
5172
5242
|
|
|
5173
5243
|
/**
|
|
5174
5244
|
* `true` when the map has an escape zone for the terrorists.
|
|
5175
5245
|
*
|
|
5176
5246
|
* Pawn: `CSGameRules::m_bMapHasEscapeZone`
|
|
5177
5247
|
*/
|
|
5178
|
-
get mapHasEscapeZone(): boolean { return gameCell(
|
|
5179
|
-
set mapHasEscapeZone(value: boolean) { setGameCell(
|
|
5248
|
+
get mapHasEscapeZone(): boolean { return gameCell(237) != 0; }
|
|
5249
|
+
set mapHasEscapeZone(value: boolean) { setGameCell(237, value ? 1 : 0); }
|
|
5180
5250
|
|
|
5181
5251
|
/**
|
|
5182
5252
|
* Whether the map has a VIP safety zone, one of `"yes"`, `"no"`, or `"notChecked"` until the game has looked.
|
|
5183
5253
|
*
|
|
5184
5254
|
* Pawn: `CSGameRules::m_bMapHasVIPSafetyZone`
|
|
5185
5255
|
*/
|
|
5186
|
-
get mapHasVipSafetyZone(): VipSafetyZone { return vipSafetyZoneName(gameCell(
|
|
5256
|
+
get mapHasVipSafetyZone(): VipSafetyZone { return vipSafetyZoneName(gameCell(238)); }
|
|
5187
5257
|
set mapHasVipSafetyZone(value: VipSafetyZone) {
|
|
5188
5258
|
const cell = vipSafetyZoneCell(value);
|
|
5189
|
-
if (cell != UNNAMED) setGameCell(
|
|
5259
|
+
if (cell != UNNAMED) setGameCell(238, cell);
|
|
5190
5260
|
}
|
|
5191
5261
|
|
|
5192
5262
|
/**
|
|
@@ -5194,16 +5264,16 @@ export class GameFields {
|
|
|
5194
5264
|
*
|
|
5195
5265
|
* Pawn: `CSGameRules::m_bMapHasCameras`
|
|
5196
5266
|
*/
|
|
5197
|
-
get mapHasCameras(): boolean { return gameCell(
|
|
5198
|
-
set mapHasCameras(value: boolean) { setGameCell(
|
|
5267
|
+
get mapHasCameras(): boolean { return gameCell(239) != 0; }
|
|
5268
|
+
set mapHasCameras(value: boolean) { setGameCell(239, value ? 1 : 0); }
|
|
5199
5269
|
|
|
5200
5270
|
/**
|
|
5201
5271
|
* The bomb's timer in seconds, from `mp_c4timer`.
|
|
5202
5272
|
*
|
|
5203
5273
|
* Pawn: `CSGameRules::m_iC4Timer`
|
|
5204
5274
|
*/
|
|
5205
|
-
get bombTimer(): number { return gameCell(
|
|
5206
|
-
set bombTimer(value: number) { setGameCell(
|
|
5275
|
+
get bombTimer(): number { return gameCell(240); }
|
|
5276
|
+
set bombTimer(value: number) { setGameCell(240, <i32>value); }
|
|
5207
5277
|
|
|
5208
5278
|
/**
|
|
5209
5279
|
* The terrorist who got the bomb this round, or `null`. Read only.
|
|
@@ -5211,8 +5281,8 @@ export class GameFields {
|
|
|
5211
5281
|
* Pawn: `CSGameRules::m_iC4Guy`
|
|
5212
5282
|
*/
|
|
5213
5283
|
get bomber(): Player | null {
|
|
5214
|
-
const index = gameCell(
|
|
5215
|
-
return index > 0 ?
|
|
5284
|
+
const index = gameCell(241);
|
|
5285
|
+
return index > 0 ? __playerOf(index) : null;
|
|
5216
5286
|
}
|
|
5217
5287
|
|
|
5218
5288
|
/**
|
|
@@ -5220,336 +5290,336 @@ export class GameFields {
|
|
|
5220
5290
|
*
|
|
5221
5291
|
* Pawn: `CSGameRules::m_iLoserBonus`
|
|
5222
5292
|
*/
|
|
5223
|
-
get loserBonus(): number { return gameCell(
|
|
5224
|
-
set loserBonus(value: number) { setGameCell(
|
|
5293
|
+
get loserBonus(): number { return gameCell(242); }
|
|
5294
|
+
set loserBonus(value: number) { setGameCell(242, <i32>value); }
|
|
5225
5295
|
|
|
5226
5296
|
/**
|
|
5227
5297
|
* The number of rounds the counter-terrorists have lost in a row.
|
|
5228
5298
|
*
|
|
5229
5299
|
* Pawn: `CSGameRules::m_iNumConsecutiveCTLoses`
|
|
5230
5300
|
*/
|
|
5231
|
-
get ctLossStreak(): number { return gameCell(
|
|
5232
|
-
set ctLossStreak(value: number) { setGameCell(
|
|
5301
|
+
get ctLossStreak(): number { return gameCell(243); }
|
|
5302
|
+
set ctLossStreak(value: number) { setGameCell(243, <i32>value); }
|
|
5233
5303
|
|
|
5234
5304
|
/**
|
|
5235
5305
|
* The number of rounds the terrorists have lost in a row.
|
|
5236
5306
|
*
|
|
5237
5307
|
* Pawn: `CSGameRules::m_iNumConsecutiveTerroristLoses`
|
|
5238
5308
|
*/
|
|
5239
|
-
get terroristLossStreak(): number { return gameCell(
|
|
5240
|
-
set terroristLossStreak(value: number) { setGameCell(
|
|
5309
|
+
get terroristLossStreak(): number { return gameCell(244); }
|
|
5310
|
+
set terroristLossStreak(value: number) { setGameCell(244, <i32>value); }
|
|
5241
5311
|
|
|
5242
5312
|
/**
|
|
5243
5313
|
* The seconds a player may stand idle before he is kicked, with `mp_autokick` on.
|
|
5244
5314
|
*
|
|
5245
5315
|
* Pawn: `CSGameRules::m_fMaxIdlePeriod`
|
|
5246
5316
|
*/
|
|
5247
|
-
get maxIdlePeriod(): number { return cellFloat(gameCell(
|
|
5248
|
-
set maxIdlePeriod(value: number) { setGameCell(
|
|
5317
|
+
get maxIdlePeriod(): number { return cellFloat(gameCell(245)); }
|
|
5318
|
+
set maxIdlePeriod(value: number) { setGameCell(245, <i32>floatCell(value)); }
|
|
5249
5319
|
|
|
5250
5320
|
/**
|
|
5251
5321
|
* The most one side may outnumber the other by, from `mp_limitteams`.
|
|
5252
5322
|
*
|
|
5253
5323
|
* Pawn: `CSGameRules::m_iLimitTeams`
|
|
5254
5324
|
*/
|
|
5255
|
-
get limitTeams(): number { return gameCell(
|
|
5256
|
-
set limitTeams(value: number) { setGameCell(
|
|
5325
|
+
get limitTeams(): number { return gameCell(246); }
|
|
5326
|
+
set limitTeams(value: number) { setGameCell(246, <i32>value); }
|
|
5257
5327
|
|
|
5258
5328
|
/**
|
|
5259
5329
|
* `true` once the game has looked the map over for its bomb sites, buy zones and hostages.
|
|
5260
5330
|
*
|
|
5261
5331
|
* Pawn: `CSGameRules::m_bLevelInitialized`
|
|
5262
5332
|
*/
|
|
5263
|
-
get mapInitialized(): boolean { return gameCell(
|
|
5264
|
-
set mapInitialized(value: boolean) { setGameCell(
|
|
5333
|
+
get mapInitialized(): boolean { return gameCell(247) != 0; }
|
|
5334
|
+
set mapInitialized(value: boolean) { setGameCell(247, value ? 1 : 0); }
|
|
5265
5335
|
|
|
5266
5336
|
/**
|
|
5267
5337
|
* `true` from a round's end until the next round starts.
|
|
5268
5338
|
*
|
|
5269
5339
|
* Pawn: `CSGameRules::m_bRoundTerminating`
|
|
5270
5340
|
*/
|
|
5271
|
-
get roundEnding(): boolean { return gameCell(
|
|
5272
|
-
set roundEnding(value: boolean) { setGameCell(
|
|
5341
|
+
get roundEnding(): boolean { return gameCell(248) != 0; }
|
|
5342
|
+
set roundEnding(value: boolean) { setGameCell(248, value ? 1 : 0); }
|
|
5273
5343
|
|
|
5274
5344
|
/**
|
|
5275
5345
|
* `true` when the next restart resets everything, the scores too, as `sv_restart` does.
|
|
5276
5346
|
*
|
|
5277
5347
|
* Pawn: `CSGameRules::m_bCompleteReset`
|
|
5278
5348
|
*/
|
|
5279
|
-
get completeReset(): boolean { return gameCell(
|
|
5280
|
-
set completeReset(value: boolean) { setGameCell(
|
|
5349
|
+
get completeReset(): boolean { return gameCell(249) != 0; }
|
|
5350
|
+
set completeReset(value: boolean) { setGameCell(249, value ? 1 : 0); }
|
|
5281
5351
|
|
|
5282
5352
|
/**
|
|
5283
5353
|
* The share of terrorists, `0` to `1`, who must escape for them to win on an escape map.
|
|
5284
5354
|
*
|
|
5285
5355
|
* Pawn: `CSGameRules::m_flRequiredEscapeRatio`
|
|
5286
5356
|
*/
|
|
5287
|
-
get requiredEscapeRatio(): number { return cellFloat(gameCell(
|
|
5288
|
-
set requiredEscapeRatio(value: number) { setGameCell(
|
|
5357
|
+
get requiredEscapeRatio(): number { return cellFloat(gameCell(250)); }
|
|
5358
|
+
set requiredEscapeRatio(value: number) { setGameCell(250, <i32>floatCell(value)); }
|
|
5289
5359
|
|
|
5290
5360
|
/**
|
|
5291
5361
|
* The number of terrorists who can escape, on an escape map.
|
|
5292
5362
|
*
|
|
5293
5363
|
* Pawn: `CSGameRules::m_iNumEscapers`
|
|
5294
5364
|
*/
|
|
5295
|
-
get numEscapers(): number { return gameCell(
|
|
5296
|
-
set numEscapers(value: number) { setGameCell(
|
|
5365
|
+
get numEscapers(): number { return gameCell(251); }
|
|
5366
|
+
set numEscapers(value: number) { setGameCell(251, <i32>value); }
|
|
5297
5367
|
|
|
5298
5368
|
/**
|
|
5299
5369
|
* The number of terrorists who have escaped this round.
|
|
5300
5370
|
*
|
|
5301
5371
|
* Pawn: `CSGameRules::m_iHaveEscaped`
|
|
5302
5372
|
*/
|
|
5303
|
-
get haveEscaped(): number { return gameCell(
|
|
5304
|
-
set haveEscaped(value: number) { setGameCell(
|
|
5373
|
+
get haveEscaped(): number { return gameCell(252); }
|
|
5374
|
+
set haveEscaped(value: number) { setGameCell(252, <i32>value); }
|
|
5305
5375
|
|
|
5306
5376
|
/**
|
|
5307
5377
|
* `true` while the counter-terrorists may not buy.
|
|
5308
5378
|
*
|
|
5309
5379
|
* Pawn: `CSGameRules::m_bCTCantBuy`
|
|
5310
5380
|
*/
|
|
5311
|
-
get ctsCantBuy(): boolean { return gameCell(
|
|
5312
|
-
set ctsCantBuy(value: boolean) { setGameCell(
|
|
5381
|
+
get ctsCantBuy(): boolean { return gameCell(253) != 0; }
|
|
5382
|
+
set ctsCantBuy(value: boolean) { setGameCell(253, value ? 1 : 0); }
|
|
5313
5383
|
|
|
5314
5384
|
/**
|
|
5315
5385
|
* `true` while the terrorists may not buy.
|
|
5316
5386
|
*
|
|
5317
5387
|
* Pawn: `CSGameRules::m_bTCantBuy`
|
|
5318
5388
|
*/
|
|
5319
|
-
get terroristsCantBuy(): boolean { return gameCell(
|
|
5320
|
-
set terroristsCantBuy(value: boolean) { setGameCell(
|
|
5389
|
+
get terroristsCantBuy(): boolean { return gameCell(254) != 0; }
|
|
5390
|
+
set terroristsCantBuy(value: boolean) { setGameCell(254, value ? 1 : 0); }
|
|
5321
5391
|
|
|
5322
5392
|
/**
|
|
5323
5393
|
* The bomb's blast radius, in units, as the map sets it.
|
|
5324
5394
|
*
|
|
5325
5395
|
* Pawn: `CSGameRules::m_flBombRadius`
|
|
5326
5396
|
*/
|
|
5327
|
-
get bombRadius(): number { return cellFloat(gameCell(
|
|
5328
|
-
set bombRadius(value: number) { setGameCell(
|
|
5397
|
+
get bombRadius(): number { return cellFloat(gameCell(255)); }
|
|
5398
|
+
set bombRadius(value: number) { setGameCell(255, <i32>floatCell(value)); }
|
|
5329
5399
|
|
|
5330
5400
|
/**
|
|
5331
5401
|
* The number of rounds in a row the same player has been the VIP.
|
|
5332
5402
|
*
|
|
5333
5403
|
* Pawn: `CSGameRules::m_iConsecutiveVIP`
|
|
5334
5404
|
*/
|
|
5335
|
-
get consecutiveVip(): number { return gameCell(
|
|
5336
|
-
set consecutiveVip(value: number) { setGameCell(
|
|
5405
|
+
get consecutiveVip(): number { return gameCell(256); }
|
|
5406
|
+
set consecutiveVip(value: number) { setGameCell(256, <i32>value); }
|
|
5337
5407
|
|
|
5338
5408
|
/**
|
|
5339
5409
|
* The number of guns the game has counted lying on the map.
|
|
5340
5410
|
*
|
|
5341
5411
|
* Pawn: `CSGameRules::m_iTotalGunCount`
|
|
5342
5412
|
*/
|
|
5343
|
-
get totalGunCount(): number { return gameCell(
|
|
5344
|
-
set totalGunCount(value: number) { setGameCell(
|
|
5413
|
+
get totalGunCount(): number { return gameCell(257); }
|
|
5414
|
+
set totalGunCount(value: number) { setGameCell(257, <i32>value); }
|
|
5345
5415
|
|
|
5346
5416
|
/**
|
|
5347
5417
|
* The number of grenades the game has counted lying on the map.
|
|
5348
5418
|
*
|
|
5349
5419
|
* Pawn: `CSGameRules::m_iTotalGrenadeCount`
|
|
5350
5420
|
*/
|
|
5351
|
-
get totalGrenadeCount(): number { return gameCell(
|
|
5352
|
-
set totalGrenadeCount(value: number) { setGameCell(
|
|
5421
|
+
get totalGrenadeCount(): number { return gameCell(258); }
|
|
5422
|
+
set totalGrenadeCount(value: number) { setGameCell(258, <i32>value); }
|
|
5353
5423
|
|
|
5354
5424
|
/**
|
|
5355
5425
|
* The number of armour pieces the game has counted lying on the map.
|
|
5356
5426
|
*
|
|
5357
5427
|
* Pawn: `CSGameRules::m_iTotalArmourCount`
|
|
5358
5428
|
*/
|
|
5359
|
-
get totalArmourCount(): number { return gameCell(
|
|
5360
|
-
set totalArmourCount(value: number) { setGameCell(
|
|
5429
|
+
get totalArmourCount(): number { return gameCell(259); }
|
|
5430
|
+
set totalArmourCount(value: number) { setGameCell(259, <i32>value); }
|
|
5361
5431
|
|
|
5362
5432
|
/**
|
|
5363
5433
|
* The number of rounds in a row one side has outnumbered the other by more than two; the game balances the sides after enough of them.
|
|
5364
5434
|
*
|
|
5365
5435
|
* Pawn: `CSGameRules::m_iUnBalancedRounds`
|
|
5366
5436
|
*/
|
|
5367
|
-
get unbalancedRounds(): number { return gameCell(
|
|
5368
|
-
set unbalancedRounds(value: number) { setGameCell(
|
|
5437
|
+
get unbalancedRounds(): number { return gameCell(260); }
|
|
5438
|
+
set unbalancedRounds(value: number) { setGameCell(260, <i32>value); }
|
|
5369
5439
|
|
|
5370
5440
|
/**
|
|
5371
5441
|
* The number of escape rounds played in a row; the sides swap after 8.
|
|
5372
5442
|
*
|
|
5373
5443
|
* Pawn: `CSGameRules::m_iNumEscapeRounds`
|
|
5374
5444
|
*/
|
|
5375
|
-
get numEscapeRounds(): number { return gameCell(
|
|
5376
|
-
set numEscapeRounds(value: number) { setGameCell(
|
|
5445
|
+
get numEscapeRounds(): number { return gameCell(261); }
|
|
5446
|
+
set numEscapeRounds(value: number) { setGameCell(261, <i32>value); }
|
|
5377
5447
|
|
|
5378
5448
|
/**
|
|
5379
5449
|
* The number of the map the last map vote picked.
|
|
5380
5450
|
*
|
|
5381
5451
|
* Pawn: `CSGameRules::m_iLastPick`
|
|
5382
5452
|
*/
|
|
5383
|
-
get lastPick(): number { return gameCell(
|
|
5384
|
-
set lastPick(value: number) { setGameCell(
|
|
5453
|
+
get lastPick(): number { return gameCell(262); }
|
|
5454
|
+
set lastPick(value: number) { setGameCell(262, <i32>value); }
|
|
5385
5455
|
|
|
5386
5456
|
/**
|
|
5387
5457
|
* The map's time limit, from `mp_timelimit`.
|
|
5388
5458
|
*
|
|
5389
5459
|
* Pawn: `CSGameRules::m_iMaxMapTime`
|
|
5390
5460
|
*/
|
|
5391
|
-
get maxMapTime(): number { return gameCell(
|
|
5392
|
-
set maxMapTime(value: number) { setGameCell(
|
|
5461
|
+
get maxMapTime(): number { return gameCell(263); }
|
|
5462
|
+
set maxMapTime(value: number) { setGameCell(263, <i32>value); }
|
|
5393
5463
|
|
|
5394
5464
|
/**
|
|
5395
5465
|
* The number of rounds the map lasts, from `mp_maxrounds`; `0` for no limit.
|
|
5396
5466
|
*
|
|
5397
5467
|
* Pawn: `CSGameRules::m_iMaxRounds`
|
|
5398
5468
|
*/
|
|
5399
|
-
get maxRounds(): number { return gameCell(
|
|
5400
|
-
set maxRounds(value: number) { setGameCell(
|
|
5469
|
+
get maxRounds(): number { return gameCell(264); }
|
|
5470
|
+
set maxRounds(value: number) { setGameCell(264, <i32>value); }
|
|
5401
5471
|
|
|
5402
5472
|
/**
|
|
5403
5473
|
* The number of rounds played on the map.
|
|
5404
5474
|
*
|
|
5405
5475
|
* Pawn: `CSGameRules::m_iTotalRoundsPlayed`
|
|
5406
5476
|
*/
|
|
5407
|
-
get totalRoundsPlayed(): number { return gameCell(
|
|
5408
|
-
set totalRoundsPlayed(value: number) { setGameCell(
|
|
5477
|
+
get totalRoundsPlayed(): number { return gameCell(265); }
|
|
5478
|
+
set totalRoundsPlayed(value: number) { setGameCell(265, <i32>value); }
|
|
5409
5479
|
|
|
5410
5480
|
/**
|
|
5411
5481
|
* The number of rounds a side must win to end the map, from `mp_winlimit`; `0` for no limit.
|
|
5412
5482
|
*
|
|
5413
5483
|
* Pawn: `CSGameRules::m_iMaxRoundsWon`
|
|
5414
5484
|
*/
|
|
5415
|
-
get maxRoundsWon(): number { return gameCell(
|
|
5416
|
-
set maxRoundsWon(value: number) { setGameCell(
|
|
5485
|
+
get maxRoundsWon(): number { return gameCell(266); }
|
|
5486
|
+
set maxRoundsWon(value: number) { setGameCell(266, <i32>value); }
|
|
5417
5487
|
|
|
5418
5488
|
/**
|
|
5419
5489
|
* The value of `allow_spectators` the game remembers to notice when it changes.
|
|
5420
5490
|
*
|
|
5421
5491
|
* Pawn: `CSGameRules::m_iStoredSpectValue`
|
|
5422
5492
|
*/
|
|
5423
|
-
get storedSpectValue(): number { return gameCell(
|
|
5424
|
-
set storedSpectValue(value: number) { setGameCell(
|
|
5493
|
+
get storedSpectValue(): number { return gameCell(267); }
|
|
5494
|
+
set storedSpectValue(value: number) { setGameCell(267, <i32>value); }
|
|
5425
5495
|
|
|
5426
5496
|
/**
|
|
5427
5497
|
* The value of `mp_forcecamera` the game remembers to notice when it changes.
|
|
5428
5498
|
*
|
|
5429
5499
|
* Pawn: `CSGameRules::m_flForceCameraValue`
|
|
5430
5500
|
*/
|
|
5431
|
-
get forceCamera(): number { return cellFloat(gameCell(
|
|
5432
|
-
set forceCamera(value: number) { setGameCell(
|
|
5501
|
+
get forceCamera(): number { return cellFloat(gameCell(268)); }
|
|
5502
|
+
set forceCamera(value: number) { setGameCell(268, <i32>floatCell(value)); }
|
|
5433
5503
|
|
|
5434
5504
|
/**
|
|
5435
5505
|
* The value of `mp_forcechasecam` the game remembers to notice when it changes.
|
|
5436
5506
|
*
|
|
5437
5507
|
* Pawn: `CSGameRules::m_flForceChaseCamValue`
|
|
5438
5508
|
*/
|
|
5439
|
-
get forceChaseCam(): number { return cellFloat(gameCell(
|
|
5440
|
-
set forceChaseCam(value: number) { setGameCell(
|
|
5509
|
+
get forceChaseCam(): number { return cellFloat(gameCell(269)); }
|
|
5510
|
+
set forceChaseCam(value: number) { setGameCell(269, <i32>floatCell(value)); }
|
|
5441
5511
|
|
|
5442
5512
|
/**
|
|
5443
5513
|
* The value of `mp_fadetoblack` the game remembers to notice when it changes.
|
|
5444
5514
|
*
|
|
5445
5515
|
* Pawn: `CSGameRules::m_flFadeToBlackValue`
|
|
5446
5516
|
*/
|
|
5447
|
-
get fadeToBlack(): number { return cellFloat(gameCell(
|
|
5448
|
-
set fadeToBlack(value: number) { setGameCell(
|
|
5517
|
+
get fadeToBlack(): number { return cellFloat(gameCell(270)); }
|
|
5518
|
+
set fadeToBlack(value: number) { setGameCell(270, <i32>floatCell(value)); }
|
|
5449
5519
|
|
|
5450
5520
|
/**
|
|
5451
5521
|
* The VIP on an assassination map, a player `id`; `0` for none.
|
|
5452
5522
|
*
|
|
5453
5523
|
* Pawn: `CSGameRules::m_pVIP`
|
|
5454
5524
|
*/
|
|
5455
|
-
get vip(): number { return gameCell(
|
|
5456
|
-
set vip(value: number) { setGameCell(
|
|
5525
|
+
get vip(): number { return gameCell(271); }
|
|
5526
|
+
set vip(value: number) { setGameCell(271, <i32>value); }
|
|
5457
5527
|
|
|
5458
5528
|
/**
|
|
5459
5529
|
* The game time the intermission at the map's end is over and the next map loads.
|
|
5460
5530
|
*
|
|
5461
5531
|
* Pawn: `CSGameRules::m_flIntermissionEndTime`
|
|
5462
5532
|
*/
|
|
5463
|
-
get intermissionEndTime(): number { return cellFloat(gameCell(
|
|
5464
|
-
set intermissionEndTime(value: number) { setGameCell(
|
|
5533
|
+
get intermissionEndTime(): number { return cellFloat(gameCell(272)); }
|
|
5534
|
+
set intermissionEndTime(value: number) { setGameCell(272, <i32>floatCell(value)); }
|
|
5465
5535
|
|
|
5466
5536
|
/**
|
|
5467
5537
|
* The game time the intermission at the map's end began.
|
|
5468
5538
|
*
|
|
5469
5539
|
* Pawn: `CSGameRules::m_flIntermissionStartTime`
|
|
5470
5540
|
*/
|
|
5471
|
-
get intermissionStartTime(): number { return cellFloat(gameCell(
|
|
5472
|
-
set intermissionStartTime(value: number) { setGameCell(
|
|
5541
|
+
get intermissionStartTime(): number { return cellFloat(gameCell(273)); }
|
|
5542
|
+
set intermissionStartTime(value: number) { setGameCell(273, <i32>floatCell(value)); }
|
|
5473
5543
|
|
|
5474
5544
|
/**
|
|
5475
5545
|
* `true` once a player has pressed a button to end the intermission early.
|
|
5476
5546
|
*
|
|
5477
5547
|
* Pawn: `CSGameRules::m_iEndIntermissionButtonHit`
|
|
5478
5548
|
*/
|
|
5479
|
-
get intermissionSkipped(): boolean { return gameCell(
|
|
5480
|
-
set intermissionSkipped(value: boolean) { setGameCell(
|
|
5549
|
+
get intermissionSkipped(): boolean { return gameCell(274) != 0; }
|
|
5550
|
+
set intermissionSkipped(value: boolean) { setGameCell(274, value ? 1 : 0); }
|
|
5481
5551
|
|
|
5482
5552
|
/**
|
|
5483
5553
|
* The game time of the game's next periodic check of its limits and cvars.
|
|
5484
5554
|
*
|
|
5485
5555
|
* Pawn: `CSGameRules::m_tmNextPeriodicThink`
|
|
5486
5556
|
*/
|
|
5487
|
-
get nextPeriodicThink(): number { return cellFloat(gameCell(
|
|
5488
|
-
set nextPeriodicThink(value: number) { setGameCell(
|
|
5557
|
+
get nextPeriodicThink(): number { return cellFloat(gameCell(275)); }
|
|
5558
|
+
set nextPeriodicThink(value: number) { setGameCell(275, <i32>floatCell(value)); }
|
|
5489
5559
|
|
|
5490
5560
|
/**
|
|
5491
5561
|
* `true` once the game has begun: both sides have had players. Until then a round ends with “Game Commencing”.
|
|
5492
5562
|
*
|
|
5493
5563
|
* Pawn: `CSGameRules::m_bGameStarted`
|
|
5494
5564
|
*/
|
|
5495
|
-
get gameStarted(): boolean { return gameCell(
|
|
5496
|
-
set gameStarted(value: boolean) { setGameCell(
|
|
5565
|
+
get gameStarted(): boolean { return gameCell(276) != 0; }
|
|
5566
|
+
set gameStarted(value: boolean) { setGameCell(276, value ? 1 : 0); }
|
|
5497
5567
|
|
|
5498
5568
|
/**
|
|
5499
5569
|
* `true` when the next round starts without respawning the players.
|
|
5500
5570
|
*
|
|
5501
5571
|
* Pawn: `CSGameRules::m_bSkipSpawn`
|
|
5502
5572
|
*/
|
|
5503
|
-
get skipSpawn(): boolean { return gameCell(
|
|
5504
|
-
set skipSpawn(value: boolean) { setGameCell(
|
|
5573
|
+
get skipSpawn(): boolean { return gameCell(277) != 0; }
|
|
5574
|
+
set skipSpawn(value: boolean) { setGameCell(277, value ? 1 : 0); }
|
|
5505
5575
|
|
|
5506
5576
|
/**
|
|
5507
5577
|
* `true` while a joining player is not shown the team menu.
|
|
5508
5578
|
*
|
|
5509
5579
|
* Pawn: `CSGameRules::m_bSkipShowMenu`
|
|
5510
5580
|
*/
|
|
5511
|
-
get skipShowMenu(): boolean { return
|
|
5512
|
-
set skipShowMenu(value: boolean) {
|
|
5581
|
+
get skipShowMenu(): boolean { return regameCell(278, "skipShowMenu") != 0; }
|
|
5582
|
+
set skipShowMenu(value: boolean) { setRegameCell(278, "skipShowMenu", value ? 1 : 0); }
|
|
5513
5583
|
|
|
5514
5584
|
/**
|
|
5515
5585
|
* `true` while the game waits for players because a side is empty.
|
|
5516
5586
|
*
|
|
5517
5587
|
* Pawn: `CSGameRules::m_bNeededPlayers`
|
|
5518
5588
|
*/
|
|
5519
|
-
get neededPlayers(): boolean { return
|
|
5520
|
-
set neededPlayers(value: boolean) {
|
|
5589
|
+
get neededPlayers(): boolean { return regameCell(279, "neededPlayers") != 0; }
|
|
5590
|
+
set neededPlayers(value: boolean) { setRegameCell(279, "neededPlayers", value ? 1 : 0); }
|
|
5521
5591
|
|
|
5522
5592
|
/**
|
|
5523
5593
|
* The share of terrorists, `0` to `1`, who have escaped this round.
|
|
5524
5594
|
*
|
|
5525
5595
|
* Pawn: `CSGameRules::m_flEscapeRatio`
|
|
5526
5596
|
*/
|
|
5527
|
-
get escapeRatio(): number { return cellFloat(
|
|
5528
|
-
set escapeRatio(value: number) {
|
|
5597
|
+
get escapeRatio(): number { return cellFloat(regameCell(280, "escapeRatio")); }
|
|
5598
|
+
set escapeRatio(value: number) { setRegameCell(280, "escapeRatio", <i32>floatCell(value)); }
|
|
5529
5599
|
|
|
5530
5600
|
/**
|
|
5531
5601
|
* The game time the map ends by `mp_timelimit`; `0` for no limit.
|
|
5532
5602
|
*
|
|
5533
5603
|
* Pawn: `CSGameRules::m_flTimeLimit`
|
|
5534
5604
|
*/
|
|
5535
|
-
get timeLimit(): number { return cellFloat(
|
|
5536
|
-
set timeLimit(value: number) {
|
|
5605
|
+
get timeLimit(): number { return cellFloat(regameCell(281, "timeLimit", timeLimitHlds)); }
|
|
5606
|
+
set timeLimit(value: number) { setRegameCell(281, "timeLimit", <i32>floatCell(value), setTimeLimitHlds); }
|
|
5537
5607
|
|
|
5538
5608
|
/**
|
|
5539
5609
|
* The game time the game began, after “Game Commencing”.
|
|
5540
5610
|
*
|
|
5541
5611
|
* Pawn: `CSGameRules::m_flGameStartTime`
|
|
5542
5612
|
*/
|
|
5543
|
-
get gameStartTime(): number { return cellFloat(
|
|
5544
|
-
set gameStartTime(value: number) {
|
|
5613
|
+
get gameStartTime(): number { return cellFloat(regameCell(282, "gameStartTime", gameStartTimeHlds)); }
|
|
5614
|
+
set gameStartTime(value: number) { setRegameCell(282, "gameStartTime", <i32>floatCell(value), setGameStartTimeHlds); }
|
|
5545
5615
|
|
|
5546
5616
|
/**
|
|
5547
5617
|
* `true` when the sides were balanced at this round's start.
|
|
5548
5618
|
*
|
|
5549
5619
|
* Pawn: `CSGameRules::m_bTeamBalanced`
|
|
5550
5620
|
*/
|
|
5551
|
-
get teamBalanced(): boolean { return
|
|
5552
|
-
set teamBalanced(value: boolean) {
|
|
5621
|
+
get teamBalanced(): boolean { return regameCell(283, "teamBalanced") != 0; }
|
|
5622
|
+
set teamBalanced(value: boolean) { setRegameCell(283, "teamBalanced", value ? 1 : 0); }
|
|
5553
5623
|
}
|
|
5554
5624
|
|
|
5555
5625
|
/** What a weapon is, by the name CS gives it without the WEAPON_ prefix. */
|
|
@@ -5640,7 +5710,7 @@ export class Weapon extends Entity {
|
|
|
5640
5710
|
*
|
|
5641
5711
|
* Pawn: `pev->classname`, `get_weaponname`
|
|
5642
5712
|
*/
|
|
5643
|
-
get classname(): WeaponName { return
|
|
5713
|
+
get classname(): WeaponName { return keptText(this.id, 0, EV_SZ_classname) as WeaponName; }
|
|
5644
5714
|
set classname(value: WeaponName) { entity_set_string(this.id, EV_SZ_classname, value); }
|
|
5645
5715
|
|
|
5646
5716
|
/**
|
|
@@ -5649,8 +5719,8 @@ export class Weapon extends Entity {
|
|
|
5649
5719
|
* Pawn: `CBasePlayerItem::m_pPlayer`
|
|
5650
5720
|
*/
|
|
5651
5721
|
get player(): Player | null {
|
|
5652
|
-
const index = memberCell(this.id,
|
|
5653
|
-
return index > 0 ?
|
|
5722
|
+
const index = memberCell(this.id, 284);
|
|
5723
|
+
return index > 0 ? __playerOf(index) : null;
|
|
5654
5724
|
}
|
|
5655
5725
|
|
|
5656
5726
|
/**
|
|
@@ -5668,232 +5738,232 @@ export class Weapon extends Entity {
|
|
|
5668
5738
|
*
|
|
5669
5739
|
* Pawn: `CBasePlayerWeapon::m_iPlayEmptySound` (reapi `m_Weapon_iPlayEmptySound`)
|
|
5670
5740
|
*/
|
|
5671
|
-
get playEmptySound(): number { return memberCell(this.id,
|
|
5672
|
-
set playEmptySound(value: number) { setMemberCell(this.id,
|
|
5741
|
+
get playEmptySound(): number { return memberCell(this.id, 285); }
|
|
5742
|
+
set playEmptySound(value: number) { setMemberCell(this.id, 285, <i32>value); }
|
|
5673
5743
|
|
|
5674
5744
|
/**
|
|
5675
5745
|
* The weapon's “firing on empty” mark: `1` while the player holds attack with an empty clip.
|
|
5676
5746
|
*
|
|
5677
5747
|
* Pawn: `CBasePlayerWeapon::m_fFireOnEmpty` (reapi `m_Weapon_fFireOnEmpty`)
|
|
5678
5748
|
*/
|
|
5679
|
-
get fireOnEmpty(): number { return memberCell(this.id,
|
|
5680
|
-
set fireOnEmpty(value: number) { setMemberCell(this.id,
|
|
5749
|
+
get fireOnEmpty(): number { return memberCell(this.id, 286); }
|
|
5750
|
+
set fireOnEmpty(value: number) { setMemberCell(this.id, 286, <i32>value); }
|
|
5681
5751
|
|
|
5682
5752
|
/**
|
|
5683
5753
|
* The time until the weapon can fire again, in seconds, counting down by itself: about `0.1` after an AK-47 shot, `1.45` after an AWP one.
|
|
5684
5754
|
*
|
|
5685
5755
|
* Pawn: `CBasePlayerWeapon::m_flNextPrimaryAttack` (reapi `m_Weapon_flNextPrimaryAttack`)
|
|
5686
5756
|
*/
|
|
5687
|
-
get nextPrimaryAttack(): number { return cellFloat(memberCell(this.id,
|
|
5688
|
-
set nextPrimaryAttack(value: number) { setMemberCell(this.id,
|
|
5757
|
+
get nextPrimaryAttack(): number { return cellFloat(memberCell(this.id, 287)); }
|
|
5758
|
+
set nextPrimaryAttack(value: number) { setMemberCell(this.id, 287, <i32>floatCell(value)); }
|
|
5689
5759
|
|
|
5690
5760
|
/**
|
|
5691
5761
|
* The time until the weapon's secondary attack (zoom, silencer, burst mode) works again, in seconds, counting down by itself.
|
|
5692
5762
|
*
|
|
5693
5763
|
* Pawn: `CBasePlayerWeapon::m_flNextSecondaryAttack` (reapi `m_Weapon_flNextSecondaryAttack`)
|
|
5694
5764
|
*/
|
|
5695
|
-
get nextSecondaryAttack(): number { return cellFloat(memberCell(this.id,
|
|
5696
|
-
set nextSecondaryAttack(value: number) { setMemberCell(this.id,
|
|
5765
|
+
get nextSecondaryAttack(): number { return cellFloat(memberCell(this.id, 288)); }
|
|
5766
|
+
set nextSecondaryAttack(value: number) { setMemberCell(this.id, 288, <i32>floatCell(value)); }
|
|
5697
5767
|
|
|
5698
5768
|
/**
|
|
5699
5769
|
* The time until the weapon plays its idle animation, in seconds, counting down by itself.
|
|
5700
5770
|
*
|
|
5701
5771
|
* Pawn: `CBasePlayerWeapon::m_flTimeWeaponIdle` (reapi `m_Weapon_flTimeWeaponIdle`)
|
|
5702
5772
|
*/
|
|
5703
|
-
get nextIdle(): number { return cellFloat(memberCell(this.id,
|
|
5704
|
-
set nextIdle(value: number) { setMemberCell(this.id,
|
|
5773
|
+
get nextIdle(): number { return cellFloat(memberCell(this.id, 289)); }
|
|
5774
|
+
set nextIdle(value: number) { setMemberCell(this.id, 289, <i32>floatCell(value)); }
|
|
5705
5775
|
|
|
5706
5776
|
/**
|
|
5707
5777
|
* The weapon's ammo kind — the slot of the player's ammo it takes from; `-1` for none (a knife).
|
|
5708
5778
|
*
|
|
5709
5779
|
* Pawn: `CBasePlayerWeapon::m_iPrimaryAmmoType` (reapi `m_Weapon_iPrimaryAmmoType`)
|
|
5710
5780
|
*/
|
|
5711
|
-
get ammoType(): number { return memberCell(this.id,
|
|
5712
|
-
set ammoType(value: number) { setMemberCell(this.id,
|
|
5781
|
+
get ammoType(): number { return memberCell(this.id, 290); }
|
|
5782
|
+
set ammoType(value: number) { setMemberCell(this.id, 290, <i32>value); }
|
|
5713
5783
|
|
|
5714
5784
|
/**
|
|
5715
5785
|
* The weapon's secondary ammo slot; CS weapons have none (`-1`).
|
|
5716
5786
|
*
|
|
5717
5787
|
* Pawn: `CBasePlayerWeapon::m_iSecondaryAmmoType` (reapi `m_Weapon_iSecondaryAmmoType`)
|
|
5718
5788
|
*/
|
|
5719
|
-
get secondaryAmmoType(): number { return memberCell(this.id,
|
|
5720
|
-
set secondaryAmmoType(value: number) { setMemberCell(this.id,
|
|
5789
|
+
get secondaryAmmoType(): number { return memberCell(this.id, 291); }
|
|
5790
|
+
set secondaryAmmoType(value: number) { setMemberCell(this.id, 291, <i32>value); }
|
|
5721
5791
|
|
|
5722
5792
|
/**
|
|
5723
5793
|
* The rounds in the weapon's magazine: `30` in a full AK-47; `-1` for the knife, which has none.
|
|
5724
5794
|
*
|
|
5725
5795
|
* Pawn: `CBasePlayerWeapon::m_iClip` (reapi `m_Weapon_iClip`)
|
|
5726
5796
|
*/
|
|
5727
|
-
get clip(): number { return memberCell(this.id,
|
|
5728
|
-
set clip(value: number) { setMemberCell(this.id,
|
|
5797
|
+
get clip(): number { return memberCell(this.id, 292); }
|
|
5798
|
+
set clip(value: number) { setMemberCell(this.id, 292, <i32>value); }
|
|
5729
5799
|
|
|
5730
5800
|
/**
|
|
5731
5801
|
* The clip last sent to the player's HUD; when it differs from clip, the game sends the new one.
|
|
5732
5802
|
*
|
|
5733
5803
|
* Pawn: `CBasePlayerWeapon::m_iClientClip` (reapi `m_Weapon_iClientClip`)
|
|
5734
5804
|
*/
|
|
5735
|
-
get clipSent(): number { return memberCell(this.id,
|
|
5736
|
-
set clipSent(value: number) { setMemberCell(this.id,
|
|
5805
|
+
get clipSent(): number { return memberCell(this.id, 293); }
|
|
5806
|
+
set clipSent(value: number) { setMemberCell(this.id, 293, <i32>value); }
|
|
5737
5807
|
|
|
5738
5808
|
/**
|
|
5739
5809
|
* The weapon's state (held or not) last sent to the player's HUD.
|
|
5740
5810
|
*
|
|
5741
5811
|
* Pawn: `CBasePlayerWeapon::m_iClientWeaponState` (reapi `m_Weapon_iClientWeaponState`)
|
|
5742
5812
|
*/
|
|
5743
|
-
get clientWeaponState(): number { return memberCell(this.id,
|
|
5744
|
-
set clientWeaponState(value: number) { setMemberCell(this.id,
|
|
5813
|
+
get clientWeaponState(): number { return memberCell(this.id, 294); }
|
|
5814
|
+
set clientWeaponState(value: number) { setMemberCell(this.id, 294, <i32>value); }
|
|
5745
5815
|
|
|
5746
5816
|
/**
|
|
5747
5817
|
* The weapon's reload mark: `1` while it is reloading.
|
|
5748
5818
|
*
|
|
5749
5819
|
* Pawn: `CBasePlayerWeapon::m_fInReload` (reapi `m_Weapon_fInReload`)
|
|
5750
5820
|
*/
|
|
5751
|
-
get isReloading(): number { return memberCell(this.id,
|
|
5752
|
-
set isReloading(value: number) { setMemberCell(this.id,
|
|
5821
|
+
get isReloading(): number { return memberCell(this.id, 295); }
|
|
5822
|
+
set isReloading(value: number) { setMemberCell(this.id, 295, <i32>value); }
|
|
5753
5823
|
|
|
5754
5824
|
/**
|
|
5755
5825
|
* The shotgun's shell-by-shell reload stage: `0` not reloading, `1` starting, `2` putting a shell in.
|
|
5756
5826
|
*
|
|
5757
5827
|
* Pawn: `CBasePlayerWeapon::m_fInSpecialReload` (reapi `m_Weapon_fInSpecialReload`)
|
|
5758
5828
|
*/
|
|
5759
|
-
get shotgunReloadStage(): number { return memberCell(this.id,
|
|
5760
|
-
set shotgunReloadStage(value: number) { setMemberCell(this.id,
|
|
5829
|
+
get shotgunReloadStage(): number { return memberCell(this.id, 296); }
|
|
5830
|
+
set shotgunReloadStage(value: number) { setMemberCell(this.id, 296, <i32>value); }
|
|
5761
5831
|
|
|
5762
5832
|
/**
|
|
5763
5833
|
* The ammo the weapon gives when first picked up; `0` for one dropped by a player (only its clip).
|
|
5764
5834
|
*
|
|
5765
5835
|
* Pawn: `CBasePlayerWeapon::m_iDefaultAmmo` (reapi `m_Weapon_iDefaultAmmo`)
|
|
5766
5836
|
*/
|
|
5767
|
-
get defaultAmmo(): number { return memberCell(this.id,
|
|
5768
|
-
set defaultAmmo(value: number) { setMemberCell(this.id,
|
|
5837
|
+
get defaultAmmo(): number { return memberCell(this.id, 297); }
|
|
5838
|
+
set defaultAmmo(value: number) { setMemberCell(this.id, 297, <i32>value); }
|
|
5769
5839
|
|
|
5770
5840
|
/**
|
|
5771
5841
|
* The shell casing model the weapon throws out (precached).
|
|
5772
5842
|
*
|
|
5773
5843
|
* Pawn: `CBasePlayerWeapon::m_iShellId` (reapi `m_Weapon_iShellId`)
|
|
5774
5844
|
*/
|
|
5775
|
-
get shellId(): number { return memberCell(this.id,
|
|
5776
|
-
set shellId(value: number) { setMemberCell(this.id,
|
|
5845
|
+
get shellId(): number { return memberCell(this.id, 298); }
|
|
5846
|
+
set shellId(value: number) { setMemberCell(this.id, 298, <i32>value); }
|
|
5777
5847
|
|
|
5778
5848
|
/**
|
|
5779
5849
|
* `true` from a shot until the attack button is let go; this way tapping the button does not keep single-shot accuracy.
|
|
5780
5850
|
*
|
|
5781
5851
|
* Pawn: `CBasePlayerWeapon::m_bDelayFire` (reapi `m_Weapon_bDelayFire`)
|
|
5782
5852
|
*/
|
|
5783
|
-
get delayFire(): boolean { return memberCell(this.id,
|
|
5784
|
-
set delayFire(value: boolean) { setMemberCell(this.id,
|
|
5853
|
+
get delayFire(): boolean { return memberCell(this.id, 299) != 0; }
|
|
5854
|
+
set delayFire(value: boolean) { setMemberCell(this.id, 299, value ? 1 : 0); }
|
|
5785
5855
|
|
|
5786
5856
|
/**
|
|
5787
5857
|
* The side the weapon's recoil pulls to next, left or right; it flips from time to time.
|
|
5788
5858
|
*
|
|
5789
5859
|
* Pawn: `CBasePlayerWeapon::m_iDirection` (reapi `m_Weapon_iDirection`)
|
|
5790
5860
|
*/
|
|
5791
|
-
get direction(): number { return memberCell(this.id,
|
|
5792
|
-
set direction(value: number) { setMemberCell(this.id,
|
|
5861
|
+
get direction(): number { return memberCell(this.id, 300); }
|
|
5862
|
+
set direction(value: number) { setMemberCell(this.id, 300, <i32>value); }
|
|
5793
5863
|
|
|
5794
5864
|
/**
|
|
5795
5865
|
* The weapon's flag meant for a second silencer. CS does not use the field.
|
|
5796
5866
|
*
|
|
5797
5867
|
* Pawn: `CBasePlayerWeapon::m_bSecondarySilencerOn` (reapi `m_Weapon_bSecondarySilencerOn`)
|
|
5798
5868
|
*/
|
|
5799
|
-
get secondarySilencerOn(): boolean { return memberCell(this.id,
|
|
5800
|
-
set secondarySilencerOn(value: boolean) { setMemberCell(this.id,
|
|
5869
|
+
get secondarySilencerOn(): boolean { return memberCell(this.id, 301) != 0; }
|
|
5870
|
+
set secondarySilencerOn(value: boolean) { setMemberCell(this.id, 301, value ? 1 : 0); }
|
|
5801
5871
|
|
|
5802
5872
|
/**
|
|
5803
5873
|
* The weapon's current inaccuracy: it grows as it fires and settles back; each weapon has its own range (`0.2` for a fresh AK-47).
|
|
5804
5874
|
*
|
|
5805
5875
|
* Pawn: `CBasePlayerWeapon::m_flAccuracy` (reapi `m_Weapon_flAccuracy`)
|
|
5806
5876
|
*/
|
|
5807
|
-
get accuracy(): number { return cellFloat(memberCell(this.id,
|
|
5808
|
-
set accuracy(value: number) { setMemberCell(this.id,
|
|
5877
|
+
get accuracy(): number { return cellFloat(memberCell(this.id, 302)); }
|
|
5878
|
+
set accuracy(value: number) { setMemberCell(this.id, 302, <i32>floatCell(value)); }
|
|
5809
5879
|
|
|
5810
5880
|
/**
|
|
5811
5881
|
* The shots in the weapon's current burst; the recoil grows with it, and it drops back once the player stops firing.
|
|
5812
5882
|
*
|
|
5813
5883
|
* Pawn: `CBasePlayerWeapon::m_iShotsFired` (reapi `m_Weapon_iShotsFired`)
|
|
5814
5884
|
*/
|
|
5815
|
-
get shotsFired(): number { return memberCell(this.id,
|
|
5816
|
-
set shotsFired(value: number) { setMemberCell(this.id,
|
|
5885
|
+
get shotsFired(): number { return memberCell(this.id, 303); }
|
|
5886
|
+
set shotsFired(value: number) { setMemberCell(this.id, 303, <i32>value); }
|
|
5817
5887
|
|
|
5818
5888
|
/**
|
|
5819
5889
|
* The game time of the next round in the Glock's burst; `0` when not bursting.
|
|
5820
5890
|
*
|
|
5821
5891
|
* Pawn: `CBasePlayerWeapon::m_flGlock18Shoot` (reapi `m_Weapon_flGlock18Shoot`)
|
|
5822
5892
|
*/
|
|
5823
|
-
get glockNextBurstShot(): number { return cellFloat(memberCell(this.id,
|
|
5824
|
-
set glockNextBurstShot(value: number) { setMemberCell(this.id,
|
|
5893
|
+
get glockNextBurstShot(): number { return cellFloat(memberCell(this.id, 304)); }
|
|
5894
|
+
set glockNextBurstShot(value: number) { setMemberCell(this.id, 304, <i32>floatCell(value)); }
|
|
5825
5895
|
|
|
5826
5896
|
/**
|
|
5827
5897
|
* The rounds the Glock has fired in the current burst.
|
|
5828
5898
|
*
|
|
5829
5899
|
* Pawn: `CBasePlayerWeapon::m_iGlock18ShotsFired` (reapi `m_Weapon_iGlock18ShotsFired`)
|
|
5830
5900
|
*/
|
|
5831
|
-
get glockBurstShots(): number { return memberCell(this.id,
|
|
5832
|
-
set glockBurstShots(value: number) { setMemberCell(this.id,
|
|
5901
|
+
get glockBurstShots(): number { return memberCell(this.id, 305); }
|
|
5902
|
+
set glockBurstShots(value: number) { setMemberCell(this.id, 305, <i32>value); }
|
|
5833
5903
|
|
|
5834
5904
|
/**
|
|
5835
5905
|
* The game time of the next round in the FAMAS's burst; `0` when not bursting.
|
|
5836
5906
|
*
|
|
5837
5907
|
* Pawn: `CBasePlayerWeapon::m_flFamasShoot` (reapi `m_Weapon_flFamasShoot`)
|
|
5838
5908
|
*/
|
|
5839
|
-
get famasNextBurstShot(): number { return cellFloat(memberCell(this.id,
|
|
5840
|
-
set famasNextBurstShot(value: number) { setMemberCell(this.id,
|
|
5909
|
+
get famasNextBurstShot(): number { return cellFloat(memberCell(this.id, 306)); }
|
|
5910
|
+
set famasNextBurstShot(value: number) { setMemberCell(this.id, 306, <i32>floatCell(value)); }
|
|
5841
5911
|
|
|
5842
5912
|
/**
|
|
5843
5913
|
* The rounds the FAMAS has fired in the current burst.
|
|
5844
5914
|
*
|
|
5845
5915
|
* Pawn: `CBasePlayerWeapon::m_iFamasShotsFired` (reapi `m_Weapon_iFamasShotsFired`)
|
|
5846
5916
|
*/
|
|
5847
|
-
get famasBurstShots(): number { return memberCell(this.id,
|
|
5848
|
-
set famasBurstShots(value: number) { setMemberCell(this.id,
|
|
5917
|
+
get famasBurstShots(): number { return memberCell(this.id, 307); }
|
|
5918
|
+
set famasBurstShots(value: number) { setMemberCell(this.id, 307, <i32>value); }
|
|
5849
5919
|
|
|
5850
5920
|
/**
|
|
5851
5921
|
* The spread of the FAMAS's burst, kept for its later rounds.
|
|
5852
5922
|
*
|
|
5853
5923
|
* Pawn: `CBasePlayerWeapon::m_fBurstSpread` (reapi `m_Weapon_fBurstSpread`)
|
|
5854
5924
|
*/
|
|
5855
|
-
get burstSpread(): number { return cellFloat(memberCell(this.id,
|
|
5856
|
-
set burstSpread(value: number) { setMemberCell(this.id,
|
|
5925
|
+
get burstSpread(): number { return cellFloat(memberCell(this.id, 308)); }
|
|
5926
|
+
set burstSpread(value: number) { setMemberCell(this.id, 308, <i32>floatCell(value)); }
|
|
5857
5927
|
|
|
5858
5928
|
/**
|
|
5859
5929
|
* The weapon's modes, a list of any of: `"uspSilenced"` - the USP's silencer is on, `"glock18Burst"` - the Glock fires bursts, `"m4a1Silenced"` - the M4A1's silencer is on, `"eliteLeft"` - the Elites fire the left gun next, `"famasBurst"` - the FAMAS fires bursts, `"shieldDrawn"` - the shield is up.
|
|
5860
5930
|
*
|
|
5861
5931
|
* Pawn: `CBasePlayerWeapon::m_iWeaponState` (reapi `m_Weapon_iWeaponState`), `WPNSTATE_*`
|
|
5862
5932
|
*/
|
|
5863
|
-
get weaponState(): WeaponState[] { return flagList<WeaponState>(new MemberFlags(this.id,
|
|
5864
|
-
set weaponState(values: WeaponState[]) { setMemberCell(this.id,
|
|
5933
|
+
get weaponState(): WeaponState[] { return flagList<WeaponState>(new MemberFlags(this.id, 309), WEAPON_STATE); }
|
|
5934
|
+
set weaponState(values: WeaponState[]) { setMemberCell(this.id, 309, WEAPON_STATE.maskOf(values)); }
|
|
5865
5935
|
|
|
5866
5936
|
/**
|
|
5867
5937
|
* The time until the shotgun's next shell goes in during its reload, in seconds, counting down.
|
|
5868
5938
|
*
|
|
5869
5939
|
* Pawn: `CBasePlayerWeapon::m_flNextReload` (reapi `m_Weapon_flNextReload`)
|
|
5870
5940
|
*/
|
|
5871
|
-
get nextReload(): number { return cellFloat(memberCell(this.id,
|
|
5872
|
-
set nextReload(value: number) { setMemberCell(this.id,
|
|
5941
|
+
get nextReload(): number { return cellFloat(memberCell(this.id, 310)); }
|
|
5942
|
+
set nextReload(value: number) { setMemberCell(this.id, 310, <i32>floatCell(value)); }
|
|
5873
5943
|
|
|
5874
5944
|
/**
|
|
5875
5945
|
* The game time when `shotsFired` next goes down by one after the player stops firing.
|
|
5876
5946
|
*
|
|
5877
5947
|
* Pawn: `CBasePlayerWeapon::m_flDecreaseShotsFired` (reapi `m_Weapon_flDecreaseShotsFired`)
|
|
5878
5948
|
*/
|
|
5879
|
-
get recoilResetTime(): number { return cellFloat(memberCell(this.id,
|
|
5880
|
-
set recoilResetTime(value: number) { setMemberCell(this.id,
|
|
5949
|
+
get recoilResetTime(): number { return cellFloat(memberCell(this.id, 311)); }
|
|
5950
|
+
set recoilResetTime(value: number) { setMemberCell(this.id, 311, <i32>floatCell(value)); }
|
|
5881
5951
|
|
|
5882
5952
|
/**
|
|
5883
5953
|
* The delay between the weapon's last two shots, in seconds; the game uses it to keep the fire rate even.
|
|
5884
5954
|
*
|
|
5885
5955
|
* Pawn: `CBasePlayerWeapon::m_flPrevPrimaryAttack` (reapi `m_Weapon_flPrevPrimaryAttack`)
|
|
5886
5956
|
*/
|
|
5887
|
-
get prevPrimaryAttack(): number { return cellFloat(memberCell(this.id,
|
|
5888
|
-
set prevPrimaryAttack(value: number) { setMemberCell(this.id,
|
|
5957
|
+
get prevPrimaryAttack(): number { return cellFloat(memberCell(this.id, 312)); }
|
|
5958
|
+
set prevPrimaryAttack(value: number) { setMemberCell(this.id, 312, <i32>floatCell(value)); }
|
|
5889
5959
|
|
|
5890
5960
|
/**
|
|
5891
5961
|
* The game time of the weapon's last shot; `0` before the first one.
|
|
5892
5962
|
*
|
|
5893
5963
|
* Pawn: `CBasePlayerWeapon::m_flLastFireTime` (reapi `m_Weapon_flLastFireTime`)
|
|
5894
5964
|
*/
|
|
5895
|
-
get lastFireTime(): number { return cellFloat(memberCell(this.id,
|
|
5896
|
-
set lastFireTime(value: number) { setMemberCell(this.id,
|
|
5965
|
+
get lastFireTime(): number { return cellFloat(memberCell(this.id, 313)); }
|
|
5966
|
+
set lastFireTime(value: number) { setMemberCell(this.id, 313, <i32>floatCell(value)); }
|
|
5897
5967
|
|
|
5898
5968
|
/**
|
|
5899
5969
|
* Gives the weapon to the player, as picking it up does; `true` when he took it.
|