Merge branch 'master' into terencehill/menu_hudskin_selector
authorterencehill <piuntn@gmail.com>
Tue, 8 Dec 2015 14:33:21 +0000 (15:33 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 8 Dec 2015 14:33:21 +0000 (15:33 +0100)
203 files changed:
defaultXonotic.cfg
minigames/bulldozer/storage_level6.txt
minigames/bulldozer/storage_level7.txt [new file with mode: 0644]
minigames/bulldozer/storage_level8.txt [new file with mode: 0644]
minigames/bulldozer/storage_level9.txt [new file with mode: 0644]
qcsrc/Makefile
qcsrc/client/announcer.qc
qcsrc/client/defs.qh
qcsrc/client/hook.qc
qcsrc/client/hud/hud.qh
qcsrc/client/hud/panel/ammo.qc
qcsrc/client/hud/panel/healtharmor.qc
qcsrc/client/hud/panel/infomessages.qc
qcsrc/client/hud/panel/modicons.qc
qcsrc/client/hud/panel/notify.qc
qcsrc/client/hud/panel/powerups.qc
qcsrc/client/hud/panel/pressedkeys.qc
qcsrc/client/hud/panel/radar.qc
qcsrc/client/hud/panel/score.qc
qcsrc/client/hud/panel/timer.qc
qcsrc/client/hud/panel/weapons.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/progs.inc
qcsrc/client/quickmenu.qc
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/view.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/anim.qc [new file with mode: 0644]
qcsrc/common/anim.qh [new file with mode: 0644]
qcsrc/common/command/all.qh
qcsrc/common/command/command.qh
qcsrc/common/command/generic.qc
qcsrc/common/constants.qh
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/deathtypes/all.qh
qcsrc/common/debug.qh
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/globalsound.qh
qcsrc/common/ent_cs.qc
qcsrc/common/ent_cs.qh
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/impulses/all.qc [new file with mode: 0644]
qcsrc/common/impulses/all.qh [new file with mode: 0644]
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigame/c4.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/pong.qc
qcsrc/common/minigames/minigame/pp.qc
qcsrc/common/minigames/minigame/ps.qc
qcsrc/common/minigames/minigame/snake.qc
qcsrc/common/minigames/minigame/ttt.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/minigames/sv_minigames.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/movetypes/movetypes.qc
qcsrc/common/movetypes/movetypes.qh
qcsrc/common/movetypes/toss.qc
qcsrc/common/movetypes/walk.qc
qcsrc/common/mutators/base.qh
qcsrc/common/mutators/events.qh
qcsrc/common/mutators/mutator/buffs/all.qh
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/buffs/module.inc
qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc
qcsrc/common/mutators/mutator/dodging/dodging.qc
qcsrc/common/mutators/mutator/doublejump/doublejump.qc
qcsrc/common/mutators/mutator/multijump/multijump.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/nades/nades.qh
qcsrc/common/mutators/mutator/new_toys/new_toys.qc
qcsrc/common/mutators/mutator/nix/nix.qc
qcsrc/common/mutators/mutator/overkill/hmg.qc
qcsrc/common/mutators/mutator/overkill/module.inc
qcsrc/common/mutators/mutator/overkill/overkill.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/mutators/mutator/pinata/pinata.qc
qcsrc/common/mutators/mutator/spawn_near_teammate/spawn_near_teammate.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/physics.qc
qcsrc/common/physics.qh
qcsrc/common/playerstats.qc
qcsrc/common/sounds/sound.qh
qcsrc/common/stats.qh
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/ladder.qc
qcsrc/common/triggers/func/plat.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/misc/teleport_dest.qc
qcsrc/common/triggers/subs.qh
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/teleporters.qh
qcsrc/common/triggers/trigger/impulse.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/keylock.qc
qcsrc/common/triggers/trigger/secret.qh
qcsrc/common/triggers/trigger/swamp.qc
qcsrc/common/triggers/trigger/teleport.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/triggers/triggers.qh
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/vehicles/all.qc
qcsrc/common/vehicles/cl_vehicles.qc
qcsrc/common/vehicles/cl_vehicles.qh
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qh
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/doc.md [new file with mode: 0644]
qcsrc/lib/_all.inc
qcsrc/lib/arraylist.qh
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/lib/enumclass.qh [new file with mode: 0644]
qcsrc/lib/i18n.qh
qcsrc/lib/iter.qh
qcsrc/lib/linkedlist.qh
qcsrc/lib/log.qh
qcsrc/lib/net.qh
qcsrc/lib/oo.qh
qcsrc/lib/registry.qh
qcsrc/lib/stats.qh
qcsrc/lib/unsafe.qh [new file with mode: 0644]
qcsrc/lib/vector.qh
qcsrc/lib/warpzone/client.qc
qcsrc/lib/warpzone/server.qc
qcsrc/lib/warpzone/server.qh
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/weaponslist.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/cheats.qc
qcsrc/server/cheats.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_client.qh
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_impulse.qh
qcsrc/server/cl_player.qc
qcsrc/server/command/all.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qh
qcsrc/server/command/sv_cmd.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_subs.qc
qcsrc/server/g_subs.qh
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/gamemode.qh
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/mutators/mutator/gamemode_tdm.qc
qcsrc/server/playerdemo.qc
qcsrc/server/progs.inc
qcsrc/server/race.qc
qcsrc/server/race.qh
qcsrc/server/scores.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/selection.qh
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/throwing.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/weapons/weaponsystem.qh

index 5bd49b8..b132da4 100644 (file)
@@ -1008,16 +1008,16 @@ set g_jump_grunt 0      "Do you make a grunting noise every time you jump? Is it the
 
 seta cl_weaponpriority "vaporizer vortex fireball mortar machinegun hagar rifle arc electro devastator crylink minelayer shotgun hlac tuba blaster porto seeker hook" "weapon priority list"
 seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
-seta cl_weaponpriority0 "devastator mortar hagar seeker fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun.  Default value: explosives"
-seta cl_weaponpriority1 "vaporizer vortex crylink hlac arc electro blaster shockwave"             "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun.  Default value: energy"
-seta cl_weaponpriority2 "vaporizer vortex rifle"                           "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun.  Default value: hitscan exact"
-seta cl_weaponpriority3 "vaporizer vortex rifle machinegun shotgun"               "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun.  Default value: hitscan all"
-seta cl_weaponpriority4 "mortar minelayer hlac hagar crylink seeker shotgun"    "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun.  Default value: spam weapons"
-seta cl_weaponpriority5 "blaster shockwave hook porto"                                     "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun.  Default value: weapons for moving"
-seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun"
-seta cl_weaponpriority7 "" "use impulse 207 for prev gun from this list, 217 for best gun, 227 for next gun"
-seta cl_weaponpriority8 "" "use impulse 208 for prev gun from this list, 218 for best gun, 228 for next gun"
-seta cl_weaponpriority9 "" "use impulse 209 for prev gun from this list, 219 for best gun, 229 for next gun"
+seta cl_weaponpriority0 "devastator mortar hagar seeker fireball"                       "use weapon_priority_0_prev for prev gun from this list, weapon_priority_0_best for best gun, weapon_priority_0_next for next gun.  Default value: explosives"
+seta cl_weaponpriority1 "vaporizer vortex crylink hlac arc electro blaster shockwave"   "use weapon_priority_1_prev for prev gun from this list, weapon_priority_1_best for best gun, weapon_priority_1_next for next gun.  Default value: energy"
+seta cl_weaponpriority2 "vaporizer vortex rifle"                                        "use weapon_priority_2_prev for prev gun from this list, weapon_priority_2_best for best gun, weapon_priority_2_next for next gun.  Default value: hitscan exact"
+seta cl_weaponpriority3 "vaporizer vortex rifle machinegun shotgun"                     "use weapon_priority_3_prev for prev gun from this list, weapon_priority_3_best for best gun, weapon_priority_3_next for next gun.  Default value: hitscan all"
+seta cl_weaponpriority4 "mortar minelayer hlac hagar crylink seeker shotgun"            "use weapon_priority_4_prev for prev gun from this list, weapon_priority_4_best for best gun, weapon_priority_4_next for next gun.  Default value: spam weapons"
+seta cl_weaponpriority5 "blaster shockwave hook porto"                                  "use weapon_priority_5_prev for prev gun from this list, weapon_priority_5_best for best gun, weapon_priority_5_next for next gun.  Default value: weapons for moving"
+seta cl_weaponpriority6 ""                                                              "use weapon_priority_6_prev for prev gun from this list, weapon_priority_6_best for best gun, weapon_priority_6_next for next gun"
+seta cl_weaponpriority7 ""                                                              "use weapon_priority_7_prev for prev gun from this list, weapon_priority_7_best for best gun, weapon_priority_7_next for next gun"
+seta cl_weaponpriority8 ""                                                              "use weapon_priority_8_prev for prev gun from this list, weapon_priority_8_best for best gun, weapon_priority_8_next for next gun"
+seta cl_weaponpriority9 ""                                                              "use weapon_priority_9_prev for prev gun from this list, weapon_priority_9_best for best gun, weapon_priority_9_next for next gun"
 seta cl_weaponimpulsemode 0 "0: only cycle between currently usable weapons in weapon priority order; 1: cycle between all possible weapons on a key in weapon priority order"
 
 set g_maplist_allow_hidden 0           "allow hidden maps to be, e.g., voted for and in the maplist"
index 42e3186..44a8137 100644 (file)
-// bulldozer storage "level4" last updated 16-11-2015 04:16:07
-nextlevel = "level1"
-"e15" 3 "0 0 0"
-"f14" 3 "0 0 0"
-"g13" 3 "0 0 0"
-"k13" 3 "0 0 0"
-"b14" 4 "0 0 0"
-"a14" 4 "0 0 0"
-"a13" 4 "0 0 0"
-"b13" 4 "0 0 0"
-"i13" 3 "0 0 0"
-"m13" 3 "0 0 0"
-"n14" 3 "0 0 0"
-"o15" 3 "0 0 0"
-"h17" 2 "0 0 0"
-"l17" 2 "0 0 0"
-"c12" 2 "0 0 0"
-"c13" 2 "0 0 0"
-"c14" 2 "0 0 0"
-"r14" 2 "0 0 0"
-"r13" 2 "0 0 0"
-"r12" 2 "0 0 0"
-"j15" 1 "0 -1 0"
-"s13" 4 "0 0 0"
-"t13" 4 "0 0 0"
-"t12" 4 "0 0 0"
-"s12" 4 "0 0 0"
-"b12" 4 "0 0 0"
-"a12" 4 "0 0 0"
-"a11" 4 "0 0 0"
-"b11" 4 "0 0 0"
-"c11" 4 "0 0 0"
-"d11" 4 "0 0 0"
-"e11" 4 "0 0 0"
-"f11" 4 "0 0 0"
-"g11" 4 "0 0 0"
-"h11" 4 "0 0 0"
-"i11" 4 "0 0 0"
-"j11" 4 "0 0 0"
-"k11" 4 "0 0 0"
-"l11" 4 "0 0 0"
-"m11" 4 "0 0 0"
-"n11" 4 "0 0 0"
-"o11" 4 "0 0 0"
-"p11" 4 "0 0 0"
-"q11" 4 "0 0 0"
-"r11" 4 "0 0 0"
-"s11" 4 "0 0 0"
-"t11" 4 "0 0 0"
-"t6" 6 "0 0 0"
-"s10" 4 "0 0 0"
-"r10" 4 "0 0 0"
-"q10" 4 "0 0 0"
-"b10" 6 "0 0 0"
-"o10" 4 "0 0 0"
-"c10" 6 "0 0 0"
-"d10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" 4 "0 0 0"
-"t14" 4 "0 0 0"
-"s14" 4 "0 0 0"
-"b15" 4 "0 0 0"
-"a15" 4 "0 0 0"
-"a16" 4 "0 0 0"
-"b16" 4 "0 0 0"
-"s16" 4 "0 0 0"
-"t16" 4 "0 0 0"
-"t15" 4 "0 0 0"
-"s15" 4 "0 0 0"
-"t17" 4 "0 0 0"
-"s17" 4 "0 0 0"
-"b17" 4 "0 0 0"
-"a17" 4 "0 0 0"
-"a18" 4 "0 0 0"
-"b18" 4 "0 0 0"
-"s18" 4 "0 0 0"
-"t18" 4 "0 0 0"
-"t19" 4 "0 0 0"
-"s19" 4 "0 0 0"
-"r19" 4 "0 0 0"
-"q19" 4 "0 0 0"
-"p19" 4 "0 0 0"
-"o19" 4 "0 0 0"
-"n19" 4 "0 0 0"
-"m19" 4 "0 0 0"
-"l19" 4 "0 0 0"
-"k19" 4 "0 0 0"
-"j19" 4 "0 0 0"
-"i19" 4 "0 0 0"
-"h19" 4 "0 0 0"
-"g19" 4 "0 0 0"
-"f19" 4 "0 0 0"
-"e19" 4 "0 0 0"
-"d19" 4 "0 0 0"
-"c19" 4 "0 0 0"
-"b19" 4 "0 0 0"
-"a19" 4 "0 0 0"
-"a20" 4 "0 0 0"
-"b20" 4 "0 0 0"
-"c20" 4 "0 0 0"
-"d20" 4 "0 0 0"
-"e20" 4 "0 0 0"
-"f20" 4 "0 0 0"
-"g20" 4 "0 0 0"
-"h20" 4 "0 0 0"
-"i20" 4 "0 0 0"
-"j20" 4 "0 0 0"
-"k20" 4 "0 0 0"
-"l20" 4 "0 0 0"
-"m20" 4 "0 0 0"
-"n20" 4 "0 0 0"
-"o20" 4 "0 0 0"
-"p20" 4 "0 0 0"
-"q20" 4 "0 0 0"
-"r20" 4 "0 0 0"
-"s20" 4 "0 0 0"
-"t20" 4 "0 0 0"
+// bulldozer storage "level6" last updated 06-12-2015 16:11:35
+nextlevel = "level7"
+"g13" 5 "0 -1 0"
+"f13" 5 "0 -1 0"
+"f12" 5 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"
+"o19" 6 "0 -1 0"
+"p19" 6 "0 -1 0"
+"q19" 6 "0 -1 0"
+"q18" 6 "0 -1 0"
+"p18" 6 "0 -1 0"
+"o18" 6 "0 -1 0"
+"n18" 6 "0 -1 0"
+"m18" 6 "0 -1 0"
+"l18" 6 "0 -1 0"
+"k18" 6 "0 -1 0"
+"j18" 6 "0 -1 0"
+"i18" 6 "0 -1 0"
+"h18" 6 "0 -1 0"
+"g18" 6 "0 -1 0"
+"f18" 6 "0 -1 0"
+"e18" 6 "0 -1 0"
+"d18" 6 "0 -1 0"
diff --git a/minigames/bulldozer/storage_level7.txt b/minigames/bulldozer/storage_level7.txt
new file mode 100644 (file)
index 0000000..5f351c6
--- /dev/null
@@ -0,0 +1,386 @@
+// bulldozer storage "level7" last updated 06-12-2015 16:19:03
+nextlevel = "level8"
+"g10" 5 "0 -1 0"
+"g9" 5 "0 -1 0"
+"g8" 5 "0 -1 0"
+"g11" 5 "0 -1 0"
+"g12" 5 "0 -1 0"
+"h8" 5 "0 -1 0"
+"i8" 5 "0 -1 0"
+"j8" 5 "0 -1 0"
+"l8" 5 "0 -1 0"
+"k8" 5 "0 -1 0"
+"m8" 5 "0 -1 0"
+"n8" 5 "0 -1 0"
+"n9" 5 "0 -1 0"
+"n10" 5 "0 -1 0"
+"n11" 5 "0 -1 0"
+"n12" 5 "0 -1 0"
+"m12" 5 "0 -1 0"
+"m13" 5 "0 -1 0"
+"m14" 5 "0 -1 0"
+"h12" 5 "0 -1 0"
+"h13" 5 "0 -1 0"
+"h14" 5 "0 -1 0"
+"h15" 5 "0 -1 0"
+"i15" 5 "0 -1 0"
+"j15" 5 "0 -1 0"
+"k15" 5 "0 -1 0"
+"k14" 5 "0 -1 0"
+"l14" 5 "0 -1 0"
+"k12" 5 "0 -1 0"
+"k11" 5 "0 -1 0"
+"i12" 5 "0 -1 0"
+"i11" 5 "0 -1 0"
+"l10" 5 "0 -1 0"
+"j14" 1 "0 -1 0"
+"j13" 3 "0 -1 0"
+"i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4 "0 -1 0"
+"i1" 4 "0 -1 0"
+"j1" 4 "0 -1 0"
+"k1" 4 "0 -1 0"
+"l1" 4 "0 -1 0"
+"m1" 4 "0 -1 0"
+"n1" 4 "0 -1 0"
+"o1" 4 "0 -1 0"
+"o8" 4 "0 -1 0"
+"o9" 4 "0 -1 0"
+"o10" 4 "0 -1 0"
+"o11" 4 "0 -1 0"
+"o12" 4 "0 -1 0"
+"o13" 4 "0 -1 0"
+"n13" 4 "0 -1 0"
+"n14" 4 "0 -1 0"
+"o14" 4 "0 -1 0"
+"o15" 4 "0 -1 0"
+"n15" 4 "0 -1 0"
+"m15" 4 "0 -1 0"
+"l15" 4 "0 -1 0"
+"o18" 4 "0 -1 0"
+"n18" 4 "0 -1 0"
+"m18" 4 "0 -1 0"
+"l18" 4 "0 -1 0"
+"k18" 4 "0 -1 0"
+"j18" 4 "0 -1 0"
+"i18" 4 "0 -1 0"
+"i19" 4 "0 -1 0"
+"h19" 4 "0 -1 0"
+"g19" 4 "0 -1 0"
+"f19" 4 "0 -1 0"
+"f20" 4 "0 -1 0"
+"g20" 4 "0 -1 0"
+"h20" 4 "0 -1 0"
+"i20" 4 "0 -1 0"
+"j20" 4 "0 -1 0"
+"k20" 4 "0 -1 0"
+"l20" 4 "0 -1 0"
+"m20" 4 "0 -1 0"
+"n20" 4 "0 -1 0"
+"o20" 4 "0 -1 0"
+"o19" 4 "0 -1 0"
+"n19" 4 "0 -1 0"
+"m19" 4 "0 -1 0"
+"l19" 4 "0 -1 0"
+"k19" 4 "0 -1 0"
+"j19" 4 "0 -1 0"
diff --git a/minigames/bulldozer/storage_level8.txt b/minigames/bulldozer/storage_level8.txt
new file mode 100644 (file)
index 0000000..2d461a0
--- /dev/null
@@ -0,0 +1,383 @@
+// bulldozer storage "level8" last updated 06-12-2015 16:23:34
+nextlevel = "level9"
+"e13" 5 "0 -1 0"
+"e12" 5 "0 -1 0"
+"e11" 5 "0 -1 0"
+"e10" 5 "0 -1 0"
+"e9" 5 "0 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"n20" 4 "0 -1 0"
+"m20" 4 "0 -1 0"
+"l20" 4 "0 -1 0"
+"k20" 4 "0 -1 0"
+"j20" 4 "0 -1 0"
+"i20" 4 "0 -1 0"
+"h20" 4 "0 -1 0"
+"g20" 4 "0 -1 0"
+"f20" 4 "0 -1 0"
+"e20" 4 "0 -1 0"
+"d20" 4 "0 -1 0"
+"c20" 4 "0 -1 0"
+"b20" 4 "0 -1 0"
+"a20" 4 "0 -1 0"
+"p14" 4 "0 -1 0"
diff --git a/minigames/bulldozer/storage_level9.txt b/minigames/bulldozer/storage_level9.txt
new file mode 100644 (file)
index 0000000..42e3186
--- /dev/null
@@ -0,0 +1,307 @@
+// bulldozer storage "level4" last updated 16-11-2015 04:16:07
+nextlevel = "level1"
+"e15" 3 "0 0 0"
+"f14" 3 "0 0 0"
+"g13" 3 "0 0 0"
+"k13" 3 "0 0 0"
+"b14" 4 "0 0 0"
+"a14" 4 "0 0 0"
+"a13" 4 "0 0 0"
+"b13" 4 "0 0 0"
+"i13" 3 "0 0 0"
+"m13" 3 "0 0 0"
+"n14" 3 "0 0 0"
+"o15" 3 "0 0 0"
+"h17" 2 "0 0 0"
+"l17" 2 "0 0 0"
+"c12" 2 "0 0 0"
+"c13" 2 "0 0 0"
+"c14" 2 "0 0 0"
+"r14" 2 "0 0 0"
+"r13" 2 "0 0 0"
+"r12" 2 "0 0 0"
+"j15" 1 "0 -1 0"
+"s13" 4 "0 0 0"
+"t13" 4 "0 0 0"
+"t12" 4 "0 0 0"
+"s12" 4 "0 0 0"
+"b12" 4 "0 0 0"
+"a12" 4 "0 0 0"
+"a11" 4 "0 0 0"
+"b11" 4 "0 0 0"
+"c11" 4 "0 0 0"
+"d11" 4 "0 0 0"
+"e11" 4 "0 0 0"
+"f11" 4 "0 0 0"
+"g11" 4 "0 0 0"
+"h11" 4 "0 0 0"
+"i11" 4 "0 0 0"
+"j11" 4 "0 0 0"
+"k11" 4 "0 0 0"
+"l11" 4 "0 0 0"
+"m11" 4 "0 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0 0"
+"l20" 4 "0 0 0"
+"m20" 4 "0 0 0"
+"n20" 4 "0 0 0"
+"o20" 4 "0 0 0"
+"p20" 4 "0 0 0"
+"q20" 4 "0 0 0"
+"r20" 4 "0 0 0"
+"s20" 4 "0 0 0"
+"t20" 4 "0 0 0"
index 452dfc9..b5b77e0 100644 (file)
@@ -22,6 +22,7 @@ QCCFLAGS ?= \
        -fftepp -flno -futf8 -fno-bail-on-werror -fftepp-predefs \
        -frelaxed-switch -freturn-assignments \
        $(QCCFLAGS_WATERMARK) \
+       -DNDEBUG=1 \
        $(QCCFLAGS_FEATURES) \
        $(QCCFLAGS_EXTRA)
 
index 6fcdbb9..109d014 100644 (file)
@@ -21,7 +21,7 @@ void Announcer_Countdown()
 {
        SELFPARAM();
        float starttime = STAT(GAMESTARTTIME);
-       float roundstarttime = getstatf(STAT_ROUNDSTARTTIME);
+       float roundstarttime = STAT(ROUNDSTARTTIME);
        if(roundstarttime == -1)
        {
                Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTOP);
@@ -74,7 +74,7 @@ void Announcer_Countdown()
 void Announcer_Gamestart()
 {
        float startTime = STAT(GAMESTARTTIME);
-       float roundstarttime = getstatf(STAT_ROUNDSTARTTIME);
+       float roundstarttime = STAT(ROUNDSTARTTIME);
        if(roundstarttime > startTime)
                startTime = roundstarttime;
 
@@ -103,7 +103,7 @@ void Announcer_Gamestart()
 // Plays the 1 minute or 5 minutes (of maptime) remaining sound, if client wants it
 void Announcer_Time()
 {
-       float timelimit = getstatf(STAT_TIMELIMIT);
+       float timelimit = STAT(TIMELIMIT);
        float timeleft = max(0, timelimit * 60 + STAT(GAMESTARTTIME) - time);
        float warmup_timeleft = 0;
 
index 98f25cc..069598e 100644 (file)
@@ -126,7 +126,7 @@ int serverflags;
 
 float uid2name_dialog;
 
-.bool csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead
+.bool csqcmodel_isdead; // used by shownames and miscfunctions (entcs_IsDead) to know when a player is dead
 
 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
 
index e8bd443..818e737 100644 (file)
@@ -92,7 +92,7 @@ void Draw_GrapplingHook(entity this)
                }
        }
 
-       t = GetPlayerColorForce(self.owner.sv_entnum);
+       t = entcs_GetTeamColor(self.owner.sv_entnum);
 
        switch(self.HookType)
        {
@@ -106,7 +106,7 @@ void Draw_GrapplingHook(entity this)
                                case NUM_TEAM_2: tex = "particles/hook_blue"; rgb = '0.3 0.3 1'; break;
                                case NUM_TEAM_3: tex = "particles/hook_yellow"; rgb = '1 1 0.3'; break;
                                case NUM_TEAM_4: tex = "particles/hook_pink"; rgb = '1 0.3 1'; break;
-                               default: tex = "particles/hook_white"; rgb = getcsqcplayercolor(self.sv_entnum - 1); break;
+                               default: tex = "particles/hook_white"; rgb = entcs_GetColor(self.sv_entnum - 1); break;
                        }
                        break;
                case NET_ENT_CLIENT_ARC_BEAM: // todo
index 764a526..d30a872 100644 (file)
@@ -77,8 +77,8 @@ float complain_weapon_time;
 int ps_primary, ps_secondary;
 int ts_primary, ts_secondary;
 
-int last_switchweapon;
-int last_activeweapon;
+Weapon last_switchweapon;
+Weapon last_activeweapon;
 float weapontime;
 float weaponprevtime;
 
index 236a585..6c37aa1 100644 (file)
@@ -113,7 +113,7 @@ void HUD_Ammo()
        }
 
        int rows = 0, columns, row, column;
-       float nade_cnt = getstatf(STAT_NADE_BONUS), nade_score = getstatf(STAT_NADE_BONUS_SCORE);
+       float nade_cnt = STAT(NADE_BONUS), nade_score = STAT(NADE_BONUS_SCORE);
        bool draw_nades = (nade_cnt > 0 || nade_score > 0);
        float nade_statuschange_elapsedtime;
        int total_ammo_count;
@@ -158,6 +158,7 @@ void HUD_Ammo()
                ammo_size.y = newSize;
        }
 
+       Weapon wep = switchweapon;
        int i;
        bool infinite_ammo = (getstati(STAT_ITEMS, 0, 24) & IT_UNLIMITED_WEAPON_AMMO);
        row = column = 0;
@@ -172,7 +173,7 @@ void HUD_Ammo()
                        DrawAmmoItem(
                                pos,
                                ammo_size,
-                               (get_weaponinfo(switchweapon)).ammo_field,
+                               wep.ammo_field,
                                true,
                                infinite_ammo
                        );
@@ -196,7 +197,7 @@ void HUD_Ammo()
                                pos + eX * column * (ammo_size.x + offset.x) + eY * row * (ammo_size.y + offset.y),
                                ammo_size,
                                ammotype,
-                               ((get_weaponinfo(switchweapon)).ammo_field == ammotype),
+                               (wep.ammo_field == ammotype),
                                infinite_ammo
                        );
 
index 8304329..bab1755 100644 (file)
@@ -41,7 +41,7 @@ void HUD_HealthArmor()
                        prev_health = 0;
                        prev_armor = 0;
                }
-               fuel = getstati(STAT_FUEL);
+               fuel = STAT(FUEL);
        }
        else
        {
index 2bcad64..33f797f 100644 (file)
@@ -62,7 +62,7 @@ void HUD_InfoMessages()
                        if(spectatee_status == -1)
                                s = _("^1Observing");
                        else
-                               s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(current_player));
+                               s = sprintf(_("^1Spectating: ^7%s"), entcs_GetName(current_player));
                        drawInfoMessage(s);
 
                        if(spectatee_status == -1)
index a8cb7c2..8e3166b 100644 (file)
@@ -10,23 +10,23 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, int
        switch(i)
        {
                case 0:
-                       stat = getstati(STAT_REDALIVE);
+                       stat = STAT(REDALIVE);
                        pic = "player_red.tga";
                        color = '1 0 0';
                        break;
                case 1:
-                       stat = getstati(STAT_BLUEALIVE);
+                       stat = STAT(BLUEALIVE);
                        pic = "player_blue.tga";
                        color = '0 0 1';
                        break;
                case 2:
-                       stat = getstati(STAT_YELLOWALIVE);
+                       stat = STAT(YELLOWALIVE);
                        pic = "player_yellow.tga";
                        color = '1 1 0';
                        break;
                default:
                case 3:
-                       stat = getstati(STAT_PINKALIVE);
+                       stat = STAT(PINKALIVE);
                        pic = "player_pink.tga";
                        color = '1 0 1';
                        break;
@@ -110,7 +110,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        int redflag, blueflag, yellowflag, pinkflag, neutralflag; // current status
        float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime, yellowflag_statuschange_elapsedtime, pinkflag_statuschange_elapsedtime, neutralflag_statuschange_elapsedtime; // time since the status changed
        bool ctf_oneflag; // one-flag CTF mode enabled/disabled
-       int stat_items = getstati(STAT_CTF_FLAGSTATUS, 0, 24);
+       int stat_items = STAT(CTF_FLAGSTATUS);
        float fs, fs2, fs3, size1, size2;
        vector e1, e2;
 
@@ -452,7 +452,7 @@ void HUD_Mod_NexBall(vector pos, vector mySize)
        int stat_items;
 
        stat_items = getstati(STAT_ITEMS, 0, 24);
-       nb_pb_starttime = getstatf(STAT_NB_METERSTART);
+       nb_pb_starttime = STAT(NB_METERSTART);
 
        if (stat_items & IT_KEY1)
                mod_active = 1;
@@ -489,7 +489,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
        mod_active = 1; // race should never hide the mod icons panel
        entity me;
        me = playerslots[player_localnum];
-       float t, score;
+       float score;
        float f; // yet another function has this
        score = me.(scores[ps_primary]);
 
@@ -502,7 +502,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
                rr = CTS_RECORD;
        else
                rr = RACE_RECORD;
-       t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time")));
+       float t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time")));
 
        if(score && (score < t || !t)) {
                db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score));
@@ -598,7 +598,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
                drawcolorcodedstring_aspect(namepos, s, '1 0.2 0' * squareSize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                drawstring_aspect(rankpos, rankname, '1 0.15 0' * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
        } else if(race_status == 2) {
-               if(race_status_name == GetPlayerName(player_localnum) || !race_myrank || race_myrank < rank)
+               if(race_status_name == entcs_GetName(player_localnum) || !race_myrank || race_myrank < rank)
                        drawpic_aspect_skin(medalPos + '0.1 0 0' * squareSize, "race_newrankgreen", '1 1 0' * 0.8 * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                else
                        drawpic_aspect_skin(medalPos + '0.1 0 0' * squareSize, "race_newrankyellow", '1 1 0' * 0.8 * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
@@ -630,28 +630,28 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, in
        switch(i)
        {
                case 0:
-                       stat = getstatf(STAT_DOM_PPS_RED);
+                       stat = STAT(DOM_PPS_RED);
                        pic = "dom_icon_red";
                        color = '1 0 0';
                        break;
                case 1:
-                       stat = getstatf(STAT_DOM_PPS_BLUE);
+                       stat = STAT(DOM_PPS_BLUE);
                        pic = "dom_icon_blue";
                        color = '0 0 1';
                        break;
                case 2:
-                       stat = getstatf(STAT_DOM_PPS_YELLOW);
+                       stat = STAT(DOM_PPS_YELLOW);
                        pic = "dom_icon_yellow";
                        color = '1 1 0';
                        break;
                default:
                case 3:
-                       stat = getstatf(STAT_DOM_PPS_PINK);
+                       stat = STAT(DOM_PPS_PINK);
                        pic = "dom_icon_pink";
                        color = '1 0 1';
                        break;
        }
-       float pps_ratio = stat / getstatf(STAT_DOM_TOTAL_PPS);
+       float pps_ratio = stat / STAT(DOM_TOTAL_PPS);
 
        if(mySize.x/mySize.y > aspect_ratio)
        {
index 821c993..3c4b9c1 100644 (file)
@@ -106,7 +106,7 @@ void HUD_Notify()
                {
                        attacker = sprintf(_("Player %d"), count + 1);
                        victim = sprintf(_("Player %d"), count + 2);
-                       icon = get_weaponinfo(min(WEP_FIRST + count * 2, WEP_LAST)).model2;
+                       icon = Weapons_from(min(WEP_FIRST + count * 2, WEP_LAST)).model2;
                        alpha = bound(0, 1.2 - count / entry_count, 1);
                }
                else
index 10446d6..e75f21f 100644 (file)
@@ -57,7 +57,7 @@ int getPowerupItemAlign(int align, int column, int row, int columns, int rows, b
 void HUD_Powerups()
 {
        int allItems = getstati(STAT_ITEMS, 0, 24);
-       int allBuffs = getstati(STAT_BUFFS, 0, 24);
+       int allBuffs = STAT(BUFFS);
        int strengthTime, shieldTime, superTime;
 
        // Initialize items
@@ -70,7 +70,7 @@ void HUD_Powerups()
 
                strengthTime = bound(0, STAT(STRENGTH_FINISHED) - time, 99);
                shieldTime = bound(0, STAT(INVINCIBLE_FINISHED) - time, 99);
-               superTime = bound(0, getstatf(STAT_SUPERWEAPONS_FINISHED) - time, 99);
+               superTime = bound(0, STAT(SUPERWEAPONS_FINISHED) - time, 99);
 
                if(allItems & IT_UNLIMITED_SUPERWEAPONS)
                        superTime = 99;
index 94cc328..7d69550 100644 (file)
@@ -43,8 +43,7 @@ void HUD_PressedKeys()
 
        vector keysize;
        keysize = eX * mySize.x * (1/3.0) + eY * mySize.y * (1/(3.0 - !autocvar_hud_panel_pressedkeys_attack));
-       float pressedkeys;
-       pressedkeys = getstatf(STAT_PRESSED_KEYS);
+       int pressedkeys = STAT(PRESSED_KEYS);
 
        if(autocvar_hud_panel_pressedkeys_attack)
        {
index 1982686..33f4e1e 100644 (file)
@@ -274,7 +274,6 @@ void HUD_Radar()
        }
 
        int color2;
-       entity tm;
        float scale2d, normalsize, bigsize;
 
        teamradar_origin2d = pos + 0.5 * mySize;
@@ -334,37 +333,34 @@ void HUD_Radar()
 
        draw_teamradar_background(hud_panel_radar_foreground_alpha);
 
-       for(tm = world; (tm = find(tm, classname, "radarlink")); )
-               draw_teamradar_link(tm.origin, tm.velocity, tm.team);
+       FOREACH_ENTITY_CLASS("radarlink", true, LAMBDA(
+               draw_teamradar_link(it.origin, it.velocity, it.team);
+       ));
 
-       vector coord;
-       vector brightcolor;
-       for(tm = world; (tm = findflags(tm, teamradar_icon, 0xFFFFFF)); )
-       {
+       FOREACH_ENTITY_FLAGS(teamradar_icon, 0xFFFFFF, LAMBDA(
                if ( hud_panel_radar_mouse )
-               if ( tm.health > 0 )
-               if ( tm.team == myteam+1 )
+               if ( it.health > 0 )
+               if ( it.team == myteam+1 )
                {
-                       coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(tm.origin));
+                       vector coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(it.origin));
                        if ( vlen(mousepos-coord) < 8 )
                        {
-                               brightcolor_x = min(1,tm.teamradar_color_x*1.5);
-                               brightcolor_y = min(1,tm.teamradar_color_y*1.5);
-                               brightcolor_z = min(1,tm.teamradar_color_z*1.5);
+                               vector brightcolor;
+                               brightcolor_x = min(1,it.teamradar_color_x*1.5);
+                               brightcolor_y = min(1,it.teamradar_color_y*1.5);
+                               brightcolor_z = min(1,it.teamradar_color_z*1.5);
                                drawpic(coord - '8 8 0', "gfx/teamradar_icon_glow", '16 16 0', brightcolor, panel_fg_alpha, 0);
                        }
                }
-               entity icon = RadarIcons_from(tm.teamradar_icon);
-               draw_teamradar_icon(tm.origin, icon, tm, spritelookupcolor(tm, icon.netname, tm.teamradar_color), panel_fg_alpha);
-       }
-       for(tm = world; (tm = find(tm, classname, "entcs_receiver")); )
-       {
-               if (!tm.m_entcs_private) continue;
-               if (entcs_is_self(tm)) continue;
-               color2 = GetPlayerColor(tm.sv_entnum);
-               //if(color == NUM_SPECTATOR || color == color2)
-                       draw_teamradar_player(tm.origin, tm.angles, Team_ColorRGB(color2));
-       }
+               entity icon = RadarIcons_from(it.teamradar_icon);
+               draw_teamradar_icon(it.origin, icon, it, spritelookupcolor(it, icon.netname, it.teamradar_color), panel_fg_alpha);
+       ));
+       AL_EACH(_entcs, e, it != NULL, LAMBDA(
+               if (!it.m_entcs_private) continue;
+               if (entcs_is_self(it)) continue;
+               color2 = entcs_GetTeam(it.sv_entnum);
+               draw_teamradar_player(it.origin, it.angles, Team_ColorRGB(color2));
+       ));
        draw_teamradar_player(view_origin, view_angles, '1 1 1');
 
        drawresetcliparea();
index dd3000c..d120c1c 100644 (file)
@@ -46,7 +46,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        {
                                rgb = '1 1 0';
                                drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-                               s = GetPlayerName(player_localnum);
+                               s = entcs_GetName(player_localnum);
                                score = 7;
                        }
                        else
@@ -114,7 +114,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                }
                if (team_count)
                        score_color = Team_ColorRGB(pl.team) * 0.8;
-               s = textShortenToWidth(GetPlayerName(pl.sv_entnum), name_size, fontsize, stringwidth_colors);
+               s = textShortenToWidth(entcs_GetName(pl.sv_entnum), name_size, fontsize, stringwidth_colors);
                drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, true, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                pos.y += fontsize.y;
index f709b41..4de0c1e 100644 (file)
@@ -23,7 +23,7 @@ void HUD_Timer()
        string timer;
        float timelimit, elapsedTime, timeleft, minutesLeft;
 
-       timelimit = getstatf(STAT_TIMELIMIT);
+       timelimit = STAT(TIMELIMIT);
 
        timeleft = max(0, timelimit * 60 + STAT(GAMESTARTTIME) - time);
        timeleft = ceil(timeleft);
index 8186632..8970332 100644 (file)
@@ -77,18 +77,10 @@ void HUD_Weapons()
                weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
 
                weapon_cnt = 0;
-               for(i = WEP_FIRST; i <= WEP_LAST; ++i)
-               {
-                       setself(get_weaponinfo(i));
-                       if(self.impulse >= 0)
-                       {
-                               weaponorder[weapon_cnt] = self;
-                               ++weapon_cnt;
-                       }
-               }
+               FOREACH(Weapons, it != WEP_Null && it.impulse >= 0, LAMBDA(weaponorder[weapon_cnt++] = it));
                for(i = weapon_cnt; i < Weapons_MAX; ++i)
-                       weaponorder[i] = world;
-               heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
+                       weaponorder[i] = NULL;
+               heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, NULL);
 
                weaponorder_cmp_str = string_null;
        }
@@ -100,7 +92,7 @@ void HUD_Weapons()
        {
                if(!weapons_stat)
                        for(i = WEP_FIRST; i <= WEP_LAST; i += floor((WEP_LAST-WEP_FIRST)/5))
-                               weapons_stat |= WepSet_FromWeapon(i);
+                               weapons_stat |= WepSet_FromWeapon(Weapons_from(i));
 
                #if 0
                /// debug code
@@ -109,7 +101,7 @@ void HUD_Weapons()
                        weapons_stat = '0 0 0';
                        float countw = 1 + floor((floor(time * cvar("wep_add"))) % (Weapons_COUNT - 1));
                        for(i = WEP_FIRST; i <= countw; ++i)
-                               weapons_stat |= WepSet_FromWeapon(i);
+                               weapons_stat |= WepSet_FromWeapon(Weapons_from(i));
                }
                #endif
        }
@@ -126,7 +118,7 @@ void HUD_Weapons()
                // do we own this weapon?
                weapon_count = 0;
                for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
-                       if((weapons_stat & WepSet_FromWeapon(weaponorder[i].weapon)) || (weaponorder[i].weapon == complain_weapon))
+                       if((weapons_stat & WepSet_FromWeapon(Weapons_from(weaponorder[i].weapon))) || (weaponorder[i].weapon == complain_weapon))
                                ++weapon_count;
 
 
@@ -140,11 +132,10 @@ void HUD_Weapons()
                // get the all-weapons layout
                int nHidden = 0;
                WepSet weapons_stat = WepSet_GetFromStat();
-               for (int i = WEP_FIRST; i <= WEP_LAST; ++i) {
-                       Weapon w = get_weaponinfo(i);
-                       if (weapons_stat & w.m_wepset) continue;
-                       if (w.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1;
-               }
+               FOREACH(Weapons, it != WEP_Null, LAMBDA(
+                       if (weapons_stat & it.m_wepset) continue;
+                       if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1;
+               ));
                vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, padded_panel_size, aspect);
                columns = table_size.x;
                rows = table_size.y;
@@ -348,14 +339,14 @@ void HUD_Weapons()
                // retrieve information about the current weapon to be drawn
                setself(weaponorder[i]);
                weapon_id = self.impulse;
-               isCurrent = (self.weapon == switchweapon);
+               isCurrent = (self.weapon == switchweapon.m_id);
 
                // skip if this weapon doesn't exist
                if(!self || weapon_id < 0) { continue; }
 
                // skip this weapon if we don't own it (and onlyowned is enabled)-- or if weapons_complainbubble is showing for this weapon
                if(autocvar_hud_panel_weapons_onlyowned)
-               if (!((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon)))
+               if (!((weapons_stat & WepSet_FromWeapon(Weapons_from(self.weapon))) || (self.weapon == complain_weapon)))
                        continue;
 
                // figure out the drawing position of weapon
@@ -379,7 +370,7 @@ void HUD_Weapons()
                }
 
                // drawing all the weapon items
-               if(weapons_stat & WepSet_FromWeapon(self.weapon))
+               if(weapons_stat & WepSet_FromWeapon(Weapons_from(self.weapon)))
                {
                        // draw the weapon image
                        if(isCurrent)
index f4852ab..f2df818 100644 (file)
@@ -244,7 +244,7 @@ void Playerchecker_Think()
        for(i = 0; i < maxclients; ++i)
        {
                e = playerslots[i];
-               if(GetPlayerName(i) == "")
+               if(entcs_GetName(i) == "")
                {
                        if(e.sort_prev)
                        {
@@ -270,7 +270,7 @@ void Playerchecker_Think()
                                e.ping_packetloss = 0;
                                e.ping_movementloss = 0;
                                //e.gotscores = 0; // we might already have the scores...
-                               SetTeam(e, GetPlayerColor(i)); // will not hurt; later updates come with HUD_UpdatePlayerTeams
+                               SetTeam(e, entcs_GetTeam(i)); // will not hurt; later updates come with HUD_UpdatePlayerTeams
                                RegisterPlayer(e);
                                HUD_UpdatePlayerPos(e);
                        }
@@ -672,7 +672,7 @@ NET_HANDLE(ENT_CLIENT_SPAWNEVENT, bool is_new)
 
                if(is_new)
                {
-                       float teamnum = GetPlayerColor(entnum - 1);
+                       float teamnum = entcs_GetTeam(entnum - 1);
 
                        if(autocvar_cl_spawn_event_particles)
                        {
@@ -727,7 +727,7 @@ void CSQC_Ent_Update(bool isnew)
        else
        {
                serverprevtime = time;
-               serverdeltatime = getstatf(STAT_MOVEVARS_TICRATE) * getstatf(STAT_MOVEVARS_TIMESCALE);
+               serverdeltatime = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
                time = serverprevtime + serverdeltatime;
        }
 
@@ -1074,7 +1074,7 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                                strunzone(grecordholder[pos-1]);
                        grecordholder[pos-1] = strzone(ReadString());
                        grecordtime[pos-1] = ReadInt24_t();
-                       if(grecordholder[pos-1] == GetPlayerName(player_localnum))
+                       if(grecordholder[pos-1] == entcs_GetName(player_localnum))
                                race_myrank = pos;
                        break;
                case RACE_NET_SERVER_STATUS:
index a6aebc6..91d5de0 100644 (file)
@@ -2,6 +2,7 @@
 #define CLIENT_MAIN_H
 
 #include "../common/constants.qh"
+#include "../common/weapons/all.qh"
 
 // --------------------------------------------------------------------------
 // MENU Functionality
@@ -94,9 +95,9 @@ bool button_zoom;
 bool spectatorbutton_zoom;
 bool button_attack2;
 
-int activeweapon;
-int switchingweapon;
-#define switchweapon STAT(SWITCHWEAPON)
+Weapon activeweapon;
+Weapon switchingweapon;
+Weapon switchweapon;
 float current_viewzoom;
 float zoomin_effect;
 float warmup_stage;
index 4a6b587..2727db4 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "weapons/projectile.qc" // TODO
 
+#include "../common/anim.qc"
 #include "../common/animdecide.qc"
 #include "../common/effects/effectinfo.qc"
 #include "../common/ent_cs.qc"
@@ -44,6 +45,7 @@
 #include "../common/deathtypes/all.qc"
 #include "../common/effects/all.qc"
 #include "../common/gamemodes/all.qc"
+#include "../common/impulses/all.qc"
 #include "../common/items/all.qc"
 #include "../common/monsters/all.qc"
 #include "../common/mutators/all.qc"
@@ -62,6 +64,7 @@
 #include "../lib/warpzone/anglestransform.qc"
 #include "../lib/warpzone/client.qc"
 #include "../lib/warpzone/common.qc"
+#include "../lib/warpzone/server.qc"
 #include "../lib/warpzone/util_server.qc"
 
 #if BUILD_MOD
index a4fdfea..90f6c17 100644 (file)
@@ -758,7 +758,7 @@ void HUD_Quickmenu_PlayerListEntries(string cmd, float teamplayers, float withou
                        continue;
                if(without_me && pl.sv_entnum == player_localnum)
                        continue;
-               QUICKMENU_ENTRY(GetPlayerName(pl.sv_entnum), sprintf(cmd, GetPlayerName(pl.sv_entnum)))
+               QUICKMENU_ENTRY(entcs_GetName(pl.sv_entnum), sprintf(cmd, entcs_GetName(pl.sv_entnum)))
        }
 
        return;
@@ -847,7 +847,7 @@ void QuickMenu_Default(string target_submenu)
        QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
                QUICKMENU_ENTRY(CTX(_("QMCMD^Restart the map")), "vcall restart")
                QUICKMENU_ENTRY(CTX(_("QMCMD^End match")), "vcall endmatch")
-               if(getstatf(STAT_TIMELIMIT) > 0)
+               if(STAT(TIMELIMIT) > 0)
                {
                QUICKMENU_ENTRY(CTX(_("QMCMD^Reduce match time")), "vcall reducematchtime")
                QUICKMENU_ENTRY(CTX(_("QMCMD^Extend match time")), "vcall extendmatchtime")
index a42f14f..4d9a8c6 100644 (file)
@@ -109,7 +109,7 @@ void HUD_UpdatePlayerTeams()
        for(pl = players.sort_next; pl; pl = pl.sort_next)
        {
                num += 1;
-               Team = GetPlayerColor(pl.sv_entnum);
+               Team = entcs_GetTeam(pl.sv_entnum);
                if(SetTeam(pl, Team))
                {
                        tmp = pl.sort_prev;
@@ -146,8 +146,8 @@ int HUD_CompareScore(float vl, float vr, int f)
 float HUD_ComparePlayerScores(entity left, entity right)
 {
        float vl, vr, r;
-       vl = GetPlayerColor(left.sv_entnum);
-       vr = GetPlayerColor(right.sv_entnum);
+       vl = entcs_GetTeam(left.sv_entnum);
+       vr = entcs_GetTeam(right.sv_entnum);
 
        if(!left.gotscores)
                vl = NUM_SPECTATOR;
@@ -571,7 +571,7 @@ string HUD_GetField(entity pl, int field)
                                        hud_field_icon2_rgb = colormapPaletteColor(f % 16, 1);
                                }
                        }
-                       return GetPlayerName(pl.sv_entnum);
+                       return entcs_GetName(pl.sv_entnum);
 
                case SP_FRAGS:
                        f = pl.(scores[SP_KILLS]);
@@ -710,7 +710,7 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
        string str;
        int field;
        float is_spec;
-       is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
+       is_spec = (entcs_GetTeam(pl.sv_entnum) == NUM_SPECTATOR);
 
        if((rgb == '1 1 1') && (!is_spec)) {
                rgb.x = autocvar_scoreboard_color_bg_r + 0.5;
@@ -1001,17 +1001,15 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        WepSet weapons_inmap = WepSet_GetFromStat_InMap();
        float initial_posx = pos.x;
        int disownedcnt = 0;
-       for (int i = WEP_FIRST; i <= WEP_LAST; ++i) {
-               Weapon e = get_weaponinfo(i);
-               setself(e);
-               if (!self.weapon) continue;
+       FOREACH(Weapons, it != WEP_Null, LAMBDA(
+               if (!it.weapon) continue;
 
                int weapon_stats = weapon_accuracy[i - WEP_FIRST];
 
-               WepSet set = e.m_wepset;
+               WepSet set = it.m_wepset;
                if (weapon_stats < 0 && !(weapons_stat & set || weapons_inmap & set))
                        ++disownedcnt;
-       }
+       ));
 
        int weapon_cnt = (Weapons_COUNT - 1) - disownedcnt;
        if (weapon_cnt <= 0) return pos;
@@ -1065,13 +1063,11 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        vector tmpos = pos;
 
        int column = 0;
-       for (int i = WEP_FIRST; i <= WEP_LAST; ++i) {
-               Weapon e = get_weaponinfo(i);
-               setself(e);
-               if (!self.weapon) continue;
+       FOREACH(Weapons, it != WEP_Null, LAMBDA(
+               if (!it.weapon) continue;
                int weapon_stats = weapon_accuracy[i - WEP_FIRST];
 
-               WepSet set = e.m_wepset;
+               WepSet set = it.m_wepset;
                if (weapon_stats < 0 && !(weapons_stat & set || weapons_inmap & set))
                        continue;
 
@@ -1082,7 +1078,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        weapon_alpha = 0.2 * scoreboard_alpha_fg;
 
                // weapon icon
-               drawpic_aspect_skin(tmpos, self.model2, '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(tmpos, it.model2, '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
                // the accuracy
                if (weapon_stats >= 0) {
                        weapons_with_stats += 1;
@@ -1107,7 +1103,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        pos.y += height;
                }
                ++column;
-       }
+       ));
 
        if (weapons_with_stats)
                average_accuracy = floor((average_accuracy * 100 / weapons_with_stats) + 0.5);
@@ -1137,12 +1133,12 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
        string val;
 
        // get monster stats
-       stat_monsters_killed = getstatf(STAT_MONSTERS_KILLED);
-       stat_monsters_total = getstatf(STAT_MONSTERS_TOTAL);
+       stat_monsters_killed = STAT(MONSTERS_KILLED);
+       stat_monsters_total = STAT(MONSTERS_TOTAL);
 
        // get secrets stats
-       stat_secrets_found = getstatf(STAT_SECRETS_FOUND);
-       stat_secrets_total = getstatf(STAT_SECRETS_TOTAL);
+       stat_secrets_found = STAT(SECRETS_FOUND);
+       stat_secrets_total = STAT(SECRETS_TOTAL);
 
        // get number of rows
        if(stat_secrets_total)
@@ -1201,7 +1197,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                return pos;
 
        float is_spec;
-       is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
+       is_spec = (entcs_GetTeam(pl.sv_entnum) == NUM_SPECTATOR);
        vector hl_rgb;
        hl_rgb.x = autocvar_scoreboard_color_bg_r + 0.5;
        hl_rgb.y = autocvar_scoreboard_color_bg_g + 0.5;
@@ -1230,7 +1226,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                        continue;
                n = grecordholder[i];
                p = count_ordinal(i+1);
-               if(grecordholder[i] == GetPlayerName(player_localnum))
+               if(grecordholder[i] == entcs_GetName(player_localnum))
                        drawfill(pos, '1 0 0' * sbwidth + '0 1.25 0' * hud_fontsize.y, hl_rgb, scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
                else if(!(i % 2) && scoreboard_highlight)
                        drawfill(pos, '1 0 0' * sbwidth + '0 1.25 0' * hud_fontsize.y, hl_rgb, scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
@@ -1406,9 +1402,9 @@ void HUD_DrawScoreboard()
        // Print info string
        float tl, fl, ll;
        str = sprintf(_("playing ^3%s^7 on ^2%s^7"), MapInfo_Type_ToText(gametype), shortmapname);
-       tl = getstatf(STAT_TIMELIMIT);
-       fl = getstatf(STAT_FRAGLIMIT);
-       ll = getstatf(STAT_LEADLIMIT);
+       tl = STAT(TIMELIMIT);
+       fl = STAT(FRAGLIMIT);
+       ll = STAT(LEADLIMIT);
        if(gametype == MAPINFO_TYPE_LMS)
        {
                if(tl > 0)
@@ -1462,7 +1458,7 @@ void HUD_DrawScoreboard()
        drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, true, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
 
        // print information about respawn status
-       float respawn_time = getstatf(STAT_RESPAWN_TIME);
+       float respawn_time = STAT(RESPAWN_TIME);
        if(!intermission)
        if(respawn_time)
        {
index f13efdd..66f313d 100644 (file)
@@ -24,6 +24,7 @@ STATIC_INIT(shownames_ent)
        for (int i = 0; i < maxclients; ++i)
        {
                entity e = new(shownames_tag);
+               make_pure(e);
                e.sv_entnum = i + 1;
                LL_PUSH(shownames_ent, e);
        }
@@ -99,7 +100,7 @@ void Draw_ShowNames(entity this)
        // multiply by player alpha
        if (!this.sameteam || (this.sv_entnum == player_localentnum))
        {
-               float f = getplayeralpha(this.sv_entnum - 1);
+               float f = entcs_GetAlpha(this.sv_entnum - 1);
                if (f == 0) f = 1;
                if (f < 0) f = 0;
                // FIXME: alpha is negative when dead, breaking death fade
@@ -150,9 +151,9 @@ void Draw_ShowNames(entity this)
                                        DRAWFLAG_NORMAL);
                        }
                }
-               string s = GetPlayerName(this.sv_entnum - 1);
+               string s = entcs_GetName(this.sv_entnum - 1);
                if ((autocvar_hud_shownames_decolorize == 1 && teamplay)
-                   || autocvar_hud_shownames_decolorize == 2) s = playername(s, GetPlayerColor(this.sv_entnum - 1));
+                   || autocvar_hud_shownames_decolorize == 2) s = playername(s, entcs_GetTeam(this.sv_entnum - 1));
                drawfontscale = '1 1 0' * resize;
                s = textShortenToWidth(s, namewidth, '1 1 0' * autocvar_hud_shownames_fontsize, stringwidth_colors);
                float width = stringwidth(s, true, '1 1 0' * autocvar_hud_shownames_fontsize);
@@ -167,7 +168,15 @@ void Draw_ShowNames_All()
        if (!autocvar_hud_shownames) return;
        LL_EACH(shownames_ent, true, LAMBDA(
                entity entcs = entcs_receiver(i);
-               if (!entcs) continue;
+               if (!entcs)
+               {
+                       make_pure(it);
+                       continue;
+               }
+               make_impure(it);
+               assert(entcs.think, eprint(entcs));
+               WITH(entity, self, entcs, entcs.think());
+               if (!entcs.has_origin) continue;
                if (entcs.m_entcs_private)
                {
                        it.healthvalue = entcs.healthvalue;
@@ -180,8 +189,8 @@ void Draw_ShowNames_All()
                        it.armorvalue = 0;
                        it.sameteam = false;
                }
-               bool dead = getplayerisdead(i);
-               if (!it.csqcmodel_isdead && entcs.has_origin) setorigin(it, entcs.origin);
+               bool dead = entcs_IsDead(i) || entcs_IsSpectating(i);
+               if (!it.csqcmodel_isdead) setorigin(it, entcs.origin);
                it.csqcmodel_isdead = dead;
                Draw_ShowNames(it);
        ));
index 0f1a43e..85fea0d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "mutators/events.qh"
 
+#include "../common/anim.qh"
 #include "../common/constants.qh"
 #include "../common/debug.qh"
 #include "../common/mapinfo.qh"
 #include "../lib/warpzone/client.qh"
 #include "../lib/warpzone/common.qh"
 
+#define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT)
+
+float autocvar_cl_viewmodel_scale;
+
+bool autocvar_cl_bobmodel;
+float autocvar_cl_bobmodel_speed;
+float autocvar_cl_bobmodel_side;
+float autocvar_cl_bobmodel_up;
+
+float autocvar_cl_followmodel;
+float autocvar_cl_followmodel_side_speed;
+float autocvar_cl_followmodel_side_highpass;
+float autocvar_cl_followmodel_side_highpass1;
+float autocvar_cl_followmodel_side_limit;
+float autocvar_cl_followmodel_side_lowpass;
+float autocvar_cl_followmodel_up_speed;
+float autocvar_cl_followmodel_up_highpass;
+float autocvar_cl_followmodel_up_highpass1;
+float autocvar_cl_followmodel_up_limit;
+float autocvar_cl_followmodel_up_lowpass;
+
+float autocvar_cl_leanmodel;
+float autocvar_cl_leanmodel_side_speed;
+float autocvar_cl_leanmodel_side_highpass;
+float autocvar_cl_leanmodel_side_highpass1;
+float autocvar_cl_leanmodel_side_lowpass;
+float autocvar_cl_leanmodel_side_limit;
+float autocvar_cl_leanmodel_up_speed;
+float autocvar_cl_leanmodel_up_highpass;
+float autocvar_cl_leanmodel_up_highpass1;
+float autocvar_cl_leanmodel_up_lowpass;
+float autocvar_cl_leanmodel_up_limit;
+
+#define lowpass(value, frac, ref_store, ret) do \
+{ \
+       float __frac = bound(0, frac, 1); \
+       ret = ref_store = ref_store * (1 - __frac) + (value) * __frac; \
+} while (0)
+
+#define lowpass_limited(value, frac, limit, ref_store, ret) do \
+{ \
+       float __ignore; lowpass(value, frac, ref_store, __ignore); \
+       ret = ref_store = bound((value) - (limit), ref_store, (value) + (limit)); \
+} while (0)
+
+#define highpass(value, frac, ref_store, ret) do \
+{ \
+       float __f; lowpass(value, frac, ref_store, __f); \
+       ret = (value) - __f; \
+} while (0)
+
+#define highpass_limited(value, frac, limit, ref_store, ret) do \
+{ \
+       float __f; lowpass_limited(value, frac, limit, ref_store, __f); \
+       ret = (value) - __f; \
+} while (0)
+
+#define lowpass3(value, fracx, fracy, fracz, ref_store, ref_out) do \
+{ \
+       lowpass(value.x, fracx, ref_store.x, ref_out.x); \
+       lowpass(value.y, fracy, ref_store.y, ref_out.y); \
+       lowpass(value.z, fracz, ref_store.z, ref_out.z); \
+} while (0)
+
+#define highpass3(value, fracx, fracy, fracz, ref_store, ref_out) do \
+{ \
+       highpass(value.x, fracx, ref_store.x, ref_out.x); \
+       highpass(value.y, fracy, ref_store.y, ref_out.y); \
+       highpass(value.z, fracz, ref_store.z, ref_out.z); \
+} while (0)
+
+#define highpass3_limited(value, fracx, limitx, fracy, limity, fracz, limitz, ref_store, ref_out) do \
+{ \
+       highpass_limited(value.x, fracx, limitx, ref_store.x, ref_out.x); \
+       highpass_limited(value.y, fracy, limity, ref_store.y, ref_out.y); \
+       highpass_limited(value.z, fracz, limitz, ref_store.z, ref_out.z); \
+} while (0)
+
+void viewmodel_animate(entity this)
+{
+       static float prevtime;
+       float frametime = (time - prevtime) * STAT(MOVEVARS_TIMESCALE);
+       prevtime = time;
+
+       if (autocvar_chase_active) return;
+       if (getstati(STAT_HEALTH) <= 0) return;
+
+       entity view = CSQCModel_server2csqc(player_localentnum - 1);
+
+       bool clonground = !(view.anim_implicit_state & ANIMIMPLICITSTATE_INAIR);
+       static bool oldonground;
+       static float hitgroundtime;
+       static float lastongroundtime;
+       if (clonground)
+       {
+               float f = time; // cl.movecmd[0].time
+               if (!oldonground)
+                       hitgroundtime = f;
+               lastongroundtime = f;
+       }
+       oldonground = clonground;
+
+       vector gunorg = '0 0 0', gunangles = '0 0 0';
+       static vector gunorg_prev = '0 0 0', gunangles_prev = '0 0 0';
+
+       bool teleported = view.csqcmodel_teleported;
+
+       // 1. if we teleported, clear the frametime... the lowpass will recover the previous value then
+       if (teleported)
+       {
+               // try to fix the first highpass; result is NOT
+               // perfect! TODO find a better fix
+               gunangles_prev = view_angles;
+               gunorg_prev = view_origin;
+       }
+
+       static vector gunorg_highpass = '0 0 0';
+
+       // 2. for the gun origin, only keep the high frequency (non-DC) parts, which is "somewhat like velocity"
+       gunorg_highpass += gunorg_prev;
+       highpass3_limited(view_origin,
+               frametime * autocvar_cl_followmodel_side_highpass1, autocvar_cl_followmodel_side_limit,
+               frametime * autocvar_cl_followmodel_side_highpass1, autocvar_cl_followmodel_side_limit,
+               frametime * autocvar_cl_followmodel_up_highpass1, autocvar_cl_followmodel_up_limit,
+               gunorg_highpass, gunorg);
+       gunorg_prev = view_origin;
+       gunorg_highpass -= gunorg_prev;
+
+       static vector gunangles_highpass = '0 0 0';
+
+       // in the highpass, we _store_ the DIFFERENCE to the actual view angles...
+       gunangles_highpass += gunangles_prev;
+       PITCH(gunangles_highpass) += 360 * floor((PITCH(view_angles) - PITCH(gunangles_highpass)) / 360 + 0.5);
+       YAW(gunangles_highpass) += 360 * floor((YAW(view_angles) - YAW(gunangles_highpass)) / 360 + 0.5);
+       ROLL(gunangles_highpass) += 360 * floor((ROLL(view_angles) - ROLL(gunangles_highpass)) / 360 + 0.5);
+       highpass3_limited(view_angles,
+               frametime * autocvar_cl_leanmodel_up_highpass1, autocvar_cl_leanmodel_up_limit,
+               frametime * autocvar_cl_leanmodel_side_highpass1, autocvar_cl_leanmodel_side_limit,
+               0, 0,
+               gunangles_highpass, gunangles);
+       gunangles_prev = view_angles;
+       gunangles_highpass -= gunangles_prev;
+
+       // 3. calculate the RAW adjustment vectors
+       gunorg.x *= (autocvar_cl_followmodel ? -autocvar_cl_followmodel_side_speed : 0);
+       gunorg.y *= (autocvar_cl_followmodel ? -autocvar_cl_followmodel_side_speed : 0);
+       gunorg.z *= (autocvar_cl_followmodel ? -autocvar_cl_followmodel_up_speed : 0);
+
+       PITCH(gunangles) *= (autocvar_cl_leanmodel ? -autocvar_cl_leanmodel_up_speed : 0);
+       YAW(gunangles) *= (autocvar_cl_leanmodel ? -autocvar_cl_leanmodel_side_speed : 0);
+       ROLL(gunangles) = 0;
+
+       static vector gunorg_adjustment_highpass;
+       static vector gunorg_adjustment_lowpass;
+       static vector gunangles_adjustment_highpass;
+       static vector gunangles_adjustment_lowpass;
+
+       // 4. perform highpass/lowpass on the adjustment vectors (turning velocity into acceleration!)
+       //    trick: we must do the lowpass LAST, so the lowpass vector IS the final vector!
+       highpass3(gunorg,
+               frametime * autocvar_cl_followmodel_side_highpass,
+               frametime * autocvar_cl_followmodel_side_highpass,
+               frametime * autocvar_cl_followmodel_up_highpass,
+               gunorg_adjustment_highpass, gunorg);
+       lowpass3(gunorg,
+               frametime * autocvar_cl_followmodel_side_lowpass,
+               frametime * autocvar_cl_followmodel_side_lowpass,
+               frametime * autocvar_cl_followmodel_up_lowpass,
+               gunorg_adjustment_lowpass, gunorg);
+       // we assume here: PITCH = 0, YAW = 1, ROLL = 2
+       highpass3(gunangles,
+               frametime * autocvar_cl_leanmodel_up_highpass,
+               frametime * autocvar_cl_leanmodel_side_highpass,
+               0,
+               gunangles_adjustment_highpass, gunangles);
+       lowpass3(gunangles,
+               frametime * autocvar_cl_leanmodel_up_lowpass,
+               frametime * autocvar_cl_leanmodel_side_lowpass,
+               0,
+               gunangles_adjustment_lowpass, gunangles);
+       float xyspeed = bound(0, vlen(vec2(view.velocity)), 400);
+
+       // vertical view bobbing code
+       // TODO: cl_bob
+
+       // horizontal view bobbing code
+       // TODO: cl_bob2
+
+       // fall bobbing code
+       // causes the view to swing down and back up when touching the ground
+       // TODO: cl_bobfall
+
+       // gun model bobbing code
+       if (autocvar_cl_bobmodel)
+       {
+               // calculate for swinging gun model
+               // the gun bobs when running on the ground, but doesn't bob when you're in the air.
+               // Sajt: I tried to smooth out the transitions between bob and no bob, which works
+               // for the most part, but for some reason when you go through a message trigger or
+               // pick up an item or anything like that it will momentarily jolt the gun.
+               vector forward, right, up;
+               float bspeed;
+               float t = 1;
+               float s = time * autocvar_cl_bobmodel_speed;
+               if (clonground)
+               {
+                       if (time - hitgroundtime < 0.2)
+                       {
+                               // just hit the ground, speed the bob back up over the next 0.2 seconds
+                               t = time - hitgroundtime;
+                               t = bound(0, t, 0.2);
+                               t *= 5;
+                       }
+               }
+               else
+               {
+                       // recently left the ground, slow the bob down over the next 0.2 seconds
+                       t = time - lastongroundtime;
+                       t = 0.2 - bound(0, t, 0.2);
+                       t *= 5;
+               }
+               bspeed = xyspeed * 0.01;
+               MAKEVECTORS(makevectors, view_angles, forward, right, up);
+               float bobr = bspeed * autocvar_cl_bobmodel_side * autocvar_cl_viewmodel_scale * sin(s) * t;
+               gunorg += bobr * right;
+               float bobu = bspeed * autocvar_cl_bobmodel_up * autocvar_cl_viewmodel_scale * cos(s * 2) * t;
+               gunorg += bobu * up;
+       }
+       vector v = rotate(gunorg, YAW(view_angles) * DEG2RAD); // rotate world coordinates to relative ones
+       v.z = gunorg.z;
+       this.origin += v;
+       gunangles.x = -gunangles.x; // pitch was inverted, now that actually matters
+       this.angles += gunangles;
+}
+
+.vector viewmodel_origin, viewmodel_angles;
+.float weapon_nextthink;
+.float weapon_eta_last;
+.float weapon_switchdelay;
+
+void viewmodel_draw(entity this)
+{
+       int mask = (intermission || (getstati(STAT_HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL;
+       float a = this.alpha;
+       int c = stof(getplayerkeyvalue(current_player, "colors"));
+       vector g;
+       Weapon wep = activeweapon;
+       if (!(g = wep.wr_glow(wep))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+       entity me = CSQCModel_server2csqc(player_localentnum - 1);
+       int fx = ((me.csqcmodel_effects & EFMASK_CHEAP)
+               | EF_NODEPTHTEST)
+               &~ (EF_FULLBRIGHT); // can mask team color, so get rid of it
+       for (entity e = this; e; e = e.weaponchild)
+       {
+               e.drawmask = mask;
+               e.alpha = a;
+               e.colormap = 256 + c;  // colormap == 0 is black, c == 0 is white
+               e.glowmod = g;
+               e.csqcmodel_effects = fx;
+               WITH(entity, self, e, CSQCModel_Effects_Apply());
+       }
+       {
+               static string name_last;
+               string name = wep.mdl;
+               if (name != name_last)
+               {
+                       name_last = name;
+                       CL_WeaponEntity_SetModel(this, name);
+                       this.viewmodel_origin = this.origin;
+                       this.viewmodel_angles = this.angles;
+               }
+               anim_update(this);
+               if (!this.animstate_override)
+                       anim_set(this, this.anim_idle, true, false, false);
+       }
+       float f = 0; // 0..1; 0: fully active
+       float eta = (this.weapon_nextthink - time) / STAT(WEAPONRATEFACTOR);
+       if (eta <= 0) f = this.weapon_eta_last;
+       else switch (this.state)
+       {
+               case WS_RAISE:
+               {
+                       f = eta / max(eta, this.weapon_switchdelay);
+                       break;
+               }
+               case WS_DROP:
+               {
+                       f = 1 - eta / max(eta, this.weapon_switchdelay);
+                       break;
+               }
+               case WS_CLEAR:
+               {
+                       f = 1;
+                       break;
+               }
+       }
+       this.weapon_eta_last = f;
+       this.origin = this.viewmodel_origin;
+       this.angles = this.viewmodel_angles;
+       this.angles_x = (-90 * f * f);
+       viewmodel_animate(this);
+       setorigin(this, this.origin);
+}
+
+entity viewmodel;
+STATIC_INIT(viewmodel) {
+    viewmodel = new(viewmodel);
+    make_pure(viewmodel);
+       viewmodel.draw = viewmodel_draw;
+}
+
 entity porto;
 vector polyline[16];
 void Porto_Draw(entity this)
@@ -36,7 +348,7 @@ void Porto_Draw(entity this)
        vector p, dir, ang, q, nextdir;
        float portal_number, portal1_idx;
 
-       if(activeweapon != WEP_PORTO.m_id || spectatee_status || gametype == MAPINFO_TYPE_NEXBALL)
+       if(activeweapon != WEP_PORTO || spectatee_status || gametype == MAPINFO_TYPE_NEXBALL)
                return;
        if(g_balance_porto_secondary)
                return;
@@ -136,7 +448,7 @@ vector GetCurrentFov(float fov)
        zoomdir = button_zoom;
        if(hud == HUD_NORMAL)
        if(switchweapon == activeweapon)
-       if((activeweapon == WEP_VORTEX.m_id && vortex_scope) || (activeweapon == WEP_RIFLE.m_id && rifle_scope)) // do NOT use switchweapon here
+       if((activeweapon == WEP_VORTEX && vortex_scope) || (activeweapon == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here
                zoomdir += button_attack2;
        if(spectatee_status > 0 || isdemo())
        {
@@ -299,7 +611,7 @@ float EnemyHitCheck()
                return SHOTTYPE_HITWORLD;
        if(n > maxclients)
                return SHOTTYPE_HITWORLD;
-       t = GetPlayerColor(n - 1);
+       t = entcs_GetTeam(n - 1);
        if(teamplay)
                if(t == myteam)
                        return SHOTTYPE_HITTEAM;
@@ -323,17 +635,17 @@ float TrueAimCheck()
 
        switch(activeweapon) // WEAPONTODO
        {
-               case WEP_TUBA.m_id: // no aim
-               case WEP_PORTO.m_id: // shoots from eye
-               case WEP_NEXBALL.m_id: // shoots from eye
-               case WEP_HOOK.m_id: // no trueaim
-               case WEP_MORTAR.m_id: // toss curve
+               case WEP_TUBA: // no aim
+               case WEP_PORTO: // shoots from eye
+               case WEP_NEXBALL: // shoots from eye
+               case WEP_HOOK: // no trueaim
+               case WEP_MORTAR: // toss curve
                        return SHOTTYPE_HITWORLD;
-               case WEP_VORTEX.m_id:
-               case WEP_VAPORIZER.m_id:
+               case WEP_VORTEX:
+               case WEP_VAPORIZER:
                        mv = MOVE_NORMAL;
                        break;
-               case WEP_RIFLE.m_id:
+               case WEP_RIFLE:
                        ta = trueaim_rifle;
                        mv = MOVE_NORMAL;
                        if(zoomscript_caught)
@@ -342,19 +654,19 @@ float TrueAimCheck()
                                return EnemyHitCheck();
                        }
                        break;
-               case WEP_DEVASTATOR.m_id: // projectile has a size!
+               case WEP_DEVASTATOR: // projectile has a size!
                        mi = '-3 -3 -3';
                        ma = '3 3 3';
                        break;
-               case WEP_FIREBALL.m_id: // projectile has a size!
+               case WEP_FIREBALL: // projectile has a size!
                        mi = '-16 -16 -16';
                        ma = '16 16 16';
                        break;
-               case WEP_SEEKER.m_id: // projectile has a size!
+               case WEP_SEEKER: // projectile has a size!
                        mi = '-2 -2 -2';
                        ma = '2 2 2';
                        break;
-               case WEP_ELECTRO.m_id: // projectile has a size!
+               case WEP_ELECTRO: // projectile has a size!
                        mi = '0 0 -3';
                        ma = '0 0 -3';
                        break;
@@ -362,7 +674,7 @@ float TrueAimCheck()
 
        vector traceorigin = entcs_receiver(player_localentnum - 1).origin + (eZ * getstati(STAT_VIEWHEIGHT));
 
-       vecs = decompressShotOrigin(getstati(STAT_SHOTORG));
+       vecs = decompressShotOrigin(STAT(SHOTORG));
 
        traceline(traceorigin, traceorigin + view_forward * MAX_SHOT_DISTANCE, mv, ta);
        trueaimpoint = trace_endpos;
@@ -475,12 +787,12 @@ void UpdateDamage()
 {
        // accumulate damage with each stat update
        static float damage_total_prev = 0;
-       float damage_total = getstati(STAT_DAMAGE_DEALT_TOTAL);
+       float damage_total = STAT(DAMAGE_DEALT_TOTAL);
        float unaccounted_damage_new = COMPARE_INCREASING(damage_total, damage_total_prev);
        damage_total_prev = damage_total;
 
        static float damage_dealt_time_prev = 0;
-       float damage_dealt_time = getstatf(STAT_HIT_TIME);
+       float damage_dealt_time = STAT(HIT_TIME);
        if (damage_dealt_time != damage_dealt_time_prev)
        {
                unaccounted_damage += unaccounted_damage_new;
@@ -501,7 +813,7 @@ void HitSound()
 
        static float hitsound_time_prev = 0;
        // HACK: the only way to get the arc to sound consistent with pitch shift is to ignore cl_hitsound_antispam_time
-       float arc_hack = activeweapon == WEP_ARC.m_id && autocvar_cl_hitsound >= 2;
+       float arc_hack = activeweapon == WEP_ARC && autocvar_cl_hitsound >= 2;
        if (arc_hack || COMPARE_INCREASING(time, hitsound_time_prev) > autocvar_cl_hitsound_antispam_time)
        {
                if (autocvar_cl_hitsound && unaccounted_damage)
@@ -536,7 +848,7 @@ void HitSound()
        }
 
        static float typehit_time_prev = 0;
-       float typehit_time = getstatf(STAT_TYPEHIT_TIME);
+       float typehit_time = STAT(TYPEHIT_TIME);
        if (COMPARE_INCREASING(typehit_time, typehit_time_prev) > autocvar_cl_hitsound_antispam_time)
        {
                sound(world, CH_INFO, SND_TYPEHIT, VOL_BASE, ATTN_NONE);
@@ -607,7 +919,7 @@ void HUD_Crosshair()
 
                if(autocvar_crosshair_per_weapon || (autocvar_crosshair_color_special == 1))
                {
-                       e = get_weaponinfo(switchingweapon);
+                       e = switchingweapon;
                        if(e)
                        {
                                if(autocvar_crosshair_per_weapon)
@@ -712,7 +1024,7 @@ void HUD_Crosshair()
 
                if(autocvar_crosshair_pickup)
                {
-                       float stat_pickup_time = getstatf(STAT_LAST_PICKUP);
+                       float stat_pickup_time = STAT(LAST_PICKUP);
 
                        if(pickup_crosshair_time < stat_pickup_time)
                        {
@@ -819,16 +1131,16 @@ void HUD_Crosshair()
                                ring_scale = autocvar_crosshair_ring_size;
 
                                float weapon_clipload, weapon_clipsize;
-                               weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);
-                               weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);
+                               weapon_clipload = STAT(WEAPON_CLIPLOAD);
+                               weapon_clipsize = STAT(WEAPON_CLIPSIZE);
 
                                float ok_ammo_charge, ok_ammo_chargepool;
-                               ok_ammo_charge = getstatf(STAT_OK_AMMO_CHARGE);
-                               ok_ammo_chargepool = getstatf(STAT_OK_AMMO_CHARGEPOOL);
+                               ok_ammo_charge = STAT(OK_AMMO_CHARGE);
+                               ok_ammo_chargepool = STAT(OK_AMMO_CHARGEPOOL);
 
                                float vortex_charge, vortex_chargepool;
-                               vortex_charge = getstatf(STAT_VORTEX_CHARGE);
-                               vortex_chargepool = getstatf(STAT_VORTEX_CHARGEPOOL);
+                               vortex_charge = STAT(VORTEX_CHARGE);
+                               vortex_chargepool = STAT(VORTEX_CHARGEPOOL);
 
                                float arc_heat = STAT(ARC_HEAT);
 
@@ -837,7 +1149,7 @@ void HUD_Crosshair()
 
 
                                // handle the values
-                               if (autocvar_crosshair_ring && activeweapon == WEP_VORTEX.m_id && vortex_charge && autocvar_crosshair_ring_vortex) // ring around crosshair representing velocity-dependent damage for the vortex
+                               if (autocvar_crosshair_ring && activeweapon == WEP_VORTEX && vortex_charge && autocvar_crosshair_ring_vortex) // ring around crosshair representing velocity-dependent damage for the vortex
                                {
                                        if (vortex_chargepool || use_vortex_chargepool) {
                                                use_vortex_chargepool = 1;
@@ -857,16 +1169,16 @@ void HUD_Crosshair()
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
                                }
-                               else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER.m_id && minelayer_maxmines && autocvar_crosshair_ring_minelayer)
+                               else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer)
                                {
-                                       ring_value = bound(0, getstati(STAT_LAYED_MINES) / minelayer_maxmines, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
+                                       ring_value = bound(0, STAT(LAYED_MINES) / minelayer_maxmines, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
                                        ring_alpha = autocvar_crosshair_ring_minelayer_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring.tga";
                                }
-                               else if (activeweapon == WEP_HAGAR.m_id && getstati(STAT_HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
+                               else if (activeweapon == WEP_HAGAR && STAT(HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
                                {
-                                       ring_value = bound(0, getstati(STAT_HAGAR_LOAD) / hagar_maxrockets, 1);
+                                       ring_value = bound(0, STAT(HAGAR_LOAD) / hagar_maxrockets, 1);
                                        ring_alpha = autocvar_crosshair_ring_hagar_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring.tga";
@@ -887,12 +1199,12 @@ void HUD_Crosshair()
 
                                        // Note: This is to stop Taoki from complaining that the image doesn't match all potential balances.
                                        // if a new image for another weapon is added, add the code (and its respective file/value) here
-                                       if ((activeweapon == WEP_RIFLE.m_id) && (weapon_clipsize == 80))
+                                       if ((activeweapon == WEP_RIFLE) && (weapon_clipsize == 80))
                                                ring_image = "gfx/crosshair_ring_rifle.tga";
                                        else
                                                ring_image = "gfx/crosshair_ring.tga";
                                }
-                               else if ( autocvar_crosshair_ring && autocvar_crosshair_ring_arc && arc_heat && activeweapon == WEP_ARC.m_id )
+                               else if ( autocvar_crosshair_ring && autocvar_crosshair_ring_arc && arc_heat && activeweapon == WEP_ARC )
                                {
                                        ring_value = arc_heat;
                                        ring_alpha = (1-arc_heat)*autocvar_crosshair_ring_arc_cold_alpha +
@@ -1012,20 +1324,20 @@ void HUD_Draw()
                rgb = MUTATOR_ARGV(0, vector);
                a = MUTATOR_ARGV(0, float);
        }
-       else if(getstati(STAT_FROZEN))
+       else if(STAT(FROZEN))
        {
-               rgb = ((getstatf(STAT_REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * getstatf(STAT_REVIVE_PROGRESS)) + ('0 1 1' * getstatf(STAT_REVIVE_PROGRESS) * -1)) : '0.25 0.90 1');
+               rgb = ((STAT(REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * STAT(REVIVE_PROGRESS)) + ('0 1 1' * STAT(REVIVE_PROGRESS) * -1)) : '0.25 0.90 1');
        }
        drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, rgb, autocvar_hud_colorflash_alpha * a, DRAWFLAG_ADDITIVE);
        if(!intermission)
-       if(getstatf(STAT_NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
+       if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
        {
-               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_NADE_TIMER), '0.25 0.90 1' + ('1 0 0' * getstatf(STAT_NADE_TIMER)) - ('0 1 1' * getstatf(STAT_NADE_TIMER)), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(NADE_TIMER), '0.25 0.90 1' + ('1 0 0' * STAT(NADE_TIMER)) - ('0 1 1' * STAT(NADE_TIMER)), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
        }
-       else if(getstatf(STAT_REVIVE_PROGRESS))
+       else if(STAT(REVIVE_PROGRESS))
        {
-               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
        }
 
@@ -1071,7 +1383,7 @@ void CSQC_UpdateView(float w, float h)
        ++framecount;
 
        stats_get();
-       hud = getstati(STAT_HUD);
+       hud = STAT(HUD);
 
        if(hud != HUD_NORMAL && lasthud == HUD_NORMAL)
                vh_notice_time = time + autocvar_cl_vehicles_notify_time;
@@ -1109,7 +1421,7 @@ void CSQC_UpdateView(float w, float h)
                current_player = player_localentnum - 1;
        else // then player_localentnum is the vehicle I'm driving
                current_player = player_localnum;
-       myteam = GetPlayerColor(current_player);
+       myteam = entcs_GetTeam(current_player);
 
        if(myteam != prev_myteam)
        {
@@ -1118,7 +1430,7 @@ void CSQC_UpdateView(float w, float h)
                prev_myteam = myteam;
        }
 
-       ticrate = getstatf(STAT_MOVEVARS_TICRATE) * getstatf(STAT_MOVEVARS_TIMESCALE);
+       ticrate = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
 
        float is_dead = (getstati(STAT_HEALTH) <= 0);
 
@@ -1142,7 +1454,7 @@ void CSQC_UpdateView(float w, float h)
        if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped
        {
                float vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
-               float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && getstati(STAT_ROUNDLOST));
+               float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && STAT(ROUNDLOST));
                entity gen = world;
 
                if(ons_roundlost)
@@ -1395,10 +1707,12 @@ void CSQC_UpdateView(float w, float h)
        ColorTranslateMode = autocvar_cl_stripcolorcodes;
 
        // currently switching-to weapon (for crosshair)
-       switchingweapon = getstati(STAT_SWITCHINGWEAPON);
+       switchingweapon = Weapons_from(STAT(SWITCHINGWEAPON));
 
        // actually active weapon (for zoom)
-       activeweapon = getstati(STAT_ACTIVEWEAPON);
+       activeweapon = Weapons_from(getstati(STAT_ACTIVEWEAPON));
+
+       switchweapon = Weapons_from(STAT(SWITCHWEAPON));
 
        f = (serverflags & SERVERFLAG_TEAMPLAY);
        if(f != teamplay)
@@ -1427,7 +1741,7 @@ void CSQC_UpdateView(float w, float h)
        {
                last_activeweapon = activeweapon;
 
-               e = get_weaponinfo(activeweapon);
+               e = activeweapon;
                if(e.netname != "")
                        localcmd(strcat("\ncl_hook_activeweapon ", e.netname), "\n");
                else
@@ -1560,7 +1874,7 @@ void CSQC_UpdateView(float w, float h)
 
        if(autocvar_cl_reticle)
        {
-               Weapon wep = get_weaponinfo(activeweapon);
+               Weapon wep = activeweapon;
                // Draw the aiming reticle for weapons that use it
                // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use
                // It must be a persisted float for fading out to work properly (you let go of the zoom button for
@@ -1684,7 +1998,7 @@ void CSQC_UpdateView(float w, float h)
                }
        }
 
-       if(autocvar_hud_damage && !getstati(STAT_FROZEN))
+       if(autocvar_hud_damage && !STAT(FROZEN))
        {
                splash_size.x = max(vid_conwidth, vid_conheight);
                splash_size.y = max(vid_conwidth, vid_conheight);
index 1591bad..2100c3f 100644 (file)
@@ -280,46 +280,46 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                self.traileffect = 0;
                switch (self.cnt)
                {
-                       #define CASE(id) case PROJECTILE_##id: setmodel(self, MDL_PROJECTILE_##id);
-                       CASE(ELECTRO)            self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
-                       CASE(ROCKET)             self.traileffect = EFFECT_TR_ROCKET.m_id; self.scale = 2; break;
-                       CASE(CRYLINK)            self.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id; break;
-                       CASE(CRYLINK_BOUNCING)   self.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id; break;
-                       CASE(ELECTRO_BEAM)       self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
-                       CASE(GRENADE)            self.traileffect = EFFECT_TR_GRENADE.m_id; break;
-                       CASE(GRENADE_BOUNCING)   self.traileffect = EFFECT_TR_GRENADE.m_id; break;
-                       CASE(MINE)               self.traileffect = EFFECT_TR_GRENADE.m_id; break;
-                       CASE(BLASTER)            self.traileffect = EFFECT_Null.m_id; break;
-                       CASE(HLAC)               self.traileffect = EFFECT_Null.m_id; break;
-                       CASE(PORTO_RED)          self.traileffect = EFFECT_TR_WIZSPIKE.m_id; self.scale = 4; break;
-                       CASE(PORTO_BLUE)         self.traileffect = EFFECT_TR_WIZSPIKE.m_id; self.scale = 4; break;
-                       CASE(HOOKBOMB)           self.traileffect = EFFECT_TR_KNIGHTSPIKE.m_id; break;
-                       CASE(HAGAR)              self.traileffect = EFFECT_HAGAR_ROCKET.m_id; self.scale = 0.75; break;
-                       CASE(HAGAR_BOUNCING)     self.traileffect = EFFECT_HAGAR_ROCKET.m_id; self.scale = 0.75; break;
-                       CASE(FIREBALL)           self.modelindex = 0; self.traileffect = EFFECT_FIREBALL.m_id; break; // particle effect is good enough
-                       CASE(FIREMINE)           self.modelindex = 0; self.traileffect = EFFECT_FIREMINE.m_id; break; // particle effect is good enough
-                       CASE(TAG)                self.traileffect = EFFECT_TR_ROCKET.m_id; break;
-                       CASE(FLAC)               self.scale = 0.4; self.traileffect = EFFECT_FLAC_TRAIL.m_id; break;
-                       CASE(SEEKER)             self.traileffect = EFFECT_SEEKER_TRAIL.m_id; break;
-
-                       CASE(MAGE_SPIKE)         self.traileffect = EFFECT_TR_VORESPIKE.m_id; break;
-                       CASE(SHAMBLER_LIGHTNING) self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
-
-                       CASE(RAPTORBOMB)         self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = EFFECT_Null.m_id; break;
-                       CASE(RAPTORBOMBLET)      self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = EFFECT_Null.m_id; break;
-                       CASE(RAPTORCANNON)       self.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id; break;
-
-                       CASE(SPIDERROCKET)       self.traileffect = EFFECT_SPIDERBOT_ROCKET_TRAIL.m_id; break;
-                       CASE(WAKIROCKET)         self.traileffect = EFFECT_RACER_ROCKET_TRAIL.m_id; break;
-                       CASE(WAKICANNON)         self.traileffect = EFFECT_Null.m_id; break;
-
-                       CASE(BUMBLE_GUN)         self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
-                       CASE(BUMBLE_BEAM)        self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
-
-                       CASE(RPC)                self.traileffect = EFFECT_TR_ROCKET.m_id; break;
-
-                       CASE(ROCKETMINSTA_LASER) self.traileffect = EFFECT_ROCKETMINSTA_LASER(self.team).m_id; break;
-#undef CASE
+                       #define HANDLE(id) case PROJECTILE_##id: setmodel(self, MDL_PROJECTILE_##id);
+                       HANDLE(ELECTRO)            self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
+                       HANDLE(ROCKET)             self.traileffect = EFFECT_TR_ROCKET.m_id; self.scale = 2; break;
+                       HANDLE(CRYLINK)            self.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id; break;
+                       HANDLE(CRYLINK_BOUNCING)   self.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id; break;
+                       HANDLE(ELECTRO_BEAM)       self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
+                       HANDLE(GRENADE)            self.traileffect = EFFECT_TR_GRENADE.m_id; break;
+                       HANDLE(GRENADE_BOUNCING)   self.traileffect = EFFECT_TR_GRENADE.m_id; break;
+                       HANDLE(MINE)               self.traileffect = EFFECT_TR_GRENADE.m_id; break;
+                       HANDLE(BLASTER)            self.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(HLAC)               self.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(PORTO_RED)          self.traileffect = EFFECT_TR_WIZSPIKE.m_id; self.scale = 4; break;
+                       HANDLE(PORTO_BLUE)         self.traileffect = EFFECT_TR_WIZSPIKE.m_id; self.scale = 4; break;
+                       HANDLE(HOOKBOMB)           self.traileffect = EFFECT_TR_KNIGHTSPIKE.m_id; break;
+                       HANDLE(HAGAR)              self.traileffect = EFFECT_HAGAR_ROCKET.m_id; self.scale = 0.75; break;
+                       HANDLE(HAGAR_BOUNCING)     self.traileffect = EFFECT_HAGAR_ROCKET.m_id; self.scale = 0.75; break;
+                       HANDLE(FIREBALL)           self.modelindex = 0; self.traileffect = EFFECT_FIREBALL.m_id; break; // particle effect is good enough
+                       HANDLE(FIREMINE)           self.modelindex = 0; self.traileffect = EFFECT_FIREMINE.m_id; break; // particle effect is good enough
+                       HANDLE(TAG)                self.traileffect = EFFECT_TR_ROCKET.m_id; break;
+                       HANDLE(FLAC)               self.scale = 0.4; self.traileffect = EFFECT_FLAC_TRAIL.m_id; break;
+                       HANDLE(SEEKER)             self.traileffect = EFFECT_SEEKER_TRAIL.m_id; break;
+
+                       HANDLE(MAGE_SPIKE)         self.traileffect = EFFECT_TR_VORESPIKE.m_id; break;
+                       HANDLE(SHAMBLER_LIGHTNING) self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
+
+                       HANDLE(RAPTORBOMB)         self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(RAPTORBOMBLET)      self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(RAPTORCANNON)       self.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id; break;
+
+                       HANDLE(SPIDERROCKET)       self.traileffect = EFFECT_SPIDERBOT_ROCKET_TRAIL.m_id; break;
+                       HANDLE(WAKIROCKET)         self.traileffect = EFFECT_RACER_ROCKET_TRAIL.m_id; break;
+                       HANDLE(WAKICANNON)         self.traileffect = EFFECT_Null.m_id; break;
+
+                       HANDLE(BUMBLE_GUN)         self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
+                       HANDLE(BUMBLE_BEAM)        self.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
+
+                       HANDLE(RPC)                self.traileffect = EFFECT_TR_ROCKET.m_id; break;
+
+                       HANDLE(ROCKETMINSTA_LASER) self.traileffect = EFFECT_ROCKETMINSTA_LASER(self.team).m_id; break;
+#undef HANDLE
                        default:
                                if (MUTATOR_CALLHOOK(Ent_Projectile, self))
                                        break;
diff --git a/qcsrc/common/anim.qc b/qcsrc/common/anim.qc
new file mode 100644 (file)
index 0000000..6a4dbe5
--- /dev/null
@@ -0,0 +1,49 @@
+#include "anim.qh"
+
+/**
+ * @param anim x = startframe, y = numframes, z = framerate
+ */
+void anim_set(entity e, vector anim, bool looping, bool override, bool restart)
+{
+       if (!anim) return;  // no animation was given to us! We can't use this.
+
+       if (anim.x == e.animstate_startframe)
+       {
+               if (anim.y == e.animstate_numframes)
+               {
+                       if (anim.z == e.animstate_framerate)
+                       {
+                               if (!restart) return;
+                               if (anim.y == 1)  // ZYM animation
+                                       BITXOR_ASSIGN(e.effects, EF_RESTARTANIM_BIT);
+                       }
+               }
+       }
+       e.animstate_startframe = anim.x;
+       e.animstate_numframes = anim.y;
+       e.animstate_framerate = anim.z;
+       e.animstate_starttime = time - 0.1 * frametime;  // shift it a little bit into the past to prevent float inaccuracy hiccups
+       e.animstate_endtime = e.animstate_starttime + e.animstate_numframes / e.animstate_framerate;
+       e.animstate_looping = looping;
+       e.animstate_override = override;
+       e.frame = e.animstate_startframe;
+       e.frame1time = time;
+}
+
+/**
+ * Update e.frame based on its animstate relative to time
+ */
+void anim_update(entity e)
+{
+       if (time >= e.animstate_endtime)
+       {
+               if (e.animstate_looping)
+               {
+                       e.animstate_starttime = e.animstate_endtime;
+                       e.animstate_endtime = e.animstate_starttime + e.animstate_numframes / e.animstate_framerate;
+               }
+               e.animstate_override = false;
+       }
+       float frameofs = bound(0, (time - e.animstate_starttime) * e.animstate_framerate, e.animstate_numframes - 1);
+       e.frame = e.animstate_startframe + frameofs;
+}
diff --git a/qcsrc/common/anim.qh b/qcsrc/common/anim.qh
new file mode 100644 (file)
index 0000000..acf6735
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef ANIM_H
+#define ANIM_H
+
+// begin engine fields
+
+/** primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4) */
+.float frame;
+/** secondary framegroup animation (strength = lerpfrac) */
+.float frame2;
+/** tertiary framegroup animation (strength = lerpfrac3) */
+.float frame3;
+/** quaternary framegroup animation (strength = lerpfrac4) */
+.float frame4;
+
+/** strength of framegroup blend */
+.float lerpfrac;
+/** strength of framegroup blend */
+.float lerpfrac3;
+/** strength of framegroup blend */
+.float lerpfrac4;
+
+/** start time of framegroup animation */
+.float frame1time;
+/** start time of framegroup animation */
+.float frame2time;
+/** start time of framegroup animation */
+.float frame3time;
+/** start time of framegroup animation */
+.float frame4time;
+
+// end engine fields
+
+// player animation state
+
+.int animstate_startframe;
+.int animstate_numframes;
+.float animstate_framerate;
+.float animstate_starttime;
+.float animstate_endtime;
+/** whether to repeat */
+.bool animstate_looping;
+/** true for one cycle, then changed to false */
+.bool animstate_override;
+
+void anim_set(entity e, vector anim, bool looping, bool override, bool restart);
+#define setanim(...) anim_set(__VA_ARGS__)
+void anim_update(entity e);
+#define updateanim(...) anim_update(__VA_ARGS__)
+
+#endif
index 9e16238..efe9f72 100644 (file)
@@ -13,7 +13,7 @@ REGISTRY_SORT(GENERIC_COMMANDS)
        ATTRIB(genericcommand_##id, m_description, string, description); \
        ENDCLASS(genericcommand_##id) \
     REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
-       METHOD(genericcommand_##id, m_invokecmd, void(int request, int arguments, string command))
+       METHOD(genericcommand_##id, m_invokecmd, void(int request, entity caller, int arguments, string command))
 
 STATIC_INIT(GENERIC_COMMANDS_aliases) {
        FOREACH(GENERIC_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu"))));
index 3190954..beda228 100644 (file)
@@ -7,7 +7,7 @@ const int CMD_REQUEST_USAGE = 2;
 CLASS(Command, Object)
        ATTRIB(Command, m_name, string, string_null);
        ATTRIB(Command, m_description, string, string_null);
-       METHOD(Command, m_invokecmd, void(int request, int arguments, string command)) { }
+       METHOD(Command, m_invokecmd, void(int request, entity caller, int arguments, string command)) { }
 ENDCLASS(Command)
 
 #endif
index 9a50894..6fb73cf 100644 (file)
@@ -559,7 +559,7 @@ float GenericCommand_macro_command(float argc, string command)
 {
        string c = strtolower(argv(0));
        FOREACH(GENERIC_COMMANDS, it.m_name == c, LAMBDA(
-               it.m_invokecmd(CMD_REQUEST_COMMAND, argc, command);
+               it.m_invokecmd(CMD_REQUEST_COMMAND, NULL, argc, command);
                return true;
        ));
        return false;
@@ -569,7 +569,7 @@ float GenericCommand_macro_usage(float argc)
 {
        string c = strtolower(argv(1));
        FOREACH(GENERIC_COMMANDS, it.m_name == c, LAMBDA(
-               it.m_invokecmd(CMD_REQUEST_USAGE, argc, "");
+               it.m_invokecmd(CMD_REQUEST_USAGE, NULL, argc, "");
                return true;
        ));
        return false;
index 1ea5a8b..96368bd 100644 (file)
@@ -238,22 +238,12 @@ vector autocvar_sv_player_headsize = '24 24 12';
 
 
 // not so constant
-#ifdef SVQC
-#define PL_VIEW_OFS autocvar_sv_player_viewoffset
-#define PL_MIN autocvar_sv_player_mins
-#define PL_MAX autocvar_sv_player_maxs
-#define PL_CROUCH_VIEW_OFS autocvar_sv_player_crouch_viewoffset
-#define PL_CROUCH_MIN autocvar_sv_player_crouch_mins
-#define PL_CROUCH_MAX autocvar_sv_player_crouch_maxs
-#define PL_HEAD autocvar_sv_player_headsize
-#elif defined(CSQC)
-#define PL_VIEW_OFS vec3(getstatf(STAT_PL_VIEW_OFS1), getstatf(STAT_PL_VIEW_OFS2), getstatf(STAT_PL_VIEW_OFS3))
-#define PL_MIN vec3(getstatf(STAT_PL_MIN1), getstatf(STAT_PL_MIN2), getstatf(STAT_PL_MIN3))
-#define PL_MAX vec3(getstatf(STAT_PL_MAX1), getstatf(STAT_PL_MAX2), getstatf(STAT_PL_MAX3))
-#define PL_CROUCH_VIEW_OFS vec3(getstatf(STAT_PL_CROUCH_VIEW_OFS1), getstatf(STAT_PL_CROUCH_VIEW_OFS2), getstatf(STAT_PL_CROUCH_VIEW_OFS3))
-#define PL_CROUCH_MIN vec3(getstatf(STAT_PL_CROUCH_MIN1), getstatf(STAT_PL_CROUCH_MIN2), getstatf(STAT_PL_CROUCH_MIN3))
-#define PL_CROUCH_MAX vec3(getstatf(STAT_PL_CROUCH_MAX1), getstatf(STAT_PL_CROUCH_MAX2), getstatf(STAT_PL_CROUCH_MAX3))
-#endif
+#define PL_VIEW_OFS STAT(PL_VIEW_OFS, NULL)
+#define PL_CROUCH_VIEW_OFS STAT(PL_CROUCH_VIEW_OFS, NULL)
+#define PL_MIN STAT(PL_MIN, NULL)
+#define PL_CROUCH_MIN STAT(PL_CROUCH_MIN, NULL)
+#define PL_MAX STAT(PL_MAX, NULL)
+#define PL_CROUCH_MAX STAT(PL_CROUCH_MAX, NULL)
 
 // a bit more constant
 const vector PL_MAX_CONST = '16 16 45';
index d86efb5..9f9fa43 100644 (file)
 # define TAG_VIEWLOC_NAME tag_networkviewloc
 # define TAG_VIEWLOC_TYPE int
 .float tag_networkviewloc;
+
+# define MOVETYPE_NAME move_movetype
 #else
 # define TAG_ENTITY_NAME tag_entity
 # define TAG_ENTITY_TYPE entity
 
 # define TAG_VIEWLOC_NAME viewloc
 # define TAG_VIEWLOC_TYPE entity
+
+# define MOVETYPE_NAME movetype
 #endif
 
 // new fields
@@ -63,7 +67,8 @@
        CSQCMODEL_PROPERTY_SCALED(BIT(12), float, ReadByte, WriteByte, scale, 16, 0, 255) \
        CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \
        CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \
-       CSQCMODEL_PROPERTY(BIT(15), int, ReadByte, WriteByte, multijump_count)
+       CSQCMODEL_PROPERTY(BIT(15), int, ReadByte, WriteByte, multijump_count) \
+       CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, MOVETYPE_NAME)
 // TODO get rid of colormod/glowmod here, find good solution for vortex charge glowmod hack; also get rid of some useless properties on non-players that only exist for CopyBody
 
 // add hook function calls here
index dcf64b1..3c953bc 100644 (file)
@@ -40,7 +40,7 @@ const int DT_FIRST = BIT(13);
 #define DEATH_ISVEHICLE(t)      (DEATH_ISSPECIAL(t) && (Deathtypes_from(t - DT_FIRST)).death_msgextra == "vehicle")
 #define DEATH_ISTURRET(t)       (DEATH_ISSPECIAL(t) && (Deathtypes_from(t - DT_FIRST)).death_msgextra == "turret")
 #define DEATH_ISMONSTER(t)      (DEATH_ISSPECIAL(t) && (Deathtypes_from(t - DT_FIRST)).death_msgextra == "monster")
-#define DEATH_WEAPONOF(t)       (DEATH_ISSPECIAL(t) ? WEP_Null : get_weaponinfo((t) & DEATH_WEAPONMASK))
+#define DEATH_WEAPONOF(t)       (DEATH_ISSPECIAL(t) ? WEP_Null : Weapons_from((t) & DEATH_WEAPONMASK))
 #define DEATH_ISWEAPON(t, w)    (DEATH_WEAPONOF(t) == (w))
 
 string Deathtype_Name(int deathtype);
index 76f582e..c5345b3 100644 (file)
@@ -43,6 +43,7 @@ REGISTER_NET_TEMP(net_debug)
 bool autocvar_debugdraw;
 
 #ifdef CSQC
+       string autocvar_debugdraw_filter;
        .int debugdraw_last;
        vector project_3d_to_2d(vector vec);
        void Debug_Draw()
@@ -59,6 +60,7 @@ bool autocvar_debugdraw;
                                if (e.debugdraw_last == debugdraw_frame) continue;
                                e.debugdraw_last = debugdraw_frame;
                                vector rgb = (e.debug) ? '0 0 1' : '1 0 0';
+                               if (autocvar_debugdraw_filter != "" && !strhasword(autocvar_debugdraw_filter, e.classname)) continue;
                                if (is_pure(e))
                                {
                                        if (autocvar_debugdraw < 2) continue;
@@ -79,7 +81,7 @@ bool autocvar_debugdraw;
 #endif
 
 #ifdef SVQC
-       GENERIC_COMMAND(debugdraw_sv, "Dump all server entities")
+       COMMON_COMMAND(debugdraw_sv, "Dump all server entities")
        {
                switch (request)
                {
@@ -109,4 +111,26 @@ bool autocvar_debugdraw;
        }
 #endif
 
+GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
+{
+       switch (request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                   int bufhandle = stof(argv(1));
+                   int string_index = stof(argv(2));
+                       string s = bufstr_get(bufhandle, string_index);
+                       LOG_INFOF("%s\n", s);
+                       return;
+               }
+
+               default:
+               case CMD_REQUEST_USAGE:
+               {
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " bufstr_get bufhandle string_index"));
+                       return;
+               }
+       }
+}
+
 #endif
index d920bd1..71f6a2a 100644 (file)
                 */
                void globalsound(int channel, entity from, entity gs, float r, int chan, float vol, float atten)
                {
+                       assert(IS_PLAYER(from), eprint(from));
                        if (channel == MSG_ONE && !IS_REAL_CLIENT(msg_entity)) return;
                        WriteHeader(channel, globalsound);
                        WriteByte(channel, gs.m_id);
                        WriteByte(channel, r * 255);
                        WriteByte(channel, etof(from));
-                       WriteByte(channel, fabs(chan));
+                       WriteByte(channel, chan);
                        WriteByte(channel, floor(vol * 255));
                        WriteByte(channel, floor(atten * 64));
                        entcs_force_origin(from);
                */
                void playersound(int channel, entity from, entity ps, float r, int chan, float vol, float atten)
                {
+                       assert(IS_PLAYER(from), eprint(from));
                        if (channel == MSG_ONE && !IS_REAL_CLIENT(msg_entity)) return;
                        WriteHeader(channel, playersound);
                        WriteByte(channel, ps.m_id);
                        WriteByte(channel, r * 255);
                        WriteByte(channel, etof(from));
-                       WriteByte(channel, fabs(chan));
+                       WriteByte(channel, chan);
                        WriteByte(channel, floor(vol * 255));
                        WriteByte(channel, floor(atten * 64));
                        entcs_force_origin(from);
@@ -69,7 +71,7 @@
                        string sample = GlobalSound_sample(gs.m_globalsoundstr, r);
                        int who = ReadByte();
                        entity e = entcs_receiver(who - 1);
-                       int chan = ReadByte();
+                       int chan = ReadSByte();
                        float vol = ReadByte() / 255;
                        float atten = ReadByte() / 64;
                        vector o;
                        }
                        else
                        {
-                               entity e = new(globalsound);
-                               e.origin = o;
+                               // Can this happen?
+                               LOG_WARNINGF("Missing entcs data for player %d\n", who);
                                sound8(e, o, chan, sample, vol, atten, 0, 0);
-                               remove(e);  // debug with: e.think = SUB_Remove; e.nextthink = time + 1;
                        }
                        return true;
                }
                        UpdatePlayerSounds(e);
                        string s = e.(ps.m_playersoundfld);
                        string sample = GlobalSound_sample(s, r);
-                       int chan = ReadByte();
+                       int chan = ReadSByte();
                        float vol = ReadByte() / 255;
                        float atten = ReadByte() / 64;
                        vector o;
                        }
                        else
                        {
-                               LOG_WARNINGF("Missing entcs data for player %d\n", who);
                                // Can this happen?
-                               entity e = new(playersound);
-                               e.origin = o;
+                               LOG_WARNINGF("Missing entcs data for player %d\n", who);
                                sound8(e, o, chan, sample, vol, atten, 0, 0);
-                               remove(e);  // debug with: e.think = SUB_Remove; e.nextthink = time + 1;
                        }
                        return true;
                }
 
        #ifdef SVQC
 
-               void _GlobalSound(entity gs, entity ps, string sample, int chan, int voicetype, bool fake)
+               bool autocvar_g_debug_globalsounds;
+
+               void _GlobalSound(entity this, entity gs, entity ps, string sample, int chan, int voicetype, bool fake)
                {
-                       SELFPARAM();
                        if (gs == NULL && ps == NULL && sample == "") return;
                        float r = random();
                        if (sample != "") sample = GlobalSound_sample(sample, r);
                                        }
                                        else
                                        {
-                                               if (gs) globalsound(MSG_ALL, this, gs, r, chan, VOL_BASE, ATTEN_NORM);
+                                               if (gs)
+                                               {
+                                                       if(autocvar_g_debug_globalsounds)
+                                                               globalsound(MSG_ALL, this, gs, r, chan, VOL_BASE, ATTEN_NORM);
+                                                       else
+                                                               _sound(this, chan, GlobalSound_sample(gs.m_globalsoundstr, r), VOL_BASE, ATTEN_NORM);
+                                               }
                                                else if (ps) playersound(MSG_ALL, this, ps, r, chan, VOL_BASE, ATTEN_NORM);
                                                else _sound(this, chan, sample, VOL_BASE, ATTEN_NORM);
                                        }
index 4b86da5..892d3d0 100644 (file)
@@ -121,11 +121,11 @@ void PrecachePlayerSounds(string f);
 
 #ifdef SVQC
 
-       void _GlobalSound(entity gs, entity ps, string sample, float chan, float voicetype, bool fake);
-       #define GlobalSound(def, chan, voicetype) _GlobalSound(def, NULL, string_null, chan, voicetype, false)
-       #define GlobalSound_string(def, chan, voicetype) _GlobalSound(NULL, NULL, def, chan, voicetype, false)
-       #define PlayerSound(def, chan, voicetype) _GlobalSound(NULL, def, string_null, chan, voicetype, false)
-       #define VoiceMessage(def, msg) \
+       void _GlobalSound(entity this, entity gs, entity ps, string sample, float chan, float voicetype, bool fake);
+       #define GlobalSound(this, def, chan, voicetype) _GlobalSound(this, def, NULL, string_null, chan, voicetype, false)
+       #define GlobalSound_string(this, def, chan, voicetype) _GlobalSound(this, NULL, NULL, def, chan, voicetype, false)
+       #define PlayerSound(thise, def, chan, voicetype) _GlobalSound(this, NULL, def, string_null, chan, voicetype, false)
+       #define VoiceMessage(this, def, msg) \
                do \
                { \
                        entity VM = def; \
@@ -136,7 +136,7 @@ void PrecachePlayerSounds(string f);
                        if (IS_SPEC(this) || IS_OBSERVER(this) || flood < 0) fake = true; \
                        else if (flood > 0) fake = false; \
                        else break; \
-                       _GlobalSound(NULL, VM, string_null, CH_VOICE, voicetype, fake); \
+                       _GlobalSound(this, NULL, VM, string_null, CH_VOICE, voicetype, fake); \
                } \
                while (0)
 
index c07fad0..4aa31ed 100644 (file)
@@ -3,36 +3,36 @@
 // #define PROP(public, fld, sv, cl)
 #define ENTCS_NETPROPS(PROP) \
        PROP(true, sv_entnum, \
-       { WriteByte(MSG_ENTITY, etof(player) - 1); }, \
+       { WriteByte(chan, etof(player) - 1); }, \
        { this.sv_entnum = ReadByte(); }) \
     \
        PROP(false, origin, \
-       { WriteShort(MSG_ENTITY, this.origin.x);  WriteShort(MSG_ENTITY, this.origin.y); \
-         WriteShort(MSG_ENTITY, this.origin.z); }, \
+       { WriteShort(chan, this.origin.x);  WriteShort(chan, this.origin.y); \
+         WriteShort(chan, this.origin.z); }, \
        { this.has_sv_origin = true; vector v; v.x = ReadShort(); v.y = ReadShort(); v.z = ReadShort(); setorigin(this, v); }) \
     \
        PROP(false, angles_y, \
-       { WriteByte(MSG_ENTITY, this.angles.y / 360 * 256); }, \
+       { WriteByte(chan, this.angles.y / 360 * 256); }, \
        { vector v = '0 0 0'; v.y = ReadByte() / 256 * 360; this.angles = v; }) \
     \
        PROP(false, health, \
-       { WriteByte(MSG_ENTITY, this.health / 10);  /* FIXME: use a better scale? */ }, \
+       { WriteByte(chan, this.health / 10);  /* FIXME: use a better scale? */ }, \
        { this.healthvalue = ReadByte() * 10; }) \
     \
        PROP(false, armorvalue, \
-       { WriteByte(MSG_ENTITY, this.armorvalue / 10);  /* FIXME: use a better scale? */ }, \
+       { WriteByte(chan, this.armorvalue / 10);  /* FIXME: use a better scale? */ }, \
        { this.armorvalue = ReadByte() * 10; }) \
     \
        PROP(true, netname, \
-       { WriteString(MSG_ENTITY, this.netname); }, \
+       { WriteString(chan, this.netname); }, \
        { if (this.netname) strunzone(this.netname); this.netname = strzone(ReadString()); }) \
     \
        PROP(true, model, \
-       { WriteString(MSG_ENTITY, this.model); }, \
+       { WriteString(chan, this.model); }, \
        { if (this.model) strunzone(this.model); this.model = strzone(ReadString()); }) \
     \
        PROP(true, skin, \
-       { WriteByte(MSG_ENTITY, this.skin); }, \
+       { WriteByte(chan, this.skin); }, \
        { this.skin = ReadByte(); }) \
     \
        /**/
@@ -49,7 +49,7 @@
                if (i >= BITS(16 - 1)) LOG_FATAL("Exceeded ENTCS_NETPROPS limit");
        }
 
-       bool entcs_send(entity this, entity to, int sf)
+       bool _entcs_send(entity this, entity to, int sf, int chan)
        {
                entity player = this.owner;
                sf |= BIT(0) | BIT(1);
                this.m_forceupdate = 0;
                bool valid =
                    IS_PLAYER(player)             // player must be active
-                   && player.deadflag == DEAD_NO // player must be alive
                    || player == to               // player is self
                ;
                if (!valid) sf = 0;
-               WriteHeader(MSG_ENTITY, ENT_CLIENT_ENTCS);
-               WriteShort(MSG_ENTITY, sf);
+               if (chan == MSG_ENTITY)
+                       WriteHeader(chan, ENT_CLIENT_ENTCS);
+               else
+                       WriteHeader(chan, CLIENT_ENTCS);
+               WriteByte(chan, etof(player) - 1);
+               WriteShort(chan, sf);
                int i = 1;
                #define X(public, fld, sv, cl) { if (sf & BIT(i)) sv; } i += 1;
                ENTCS_NETPROPS(X);
                return true;
        }
 
+       bool entcs_send(entity this, entity to, int sf)
+       {
+               return _entcs_send(this, to, sf, MSG_ENTITY);
+       }
+
        void entcs_think()
        {
                SELFPARAM();
                e.think = entcs_think;
                e.nextthink = time;
                Net_LinkEntity(e, false, 0, entcs_send);
+               if (!IS_REAL_CLIENT(player)) return;
+               FOR_EACH_CLIENT(e)
+               {
+                       assert(e.entcs);
+                       _entcs_send(e.entcs, msg_entity = player, BITS(23), MSG_ONE);
+               }
        }
 
        void entcs_detach(entity player)
        void Ent_RemoveEntCS()
        {
                SELFPARAM();
-               entcs_receiver(this.sv_entnum, NULL);
+               int n = this.sv_entnum;
+               entity e = entcs_receiver(n);
+               entcs_receiver(n, NULL);
+               if (e != this) remove(e);
        }
 
        void entcs_think()
        {
                SELFPARAM();
-               this.nextthink = time;
                entity e = CSQCModel_server2csqc(this.sv_entnum);
-               bool exists = e != NULL;
-               if (exists)
+               if (e == NULL)
                {
-                       this.has_origin = true;
-                       this.origin = e.origin;
-                       // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it
-                       if (this.model != e.model)
-                       {
-                               if (this.model) strunzone(this.model);
-                               this.model = strzone(e.model);
-                       }
+                       this.has_origin = this.has_sv_origin;
+                       return;
                }
-               else
+               this.has_origin = true;
+               this.origin = e.origin;
+               // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it
+               if (this.model != e.model)
                {
-                       this.has_origin = this.has_sv_origin;
+                       if (this.model) strunzone(this.model);
+                       this.model = strzone(e.model);
                }
        }
 
-       NET_HANDLE(ENT_CLIENT_ENTCS, bool isnew)
+       bool ReadEntcs(entity this)
        {
-               if (isnew)
+               int n = ReadByte();
+               entity e = entcs_receiver(n);
+               if (e == NULL)
                {
-                       make_pure(this);
-                       this.classname = "entcs_receiver";
-                       this.entremove = Ent_RemoveEntCS;
-                       this.think = entcs_think;
-                       this.nextthink = time;
+                       if (this)
+                       {
+                               e = this;
+                       }
+                       else
+                       {
+                               e = new(entcs_receiver);
+                               make_pure(e);
+                       }
+                       e.sv_entnum = n;
+                       e.think = entcs_think;
+                       entcs_receiver(n, e);
+               }
+               else if (this && e != this)
+               {
+                       this.classname = "entcs_gc";
+                       this.sv_entnum = n;
                }
+               this = e;
                InterpolateOrigin_Undo(this);
+               this.sv_entnum = n;
                int sf = ReadShort();
                this.has_sv_origin = false;
                this.m_entcs_private = boolean(sf & BIT(0));
                #define X(public, fld, sv, cl) { if (sf & BIT(i)) cl; } i += 1;
                ENTCS_NETPROPS(X);
        #undef X
-               entcs_receiver(this.sv_entnum, this);
                this.iflags |= IFLAG_ORIGIN;
                InterpolateOrigin_Note(this);
+               WITH(entity, self, this, this.think());
                return true;
        }
 
+       NET_HANDLE(ENT_CLIENT_ENTCS, bool isnew)
+       {
+               if (isnew)
+               {
+                       make_pure(this);
+                       this.classname = "entcs_receiver";
+                       this.entremove = Ent_RemoveEntCS;
+               }
+               return ReadEntcs(this);
+       }
+
+       NET_HANDLE(CLIENT_ENTCS, bool isnew)
+       {
+               return ReadEntcs(NULL);
+       }
+
 #endif
index 7f77352..8122ccd 100644 (file)
@@ -2,6 +2,7 @@
 #define ENT_CS_H
 
 REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
+REGISTER_NET_TEMP(CLIENT_ENTCS)
 
 /** True when private information such as origin is available */
 .bool m_entcs_private;
@@ -40,14 +41,14 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
 
 #ifdef CSQC
 
-       AL_declare(_entcs);
+       ArrayList _entcs;
        STATIC_INIT(_entcs)
        {
-               AL_init(_entcs, 255, NULL, e);  // 255 is the engine limit on maxclients
+               AL_NEW(_entcs, 255, NULL, e);  // 255 is the engine limit on maxclients
        }
        SHUTDOWN(_entcs)
        {
-               AL_delete(_entcs);
+               AL_DELETE(_entcs);
        }
        #define entcs_receiver(...) EVAL(OVERLOAD(entcs_receiver, __VA_ARGS__))
        #define entcs_receiver_1(i) AL_gete(_entcs, i)
@@ -55,10 +56,19 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
        #define entcs_is_self(e) ((e).sv_entnum == player_localentnum - 1)
 
        /**
+     * @param i zero indexed player
+     */
+       bool entcs_IsSpectating(int i)
+       {
+               bool unconnected = !playerslots[i].gotscores;
+               return unconnected || stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR;
+       }
+
+       /**
        * @param i zero indexed player
        * @returns 0 if not teamplay
        */
-       int GetPlayerColorForce(int i)
+       int entcs_GetTeamColor(int i)
        {
                return (!teamplay) ? 0 : stof(getplayerkeyvalue(i, "colors")) & 15;
        }
@@ -67,17 +77,15 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
        * @param i zero indexed player
        * @returns 0 if not teamplay | NUM_TEAM_##N | NUM_SPECTATOR
        */
-       int GetPlayerColor(int i)
+       int entcs_GetTeam(int i)
        {
-               bool unconnected = !playerslots[i].gotscores;
-               bool spec = unconnected || stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR;
-               return (spec) ? NUM_SPECTATOR : GetPlayerColorForce(i);
+               return entcs_IsSpectating(i) ? NUM_SPECTATOR : entcs_GetTeamColor(i);
        }
 
        /**
        * @param i zero indexed player
        */
-       string GetPlayerName(int i)
+       string entcs_GetName(int i)
        {
                return ColorTranslateRGB(getplayerkeyvalue(i, "name"));
        }
@@ -92,7 +100,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
     /**
      * @param i zero indexed player
      */
-       float getplayeralpha(int i)
+       float entcs_GetAlpha(int i)
        {
                entity e = CSQCModel_server2csqc(i);
                return e ? e.alpha : 1;
@@ -101,7 +109,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
     /**
      * @param i zero indexed player
      */
-       vector getcsqcplayercolor(int i)
+       vector entcs_GetColor(int i)
        {
                entity e = CSQCModel_server2csqc(i);
                return (!e || e.colormap <= 0)
@@ -115,7 +123,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
     /**
      * @param i zero indexed player
      */
-       bool getplayerisdead(int i)
+       bool entcs_IsDead(int i)
        {
                entity e = CSQCModel_server2csqc(i);
                return e ? e.csqcmodel_isdead : false;
index 1850b46..2206df7 100644 (file)
@@ -2,7 +2,7 @@
 
 #ifdef IMPLEMENTATION
 #ifdef SVQC
-.float metertime;
+.float metertime = _STAT(NB_METERSTART);
 
 int autocvar_g_nexball_goalleadlimit;
 #define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
@@ -186,7 +186,7 @@ void GiveBall(entity plyr, entity ball)
        Weapon w = WEP_NEXBALL;
        w.wr_resetplayer(w);
        plyr.switchweapon = WEP_NEXBALL.m_id;
-       W_SwitchWeapon(WEP_NEXBALL.m_id);
+       W_SwitchWeapon(WEP_NEXBALL);
        setself(this);
 }
 
@@ -972,7 +972,7 @@ MUTATOR_HOOKFUNCTION(nb, PlayerPreThink)
                                Weapon w = WEP_NEXBALL;
                                w.wr_resetplayer(w);
                                self.switchweapon = self.(weaponentity).switchweapon;
-                               W_SwitchWeapon(self.switchweapon);
+                               W_SwitchWeapon(Weapons_from(self.switchweapon));
 
                                self.(weaponentity).weapons = '0 0 0';
                        }
@@ -1072,7 +1072,6 @@ REGISTER_MUTATOR(nb, g_nexball)
                if(g_nexball_meter_period <= 0)
                        g_nexball_meter_period = 2; // avoid division by zero etc. due to silly users
                g_nexball_meter_period = rint(g_nexball_meter_period * 32) / 32; //Round to 1/32ths to send as a byte multiplied by 32
-               addstat(STAT_NB_METERSTART, AS_FLOAT, metertime);
 
                // General settings
                /*
index ae62e5d..9cafd1a 100644 (file)
@@ -76,7 +76,7 @@ bool ons_stalemate;
 
 .float teleport_antispam;
 
-.bool ons_roundlost;
+.bool ons_roundlost = _STAT(ROUNDLOST);
 
 // waypoint sprites
 .entity bot_basewaypoint; // generator waypointsprite
@@ -1342,7 +1342,7 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s
        for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                // Find weapon
-               if(self.weapons & WepSet_FromWeapon(i))
+               if(self.weapons & WepSet_FromWeapon(Weapons_from(i)))
                if(++c>=4)
                        break;
        }
@@ -2318,8 +2318,6 @@ void ons_Initialize()
        g_onslaught = true;
        ons_captureshield_force = autocvar_g_onslaught_shield_force;
 
-       addstat(STAT_ROUNDLOST, AS_INT, ons_roundlost);
-
        InitializeEntity(world, ons_DelayedInit, INITPRIO_GAMETYPE);
 }
 
diff --git a/qcsrc/common/impulses/all.qc b/qcsrc/common/impulses/all.qc
new file mode 100644 (file)
index 0000000..b056751
--- /dev/null
@@ -0,0 +1 @@
+#include "all.qh"
diff --git a/qcsrc/common/impulses/all.qh b/qcsrc/common/impulses/all.qh
new file mode 100644 (file)
index 0000000..a42c0b0
--- /dev/null
@@ -0,0 +1,216 @@
+#ifndef IMPULSES_ALL_H
+#define IMPULSES_ALL_H
+
+REGISTRY(IMPULSES, 255)
+REGISTER_REGISTRY(IMPULSES)
+REGISTRY_SORT(IMPULSES)
+STATIC_INIT(IMPULSES_renumber)
+{
+       FOREACH(IMPULSES, true, LAMBDA(it.m_id = i));
+}
+REGISTRY_CHECK(IMPULSES)
+
+.void(entity this) impulse_handle;
+
+#if defined(CSQC)
+#define IMPULSE_ALIAS(alias, id) localcmd("\nalias " #alias " \"" id "\"\n")
+#else
+#define IMPULSE_ALIAS(alias, id)
+#endif
+
+#define REGISTER_IMPULSE(id, n) _REGISTER_IMPULSE(IMP_##id, id, n)
+#define _REGISTER_IMPULSE(id, alias, n) \
+       REGISTER(IMPULSES, id, m_id, new(Impulse)) \
+       { \
+               make_pure(this); \
+               this.impulse = n; \
+               IMPULSE_ALIAS(alias, "impulse " #n); \
+       }
+
+#define LEGACY_IMPULSE(alias, id, new) \
+       STATIC_INIT(legacy_##alias) { IMPULSE_ALIAS(alias, new); } \
+       SHUTDOWN(legacy_##alias) { IMPULSE_ALIAS(alias, "impulse " #id); }
+
+#define X(slot, imp) \
+       REGISTER_IMPULSE(weapon_group_##slot, imp) \
+       LEGACY_IMPULSE(weapon_group_##slot, imp, "impulse " #imp)
+X(1, 1)
+X(2, 2)
+X(3, 3)
+X(4, 4)
+X(5, 5)
+X(6, 6)
+X(7, 7)
+X(8, 8)
+X(9, 9)
+X(0, 14)
+#undef X
+
+#define X(slot, dir, imp) \
+       REGISTER_IMPULSE(weapon_priority_##slot##_##dir, imp) \
+       LEGACY_IMPULSE(weapon_priority_##slot##_##dir, imp, "impulse " #imp)
+X(0, prev, 200)
+X(1, prev, 201)
+X(2, prev, 202)
+X(3, prev, 203)
+X(4, prev, 204)
+X(5, prev, 205)
+X(6, prev, 206)
+X(7, prev, 207)
+X(8, prev, 208)
+X(9, prev, 209)
+
+X(0, best, 210)
+X(1, best, 211)
+X(2, best, 212)
+X(3, best, 213)
+X(4, best, 214)
+X(5, best, 215)
+X(6, best, 216)
+X(7, best, 217)
+X(8, best, 218)
+X(9, best, 219)
+
+X(0, next, 220)
+X(1, next, 221)
+X(2, next, 222)
+X(3, next, 223)
+X(4, next, 224)
+X(5, next, 225)
+X(6, next, 226)
+X(7, next, 227)
+X(8, next, 228)
+X(9, next, 229)
+#undef X
+
+// direct weapons
+
+#define X(i, imp) \
+       REGISTER_IMPULSE(weapon_byid_##i, imp)
+X(0, 230)
+X(1, 231)
+X(2, 232)
+X(3, 233)
+X(4, 234)
+X(5, 235)
+X(6, 236)
+X(7, 237)
+X(8, 238)
+X(9, 239)
+X(10, 240)
+X(11, 241)
+X(12, 242)
+X(13, 243)
+X(14, 244)
+X(15, 245)
+X(16, 246)
+X(17, 247)
+X(18, 248)
+X(19, 249)
+X(20, 250)
+X(21, 251)
+X(22, 252)
+X(23, 253)
+#undef X
+
+REGISTER_IMPULSE(weapon_next_byid, 10)
+LEGACY_IMPULSE(_weapnext_2, 10, "weapon_next_byid")
+
+REGISTER_IMPULSE(weapon_prev_byid, 12)
+LEGACY_IMPULSE(_weapprev_2, 12, "weapon_prev_byid")
+
+REGISTER_IMPULSE(weapon_next_bygroup, 18)
+LEGACY_IMPULSE(_weapnext_0, 18, "weapon_next_bygroup")
+
+REGISTER_IMPULSE(weapon_prev_bygroup, 19)
+LEGACY_IMPULSE(_weapprev_0, 19, "weapon_prev_bygroup")
+
+REGISTER_IMPULSE(weapon_next_bypriority, 15)
+LEGACY_IMPULSE(_weapnext_1, 15, "weapon_next_bypriority")
+
+REGISTER_IMPULSE(weapon_prev_bypriority, 16)
+LEGACY_IMPULSE(_weapprev_1, 16, "weapon_prev_bypriority")
+
+REGISTER_IMPULSE(weapon_last, 11)
+LEGACY_IMPULSE(weaplast, 11, "weapon_last")
+
+REGISTER_IMPULSE(weapon_best, 13)
+LEGACY_IMPULSE(weapbest, 13, "weapon_best")
+
+REGISTER_IMPULSE(weapon_drop, 17)
+LEGACY_IMPULSE(dropweapon, 17, "weapon_drop")
+
+REGISTER_IMPULSE(weapon_reload, 20)
+LEGACY_IMPULSE(reload, 20, "weapon_reload")
+
+REGISTER_IMPULSE(use, 21)
+LEGACY_IMPULSE(use, 21, "use")
+
+REGISTER_IMPULSE(waypoint_personal_here, 30)
+LEGACY_IMPULSE(g_waypointsprite_personal, 30, "waypoint_personal_here")
+
+REGISTER_IMPULSE(waypoint_personal_crosshair, 31)
+LEGACY_IMPULSE(g_waypointsprite_personal_p, 31, "waypoint_personal_crosshair")
+
+REGISTER_IMPULSE(waypoint_personal_death, 32)
+LEGACY_IMPULSE(g_waypointsprite_personal_d, 32, "waypoint_personal_death")
+
+REGISTER_IMPULSE(waypoint_here_follow, 33)
+LEGACY_IMPULSE(g_waypointsprite_team_helpme, 33, "waypoint_here_follow")
+
+REGISTER_IMPULSE(waypoint_here_here, 34)
+LEGACY_IMPULSE(g_waypointsprite_team_here, 34, "waypoint_here_here")
+
+REGISTER_IMPULSE(waypoint_here_crosshair, 35)
+LEGACY_IMPULSE(g_waypointsprite_team_here_p, 35, "waypoint_here_crosshair")
+
+REGISTER_IMPULSE(waypoint_here_death, 36)
+LEGACY_IMPULSE(g_waypointsprite_team_here_d, 36, "waypoint_here_death")
+
+REGISTER_IMPULSE(waypoint_danger_here, 37)
+LEGACY_IMPULSE(g_waypointsprite_team_danger, 37, "waypoint_danger_here")
+
+REGISTER_IMPULSE(waypoint_danger_crosshair, 38)
+LEGACY_IMPULSE(g_waypointsprite_team_danger_p, 38, "waypoint_danger_crosshair")
+
+REGISTER_IMPULSE(waypoint_danger_death, 39)
+LEGACY_IMPULSE(g_waypointsprite_team_danger_d, 39, "waypoint_danger_death")
+
+REGISTER_IMPULSE(waypoint_clear_personal, 47)
+LEGACY_IMPULSE(g_waypointsprite_clear_personal, 47, "waypoint_clear_personal")
+
+REGISTER_IMPULSE(waypoint_clear, 48)
+LEGACY_IMPULSE(g_waypointsprite_clear, 48, "waypoint_clear")
+
+REGISTER_IMPULSE(navwaypoint_spawn, 103)
+LEGACY_IMPULSE(g_waypointeditor_spawn, 103, "navwaypoint_spawn")
+
+REGISTER_IMPULSE(navwaypoint_remove, 104)
+LEGACY_IMPULSE(g_waypointeditor_remove, 104, "navwaypoint_remove")
+
+REGISTER_IMPULSE(navwaypoint_relink, 105)
+LEGACY_IMPULSE(g_waypointeditor_relinkall, 105, "navwaypoint_relink")
+
+REGISTER_IMPULSE(navwaypoint_save, 106)
+LEGACY_IMPULSE(g_waypointeditor_saveall, 106, "navwaypoint_save")
+
+REGISTER_IMPULSE(navwaypoint_unreachable, 107)
+LEGACY_IMPULSE(g_waypointeditor_unreachable, 107, "navwaypoint_unreachable")
+
+#define CHIMPULSE(id, n) _CHIMPULSE(CHIMPULSE_##id, n)
+#define _CHIMPULSE(id, n) \
+       REGISTER(IMPULSES, id, m_id, new(Impulse)) \
+       { \
+               make_pure(this); \
+               this.impulse = n; \
+       }
+
+CHIMPULSE(SPEEDRUN_INIT, 30)
+CHIMPULSE(GIVE_ALL, 99)
+CHIMPULSE(CLONE_MOVING, 140)
+CHIMPULSE(SPEEDRUN, 141)
+CHIMPULSE(CLONE_STANDING, 142)
+CHIMPULSE(TELEPORT, 143)
+CHIMPULSE(R00T, 148)
+
+#endif
index 3ea50ca..a9f4a4f 100644 (file)
@@ -212,7 +212,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew)
                        minigame_read_owner();
                        float ent = ReadLong();
                        self.minigame_playerslot = ent;
-                       LOG_DEBUG("Player: ",GetPlayerName(ent-1),"\n");
+                       LOG_DEBUG("Player: ",entcs_GetName(ent-1),"\n");
 
                        activate = (ent == player_localnum+1 && self.owner && self.owner != active_minigame);
 
index 822aff3..e93c95c 100644 (file)
@@ -283,11 +283,11 @@ void HUD_MinigameMenu_ClickInvite()
                entity prev = self;
                for(int i = 0; i < maxclients; ++i)
                {
-                       if ( player_localnum != i && playerslots[i] && GetPlayerName(i) != "" &&
+                       if ( player_localnum != i && playerslots[i] && entcs_GetName(i) != "" &&
                                !findfloat(world,minigame_playerslot,i+1) && playerslots[i].ping )
                        {
                                e = HUD_MinigameMenu_SpawnSubEntry(
-                                       strzone(GetPlayerName(i)), HUD_MinigameMenu_ClickInvite_Entry,
+                                       strzone(entcs_GetName(i)), HUD_MinigameMenu_ClickInvite_Entry,
                                        self );
                                e.flags |= 1;
                                e.netname = strzone(ftos(i+1));
index a311005..ed84b64 100644 (file)
@@ -854,7 +854,7 @@ void bd_hud_status(vector pos, vector mySize)
                {
                        mypos = pos;
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               GetPlayerName(e.minigame_playerslot-1),
+                               entcs_GetName(e.minigame_playerslot-1),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        mypos_y += player_fontsize_y;
@@ -1143,4 +1143,4 @@ int bd_client_event(entity minigame, string event, ...)
        return false;
 }
 
-#endif
\ No newline at end of file
+#endif
index a7ba050..9b9d570 100644 (file)
@@ -302,7 +302,7 @@ void c4_hud_board(vector pos, vector mySize)
                FOREACH_MINIGAME_ENTITY(e)
                        if ( e.classname == "minigame_player" &&
                                        e.team == (active_minigame.minigame_flags & C4_TURN_TEAM) )
-                               playername = GetPlayerName(e.minigame_playerslot-1);
+                               playername = entcs_GetName(e.minigame_playerslot-1);
 
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
@@ -352,7 +352,7 @@ void c4_hud_status(vector pos, vector mySize)
                        if ( e.team == 2 )
                                mypos_y  += player_fontsize_y + ts_y;
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               GetPlayerName(e.minigame_playerslot-1),
+                               entcs_GetName(e.minigame_playerslot-1),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        mypos_y += player_fontsize_y;
index 93c88f6..e4e0dc6 100644 (file)
@@ -477,7 +477,7 @@ void nmm_hud_board(vector pos, vector mySize)
                FOREACH_MINIGAME_ENTITY(e)
                        if ( e.classname == "minigame_player" &&
                                        e.team == (active_minigame.minigame_flags & NMM_TURN_TEAM) )
-                               playername = GetPlayerName(e.minigame_playerslot-1);
+                               playername = entcs_GetName(e.minigame_playerslot-1);
 
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
@@ -531,7 +531,7 @@ void nmm_hud_status(vector pos, vector mySize)
                        if ( e.team == 2 )
                                mypos_y  += player_fontsize_y + ts_y;
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               GetPlayerName(e.minigame_playerslot-1),
+                               entcs_GetName(e.minigame_playerslot-1),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                else if ( e.classname == "minigame_board_piece" )
index 540f7ec..359003f 100644 (file)
@@ -566,7 +566,7 @@ void pong_hud_status(vector pos, vector mySize)
                        drawfill(mypos, ts, pong_team_to_color(e.team), 0.25, DRAWFLAG_ADDITIVE);
 
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               (e.minigame_playerslot ? GetPlayerName(e.minigame_playerslot-1) : _("AI")),
+                               (e.minigame_playerslot ? entcs_GetName(e.minigame_playerslot-1) : _("AI")),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        drawstring(mypos+eY*player_fontsize_y,ftos(e.pong_score),'48 48 0',
index 3ef2124..a66a839 100644 (file)
@@ -354,7 +354,7 @@ void pp_hud_board(vector pos, vector mySize)
                FOREACH_MINIGAME_ENTITY(e)
                        if ( e.classname == "minigame_player" &&
                                        e.team == (active_minigame.minigame_flags & PP_TURN_TEAM) )
-                               playername = GetPlayerName(e.minigame_playerslot-1);
+                               playername = entcs_GetName(e.minigame_playerslot-1);
 
                vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
                vector win_sz;
@@ -412,7 +412,7 @@ void pp_hud_status(vector pos, vector mySize)
                        if ( e.team == 2 )
                                mypos_y  += player_fontsize_y + ts_y;
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               GetPlayerName(e.minigame_playerslot-1),
+                               entcs_GetName(e.minigame_playerslot-1),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        mypos_y += player_fontsize_y;
index 54be75c..4eb0009 100644 (file)
@@ -464,7 +464,7 @@ void ps_hud_status(vector pos, vector mySize)
                {
                        mypos = pos;
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               GetPlayerName(e.minigame_playerslot-1),
+                               entcs_GetName(e.minigame_playerslot-1),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        mypos_y += player_fontsize_y;
index cbb1342..371df34 100644 (file)
@@ -703,7 +703,7 @@ void snake_hud_status(vector pos, vector mySize)
                        if ( e.team > 1 )
                                mypos_y  += player_fontsize_y + (ts_y * (e.team - 1));
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               GetPlayerName(e.minigame_playerslot-1),
+                               entcs_GetName(e.minigame_playerslot-1),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        vector tile_color = snake_teamcolor(e.team);
@@ -850,4 +850,4 @@ int snake_client_event(entity minigame, string event, ...)
        return false;
 }
 
-#endif
\ No newline at end of file
+#endif
index c3c7637..cd9565a 100644 (file)
@@ -295,7 +295,7 @@ void ttt_hud_status(vector pos, vector mySize)
                        if ( e.team == 2 )
                                mypos_y  += player_fontsize_y + ts_y;
                        minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
-                               (e.minigame_playerslot ? GetPlayerName(e.minigame_playerslot-1) : _("AI")),
+                               (e.minigame_playerslot ? entcs_GetName(e.minigame_playerslot-1) : _("AI")),
                                player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        mypos_y += player_fontsize_y;
index f69fc15..672f7f0 100644 (file)
@@ -290,12 +290,13 @@ entity minigame_find_player(entity client)
        return world;
 }
 
-bool MinigameImpulse(int imp)
-{SELFPARAM();
-       entity e = minigame_find_player(self);
-       if ( imp && self.active_minigame && e )
+bool MinigameImpulse(entity this, int imp)
+{
+       if (!this.active_minigame) return false;
+       entity e = minigame_find_player(this);
+       if ( imp && this.active_minigame && e )
        {
-               return self.active_minigame.minigame_event(self.active_minigame,"impulse",e,imp);
+               return this.active_minigame.minigame_event(this.active_minigame,"impulse",e,imp);
        }
        return false;
 }
index 10e0a03..2a84969 100644 (file)
@@ -27,7 +27,7 @@ void end_minigames();
 bool minigame_CheckSend();
 
 // Check for minigame impulses
-bool MinigameImpulse(int imp);
+bool MinigameImpulse(entity this, int imp);
 
 // Parse a client command ( cmd minigame ... )
 void ClientCommand_minigame(int request, int argc, string command);
index 45fc349..e949e3a 100644 (file)
@@ -346,7 +346,7 @@ void Monster_Sound(.string samplefield, float sound_delay, float delaytoo, float
        if(delaytoo)
        if(time < self.msound_delay)
                return; // too early
-       GlobalSound_string(self.(samplefield), chan, VOICETYPE_PLAYERSOUND);
+       GlobalSound_string(self, self.(samplefield), chan, VOICETYPE_PLAYERSOUND);
 
        self.msound_delay = time + sound_delay;
 }
index 6cf3969..f6b52da 100644 (file)
@@ -45,11 +45,11 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
        if(applygravity)
        {
                this.move_didgravity = 1;
-               grav = dt * (PHYS_ENTGRAVITY(this) ? PHYS_ENTGRAVITY(this) : 1) * PHYS_GRAVITY;
+               grav = dt * (PHYS_ENTGRAVITY(this) ? PHYS_ENTGRAVITY(this) : 1) * PHYS_GRAVITY(this);
 
                if(!GAMEPLAYFIX_NOGRAVITYONGROUND || !(this.move_flags & FL_ONGROUND))
                {
-                       if(GRAVITY_UNAFFECTED_BY_TICRATE)
+                       if(GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE)
                                this.move_velocity_z -= grav * 0.5;
                        else
                                this.move_velocity_z -= grav;
@@ -64,9 +64,8 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                        break;
 
                push = this.move_velocity * time_left;
-               vector prev_origin = this.move_origin;
                _Movetype_PushEntity(this, push, true);
-               if(trace_startsolid && this.move_origin != prev_origin)
+               if(trace_startsolid)
                {
                        // we got teleported by a touch function
                        // let's abort the move
@@ -88,9 +87,9 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                float my_trace_fraction = trace_fraction;
                vector my_trace_plane_normal = trace_plane_normal;
 
-               if(trace_plane_normal_z)
+               if(trace_plane_normal.z)
                {
-                       if(trace_plane_normal_z > 0.7)
+                       if(trace_plane_normal.z > 0.7)
                        {
                                // floor
                                blocked |= 1;
@@ -112,13 +111,13 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                        vector steppush = '0 0 1' * stepheight;
 
                        _Movetype_PushEntity(this, steppush, true);
-                       if(trace_startsolid && this.move_origin != org)
+                       if(trace_startsolid)
                        {
                                blocked |= 8;
                                break;
                        }
                        _Movetype_PushEntity(this, push, true);
-                       if(trace_startsolid && this.move_origin != org)
+                       if(trace_startsolid)
                        {
                                blocked |= 8;
                                break;
@@ -126,7 +125,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                        float trace2_fraction = trace_fraction;
                        steppush = '0 0 1' * (org_z - this.move_origin_z);
                        _Movetype_PushEntity(this, steppush, true);
-                       if(trace_startsolid && this.move_origin != org)
+                       if(trace_startsolid)
                        {
                                blocked |= 8;
                                break;
@@ -234,7 +233,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
        {
                if(!GAMEPLAYFIX_NOGRAVITYONGROUND || !(this.move_flags & FL_ONGROUND))
                {
-                       if(GRAVITY_UNAFFECTED_BY_TICRATE)
+                       if(GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE)
                                this.move_velocity_z -= grav * 0.5f;
                }
        }
@@ -248,38 +247,38 @@ void _Movetype_CheckVelocity(entity this)  // SV_CheckVelocity
        // this.move_velocity = '0 0 0';
 }
 
-bool _Movetype_CheckWater(entity ent)  // SV_CheckWater
+bool _Movetype_CheckWater(entity this)  // SV_CheckWater
 {
-       vector point = ent.move_origin;
-       point.z += (ent.mins.z + 1);
+       vector point = this.move_origin;
+       point.z += this.mins.z + 1;
 
        int nativecontents = pointcontents(point);
-       if(ent.move_watertype && ent.move_watertype != nativecontents)
+       if(this.move_watertype && this.move_watertype != nativecontents)
        {
-               // dprintf("_Movetype_CheckWater(): Original: '%d', New: '%d'\n", ent.move_watertype, nativecontents);
-               if(ent.contentstransition)
-                       ent.contentstransition(ent.move_watertype, nativecontents);
+               // dprintf("_Movetype_CheckWater(): Original: '%d', New: '%d'\n", this.move_watertype, nativecontents);
+               if(this.contentstransition)
+                       this.contentstransition(this.move_watertype, nativecontents);
        }
 
-       ent.move_waterlevel = 0;
-       ent.move_watertype = CONTENT_EMPTY;
+       this.move_waterlevel = WATERLEVEL_NONE;
+       this.move_watertype = CONTENT_EMPTY;
 
        int supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
        if(supercontents & DPCONTENTS_LIQUIDSMASK)
        {
-               ent.move_watertype = nativecontents;
-               ent.move_waterlevel = 1;
-               point.y = (ent.origin.y + ((ent.mins.z + ent.maxs.y) * 0.5));
+               this.move_watertype = nativecontents;
+               this.move_waterlevel = WATERLEVEL_WETFEET;
+               point.z = this.move_origin.z + (this.mins.z + this.maxs.z) * 0.5;
                if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(point)) & DPCONTENTS_LIQUIDSMASK)
                {
-                       ent.move_waterlevel = 2;
-                       point.y = ent.origin.y + ent.view_ofs.y;
+                       this.move_waterlevel = WATERLEVEL_SWIMMING;
+                       point.z = this.move_origin.z + this.view_ofs.z;
                        if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(point)) & DPCONTENTS_LIQUIDSMASK)
-                               ent.move_waterlevel = 3;
+                               this.move_waterlevel = WATERLEVEL_SUBMERGED;
                }
        }
 
-       return ent.move_waterlevel > 1;
+       return this.move_waterlevel > 1;
 }
 
 void _Movetype_CheckWaterTransition(entity ent)  // SV_CheckWaterTransition
@@ -344,6 +343,7 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
 
        for (entity e = findradius(0.5 * (this.absmin + this.absmax), 0.5 * vlen(this.absmax - this.absmin)); e; e = e.chain)
        {
+               if(e.move_nomonsters != MOVE_NOMONSTERS && e.move_nomonsters != MOVE_WORLDONLY)
                if(e.move_touch && boxesoverlap(e.absmin, e.absmax, this.absmin, this.absmax))
                {
                        other = this;
@@ -353,7 +353,7 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this)  // SV_LinkEdict_TouchAreaGr
                        trace_fraction = 1;
                        trace_inwater = false;
                        trace_inopen = true;
-                       trace_endpos = e.origin;
+                       trace_endpos = e.move_origin;
                        trace_plane_normal = '0 0 1';
                        trace_plane_dist = 0;
                        trace_ent = this;
@@ -414,7 +414,7 @@ bool _Movetype_TestEntityPosition(entity this, vector ofs)  // SV_TestEntityPosi
 
        int cont = this.dphitcontentsmask;
        this.dphitcontentsmask = DPCONTENTS_SOLID;
-       tracebox(this.move_origin, this.mins, this.maxs, this.move_origin, MOVE_NOMONSTERS, this);
+       tracebox(this.move_origin, this.mins, this.maxs, this.move_origin, ((this.move_movetype == MOVETYPE_FLY_WORLDONLY) ? MOVE_WORLDONLY : MOVE_NOMONSTERS), this);
        this.dphitcontentsmask = cont;
 
        if(trace_startsolid)
@@ -441,11 +441,11 @@ bool _Movetype_UnstickEntity(entity this)  // SV_UnstickEntity
                if(!_Movetype_TestEntityPosition(this, '0 0 -1' * i)) goto success;
                if(!_Movetype_TestEntityPosition(this, '0 0 1' * i)) goto success;
        }
-       LOG_TRACEF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_DEBUG("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
                num_for_edict(this), this.classname, vtos(this.move_origin));
        return false;
        : success;
-       LOG_TRACEF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_DEBUG("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
                num_for_edict(this), this.classname, vtos(this.move_origin));
        _Movetype_LinkEdict(this, true);
        return true;
@@ -470,6 +470,8 @@ void _Movetype_PushEntityTrace(entity this, vector push)
                type = max(0, this.move_nomonsters);
        else if(this.move_movetype == MOVETYPE_FLYMISSILE)
                type = MOVE_MISSILE;
+       else if(this.move_movetype == MOVETYPE_FLY_WORLDONLY)
+               type = MOVE_WORLDONLY;
        else if(this.solid == SOLID_TRIGGER || this.solid == SOLID_NOT)
                type = MOVE_NOMONSTERS;
        else
@@ -583,8 +585,50 @@ void _Movetype_Physics_Frame(entity this, float movedt)
                case MOVETYPE_BOUNCEMISSILE:
                case MOVETYPE_FLYMISSILE:
                case MOVETYPE_FLY:
+               case MOVETYPE_FLY_WORLDONLY:
                        _Movetype_Physics_Toss(this, movedt);
                        break;
+               case MOVETYPE_PHYSICS:
+                       break;
+       }
+}
+
+void _Movetype_Physics_ClientFrame(entity this, float movedt)
+{
+       this.move_didgravity = -1;
+       switch (this.move_movetype)
+       {
+               case MOVETYPE_PUSH:
+               case MOVETYPE_FAKEPUSH:
+                       _Movetype_Physics_Pusher(this, movedt);
+                       break;
+               case MOVETYPE_NONE:
+                       break;
+               case MOVETYPE_FOLLOW:
+                       _Movetype_Physics_Follow(this);
+                       break;
+               case MOVETYPE_NOCLIP:
+                       _Movetype_CheckWater(this);
+                       this.move_origin = this.move_origin + TICRATE * this.move_velocity;
+                       this.move_angles = this.move_angles + TICRATE * this.move_avelocity;
+                       _Movetype_LinkEdict(this, false);
+                       break;
+               case MOVETYPE_STEP:
+                       _Movetype_Physics_Step(this, movedt);
+                       break;
+               case MOVETYPE_WALK:
+               case MOVETYPE_FLY:
+               case MOVETYPE_FLY_WORLDONLY:
+                       _Movetype_Physics_Walk(this, movedt);
+                       break;
+               case MOVETYPE_TOSS:
+               case MOVETYPE_BOUNCE:
+               case MOVETYPE_BOUNCEMISSILE:
+               case MOVETYPE_FLYMISSILE:
+                       _Movetype_Physics_Toss(this, movedt);
+                       break;
+               case MOVETYPE_PHYSICS:
+                       break;
        }
 }
 
@@ -641,10 +685,10 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
 
                if(this.move_didgravity > 0)
                {
-                       this.velocity_z -= (GRAVITY_UNAFFECTED_BY_TICRATE ? 0.5 : 1)
+                       this.velocity_z -= (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE ? 0.5 : 1)
                            * dt
                            * (this.gravity ? this.gravity : 1)
-                           * PHYS_GRAVITY;
+                           * PHYS_GRAVITY(this);
                }
 
                this.angles = this.move_angles + dt * this.avelocity;
@@ -660,8 +704,8 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
                                setorigin(this, trace_endpos);
                }
 
-               if(this.move_didgravity > 0 && GRAVITY_UNAFFECTED_BY_TICRATE)
-                       this.velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY;
+               if(this.move_didgravity > 0 && GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE)
+                       this.velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
        }
        else
        {
index 2102247..7578ae2 100644 (file)
 // should match sv_gameplayfix_fixedcheckwatertransition
 float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1;
 
-#ifdef SVQC
-.int stat_gameplayfix_upvelocityclearsonground;
-
-#define GRAVITY_UNAFFECTED_BY_TICRATE autocvar_sv_gameplayfix_gravityunaffectedbyticrate
-#define UPWARD_VELOCITY_CLEARS_ONGROUND autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag
-
-#define TICRATE sys_frametime
-#elif defined(CSQC)
-#define GRAVITY_UNAFFECTED_BY_TICRATE (getstati(STAT_MOVEFLAGS) & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
-#define UPWARD_VELOCITY_CLEARS_ONGROUND getstati(STAT_GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND)
-
-#define TICRATE ticrate
-#endif
-
 .entity move_groundentity;  // FIXME add move_groundnetworkentity?
 .float move_suspendedinair;
 .float move_didgravity;
@@ -83,6 +69,7 @@ const int MOVETYPE_FLYMISSILE       = 9;
 const int MOVETYPE_BOUNCE           = 10;
 const int MOVETYPE_BOUNCEMISSILE    = 11;  // Like bounce but doesn't lose speed on bouncing
 const int MOVETYPE_FOLLOW           = 12;
+const int MOVETYPE_PHYSICS          = 32;
 const int MOVETYPE_FLY_WORLDONLY    = 33;
 
 const int FL_ITEM                   = 256;
@@ -91,13 +78,13 @@ const int FL_ONGROUND                               = 512;
 
 const int MOVETYPE_FAKEPUSH         = 13;
 
-const float MOVEFLAG_Q2AIRACCELERATE            = 1;
-const float MOVEFLAG_NOGRAVITYONGROUND          = 2;
-const float MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4;
+const int MOVEFLAG_VALID = BIT(23);
+const int MOVEFLAG_Q2AIRACCELERATE = BIT(0);
+const int MOVEFLAG_NOGRAVITYONGROUND = BIT(1);
+const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = BIT(2);
 
 #ifdef CSQC
-// TODO: figure out server's version of this
-#define moveflags (getstati(STAT_MOVEFLAGS))
+#define moveflags STAT(MOVEFLAGS)
 #endif
 
 #endif
index 0630209..3029c9a 100644 (file)
@@ -4,7 +4,7 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
 {
        if (this.move_flags & FL_ONGROUND)
        {
-               if (this.move_velocity.z >= 1 / 32)
+               if (this.move_velocity.z >= 1 / 32 && UPWARD_VELOCITY_CLEARS_ONGROUND)
                {
                        this.move_flags &= ~FL_ONGROUND;
                }
@@ -26,10 +26,10 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
        if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS)
        {
                this.move_didgravity = 1;
-               this.move_velocity_z -= (GRAVITY_UNAFFECTED_BY_TICRATE ? 0.5 : 1)
+               this.move_velocity_z -= (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE ? 0.5 : 1)
                    * dt
                    * (this.gravity ? this.gravity : 1)
-                   * PHYS_GRAVITY;
+                   * PHYS_GRAVITY(this);
        }
 
        this.move_angles = this.move_angles + this.move_avelocity * dt;
@@ -64,7 +64,7 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                {
                        float bouncefac = this.move_bounce_factor;     if (!bouncefac)  bouncefac = 0.5;
                        float bouncestop = this.move_bounce_stopspeed; if (!bouncestop) bouncestop = 60 / 800;
-                       bouncestop *= (this.gravity ? this.gravity : 1) * PHYS_GRAVITY;
+                       bouncestop *= (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
 
                        this.move_velocity = _Movetype_ClipVelocity(this.move_velocity, trace_plane_normal, 1 + bouncefac);
 
@@ -108,8 +108,8 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                        break;
        }
 
-       if (GRAVITY_UNAFFECTED_BY_TICRATE && this.move_didgravity > 0 && !(this.move_flags & FL_ONGROUND))
-               this.move_velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY;
+       if (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE && this.move_didgravity > 0 && !(this.move_flags & FL_ONGROUND))
+               this.move_velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
 
        _Movetype_CheckWaterTransition(this);
 }
index 23d6e01..7fab278 100644 (file)
@@ -89,11 +89,10 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
 
                // move up
                vector upmove = '0 0 1' * PHYS_STEPHEIGHT;
-               vector prev_origin = this.move_origin;
                _Movetype_PushEntity(this, upmove, true);
                if(wasfreed(this))
                        return;
-               if(trace_startsolid && this.move_origin != prev_origin)
+               if(trace_startsolid)
                {
                        // we got teleported when upstepping... must abort the move
                        return;
@@ -145,12 +144,11 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
 
        // move down
        vector downmove = '0 0 1' * (-PHYS_STEPHEIGHT + start_velocity.z * dt);
-       vector prev_origin = this.move_origin;
        _Movetype_PushEntity(this, downmove, true);
        if(wasfreed(this))
                return;
 
-       if(trace_startsolid && this.move_origin != prev_origin)
+       if(trace_startsolid)
        {
                // we got teleported when downstepping... must abort the move
                return;
index 7cfc297..54b7b66 100644 (file)
@@ -157,6 +157,50 @@ ENDCLASS(Mutator)
 REGISTRY(Mutators, BITS(7))
 #define Mutators_from(i) _Mutators_from(i, NULL)
 Mutator loaded_mutators[Mutators_MAX];
+bool Mutator_Add(Mutator mut);
+void Mutator_Remove(Mutator mut);
+bool mutator_log = false;
+
+#ifndef MENUQC
+REGISTER_NET_LINKED(Mutator)
+
+#ifdef SVQC
+bool Mutator_SendEntity(entity this, entity to, int sf)
+{
+    int chan = MSG_ENTITY;
+    WriteHeader(chan, Mutator);
+    WriteString(chan, this.registered_id);
+    return true;
+}
+#endif
+
+#ifdef CSQC
+void NET_Mutator_Remove()
+{
+    SELFPARAM();
+    string s = this.netname;
+    WITH(bool, mutator_log, true, LAMBDA(
+        FOREACH(Mutators, it.registered_id == s, LAMBDA(Mutator_Remove(it)));
+    ));
+}
+NET_HANDLE(Mutator, bool isNew)
+{
+    string s = this.netname = ReadString();
+    return = true;
+    if (isNew)
+    {
+        make_pure(this);
+        this.entremove = NET_Mutator_Remove;
+        int added = 0;
+        WITH(bool, mutator_log, true, LAMBDA(
+            FOREACH(Mutators, it.registered_id == s, LAMBDA(Mutator_Add(it); ++added));
+        ));
+        if (added > 1) LOG_WARNINGF("Added more than one mutator for %s\n", s);
+    }
+}
+#endif
+
+#endif
 
 bool Mutator_Add(Mutator mut)
 {
@@ -175,6 +219,10 @@ bool Mutator_Add(Mutator mut)
     mutatorfunc_t func = mut.mutatorfunc;
     if (!func(MUTATOR_ADDING)) {
         // good
+        if (mutator_log) LOG_TRACEF("Mutator: added %s\n", mut.m_name);
+#ifdef SVQC
+        Net_LinkEntity(mut, false, 0, Mutator_SendEntity);
+#endif
         return true;
     }
     backtrace("WARNING: when adding mutator: adding failed, rolling back\n");
@@ -201,6 +249,10 @@ void Mutator_Remove(Mutator mut)
         // baaaaad
         error("Mutator_Remove: removing mutator failed");
     }
+    if (mutator_log) LOG_TRACEF("Mutator: removed %s\n", mut.m_name);
+#ifdef SVQC
+    Net_UnlinkEntity(mut);
+#endif
 }
 
 #define REGISTER_MUTATOR(id, dependence) \
index ed57753..5cb5b47 100644 (file)
@@ -90,4 +90,14 @@ MUTATOR_HOOKABLE(PlayerJump, EV_PlayerJump);
 float pm_maxspeed_mod;
 MUTATOR_HOOKABLE(PM_Physics, EV_PM_Physics);
 
+/** called when a weapon model is about to be set, allows custom paths etc. */
+#define EV_WeaponModel(i, o) \
+    /**/ i(string, weapon_model) \
+    /**/ i(string, weapon_model_output) \
+    /**/ o(string, weapon_model_output) \
+    /**/
+string weapon_model;
+string weapon_model_output;
+MUTATOR_HOOKABLE(WeaponModel, EV_WeaponModel);
+
 #endif
index db22d31..76ecff8 100644 (file)
@@ -44,7 +44,7 @@ CLASS(Buff, Pickup)
 ENDCLASS(Buff)
 
 #ifdef SVQC
-       .int buffs;
+       // .int buffs = _STAT(BUFFS);
        void buff_Init(entity ent);
        void buff_Init_Compat(entity ent, entity replacement);
        #define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
index f4f6df7..1c9e3a2 100644 (file)
@@ -76,16 +76,13 @@ const vector BUFF_MAX = ('16 16 20');
 #include "../../../triggers/target/music.qh"
 #include "../../../gamemodes/all.qh"
 
-.float buff_time;
+.float buff_time = _STAT(BUFF_TIME);
 void buffs_DelayedInit();
 
 REGISTER_MUTATOR(buffs, cvar("g_buffs"))
 {
        MUTATOR_ONADD
        {
-               addstat(STAT_BUFFS, AS_INT, buffs);
-               addstat(STAT_BUFF_TIME, AS_FLOAT, buff_time);
-
                InitializeEntity(world, buffs_DelayedInit, INITPRIO_FINDTARGET);
        }
 }
index 5f24f62..be00977 100644 (file)
@@ -24,9 +24,9 @@ MUTATOR_HOOKFUNCTION(buffs_flight, IsFlying)
 REGISTER_MUTATOR(cl_buffs, true);
 MUTATOR_HOOKFUNCTION(cl_buffs, HUD_Powerups_add)
 {
-    int allBuffs = getstati(STAT_BUFFS, 0, 24);
+    int allBuffs = STAT(BUFFS);
     FOREACH(Buffs, it.m_itemid & allBuffs, LAMBDA(
-               addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60);
+               addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, STAT(BUFF_TIME) - time, 99), 60);
        ));
 }
 MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format)
index 9eb16b0..1943413 100644 (file)
@@ -7,14 +7,12 @@
 
 #if defined(SVQC)
 void bugrigs_SetVars();
-void bugrigs_AddStats();
 
 REGISTER_MUTATOR(bugrigs, cvar("g_bugrigs"))
 {
        MUTATOR_ONADD
        {
                bugrigs_SetVars();
-               bugrigs_AddStats();
        }
        return false;
 }
@@ -23,73 +21,23 @@ REGISTER_MUTATOR(bugrigs, true);
 #endif
 
 
-#ifdef CSQC
-
-#define PHYS_BUGRIGS                                           getstati(STAT_BUGRIGS)
-#define PHYS_BUGRIGS_ANGLE_SMOOTHING           getstati(STAT_BUGRIGS_ANGLE_SMOOTHING)
-#define PHYS_BUGRIGS_PLANAR_MOVEMENT           getstati(STAT_BUGRIGS_PLANAR_MOVEMENT)
-#define PHYS_BUGRIGS_REVERSE_SPEEDING          getstati(STAT_BUGRIGS_REVERSE_SPEEDING)
-#define PHYS_BUGRIGS_FRICTION_FLOOR            getstatf(STAT_BUGRIGS_FRICTION_FLOOR)
-#define PHYS_BUGRIGS_AIR_STEERING                      getstati(STAT_BUGRIGS_AIR_STEERING)
-#define PHYS_BUGRIGS_FRICTION_BRAKE            getstatf(STAT_BUGRIGS_FRICTION_BRAKE)
-#define PHYS_BUGRIGS_ACCEL                                     getstatf(STAT_BUGRIGS_ACCEL)
-#define PHYS_BUGRIGS_SPEED_REF                                 getstatf(STAT_BUGRIGS_SPEED_REF)
-#define PHYS_BUGRIGS_SPEED_POW                                 getstatf(STAT_BUGRIGS_SPEED_POW)
-#define PHYS_BUGRIGS_STEER                                     getstatf(STAT_BUGRIGS_STEER)
-#define PHYS_BUGRIGS_FRICTION_AIR                      getstatf(STAT_BUGRIGS_FRICTION_AIR)
-#define PHYS_BUGRIGS_CAR_JUMPING                       getstatf(STAT_BUGRIGS_CAR_JUMPING)
-#define PHYS_BUGRIGS_REVERSE_SPINNING          getstatf(STAT_BUGRIGS_REVERSE_SPINNING)
-#define PHYS_BUGRIGS_REVERSE_STOPPING          getstatf(STAT_BUGRIGS_REVERSE_STOPPING)
-
-#elif defined(SVQC)
-
-bool g_bugrigs;
-bool g_bugrigs_planar_movement;
-bool g_bugrigs_planar_movement_car_jumping;
-float g_bugrigs_reverse_spinning;
-float g_bugrigs_reverse_speeding;
-float g_bugrigs_reverse_stopping;
-float g_bugrigs_air_steering;
-float g_bugrigs_angle_smoothing;
-float g_bugrigs_friction_floor;
-float g_bugrigs_friction_brake;
-float g_bugrigs_friction_air;
-float g_bugrigs_accel;
-float g_bugrigs_speed_ref;
-float g_bugrigs_speed_pow;
-float g_bugrigs_steer;
-
-#define PHYS_BUGRIGS                                           g_bugrigs
-#define PHYS_BUGRIGS_ANGLE_SMOOTHING           g_bugrigs_angle_smoothing
-#define PHYS_BUGRIGS_PLANAR_MOVEMENT           g_bugrigs_planar_movement
-#define PHYS_BUGRIGS_REVERSE_SPEEDING          g_bugrigs_reverse_speeding
-#define PHYS_BUGRIGS_FRICTION_FLOOR                    g_bugrigs_friction_floor
-#define PHYS_BUGRIGS_AIR_STEERING                      g_bugrigs_air_steering
-#define PHYS_BUGRIGS_FRICTION_BRAKE                    g_bugrigs_friction_brake
-#define PHYS_BUGRIGS_ACCEL                                     g_bugrigs_accel
-#define PHYS_BUGRIGS_SPEED_REF                         g_bugrigs_speed_ref
-#define PHYS_BUGRIGS_SPEED_POW                         g_bugrigs_speed_pow
-#define PHYS_BUGRIGS_STEER                                     g_bugrigs_steer
-#define PHYS_BUGRIGS_FRICTION_AIR                      g_bugrigs_friction_air
-#define PHYS_BUGRIGS_CAR_JUMPING                       g_bugrigs_planar_movement_car_jumping
-#define PHYS_BUGRIGS_REVERSE_SPINNING          g_bugrigs_reverse_spinning
-#define PHYS_BUGRIGS_REVERSE_STOPPING          g_bugrigs_reverse_stopping
-
-.float stat_bugrigs;
-.float stat_bugrigs_angle_smoothing;
-.float stat_bugrigs_planar_movement;
-.float stat_bugrigs_reverse_speeding;
-.float stat_bugrigs_friction_floor;
-.float stat_bugrigs_air_steering;
-.float stat_bugrigs_friction_brake;
-.float stat_bugrigs_accel;
-.float stat_bugrigs_speed_ref;
-.float stat_bugrigs_speed_pow;
-.float stat_bugrigs_steer;
-.float stat_bugrigs_friction_air;
-.float stat_bugrigs_car_jumping;
-.float stat_bugrigs_reverse_spinning;
-.float stat_bugrigs_reverse_stopping;
+#define PHYS_BUGRIGS(s)                        STAT(BUGRIGS, s)
+#define PHYS_BUGRIGS_ACCEL(s)                  STAT(BUGRIGS_ACCEL, s)
+#define PHYS_BUGRIGS_AIR_STEERING(s)           STAT(BUGRIGS_AIR_STEERING, s)
+#define PHYS_BUGRIGS_ANGLE_SMOOTHING(s)        STAT(BUGRIGS_ANGLE_SMOOTHING, s)
+#define PHYS_BUGRIGS_CAR_JUMPING(s)            STAT(BUGRIGS_CAR_JUMPING, s)
+#define PHYS_BUGRIGS_FRICTION_AIR(s)           STAT(BUGRIGS_FRICTION_AIR, s)
+#define PHYS_BUGRIGS_FRICTION_BRAKE(s)         STAT(BUGRIGS_FRICTION_BRAKE, s)
+#define PHYS_BUGRIGS_FRICTION_FLOOR(s)         STAT(BUGRIGS_FRICTION_FLOOR, s)
+#define PHYS_BUGRIGS_PLANAR_MOVEMENT(s)        STAT(BUGRIGS_PLANAR_MOVEMENT, s)
+#define PHYS_BUGRIGS_REVERSE_SPEEDING(s)       STAT(BUGRIGS_REVERSE_SPEEDING, s)
+#define PHYS_BUGRIGS_REVERSE_SPINNING(s)       STAT(BUGRIGS_REVERSE_SPINNING, s)
+#define PHYS_BUGRIGS_REVERSE_STOPPING(s)       STAT(BUGRIGS_REVERSE_STOPPING, s)
+#define PHYS_BUGRIGS_SPEED_POW(s)              STAT(BUGRIGS_SPEED_POW, s)
+#define PHYS_BUGRIGS_SPEED_REF(s)              STAT(BUGRIGS_SPEED_REF, s)
+#define PHYS_BUGRIGS_STEER(s)                  STAT(BUGRIGS_STEER, s)
+
+#if defined(SVQC)
 
 void bugrigs_SetVars()
 {
@@ -110,44 +58,6 @@ void bugrigs_SetVars()
        g_bugrigs_steer = cvar("g_bugrigs_steer");
 }
 
-void bugrigs_UpdateStats(entity this)
-{
-       this.stat_bugrigs = PHYS_BUGRIGS;
-       this.stat_bugrigs_angle_smoothing = PHYS_BUGRIGS_ANGLE_SMOOTHING;
-       this.stat_bugrigs_planar_movement = PHYS_BUGRIGS_PLANAR_MOVEMENT;
-       this.stat_bugrigs_reverse_speeding = PHYS_BUGRIGS_REVERSE_SPEEDING;
-       this.stat_bugrigs_friction_floor = PHYS_BUGRIGS_FRICTION_FLOOR;
-       this.stat_bugrigs_air_steering = PHYS_BUGRIGS_AIR_STEERING;
-       this.stat_bugrigs_friction_brake = PHYS_BUGRIGS_FRICTION_BRAKE;
-       this.stat_bugrigs_accel = PHYS_BUGRIGS_ACCEL;
-       this.stat_bugrigs_speed_ref = PHYS_BUGRIGS_SPEED_REF;
-       this.stat_bugrigs_speed_pow = PHYS_BUGRIGS_SPEED_POW;
-       this.stat_bugrigs_steer = PHYS_BUGRIGS_STEER;
-       this.stat_bugrigs_friction_air = PHYS_BUGRIGS_FRICTION_AIR;
-       this.stat_bugrigs_car_jumping = PHYS_BUGRIGS_CAR_JUMPING;
-       this.stat_bugrigs_reverse_spinning = PHYS_BUGRIGS_REVERSE_SPINNING;
-       this.stat_bugrigs_reverse_stopping = PHYS_BUGRIGS_REVERSE_STOPPING;
-}
-
-void bugrigs_AddStats()
-{
-       addstat(STAT_BUGRIGS, AS_INT, stat_bugrigs);
-       addstat(STAT_BUGRIGS_ANGLE_SMOOTHING, AS_INT, stat_bugrigs_angle_smoothing);
-       addstat(STAT_BUGRIGS_PLANAR_MOVEMENT, AS_INT, stat_bugrigs_planar_movement);
-       addstat(STAT_BUGRIGS_REVERSE_SPEEDING, AS_INT, stat_bugrigs_reverse_speeding);
-       addstat(STAT_BUGRIGS_FRICTION_FLOOR, AS_FLOAT, stat_bugrigs_friction_floor);
-       addstat(STAT_BUGRIGS_AIR_STEERING, AS_INT, stat_bugrigs_air_steering);
-       addstat(STAT_BUGRIGS_FRICTION_BRAKE, AS_FLOAT, stat_bugrigs_friction_brake);
-       addstat(STAT_BUGRIGS_ACCEL, AS_FLOAT, stat_bugrigs_accel);
-       addstat(STAT_BUGRIGS_SPEED_REF, AS_FLOAT, stat_bugrigs_speed_ref);
-       addstat(STAT_BUGRIGS_SPEED_POW, AS_FLOAT, stat_bugrigs_speed_pow);
-       addstat(STAT_BUGRIGS_STEER, AS_FLOAT, stat_bugrigs_steer);
-       addstat(STAT_BUGRIGS_FRICTION_AIR, AS_FLOAT, stat_bugrigs_friction_air);
-       addstat(STAT_BUGRIGS_CAR_JUMPING, AS_FLOAT, stat_bugrigs_car_jumping);
-       addstat(STAT_BUGRIGS_REVERSE_SPINNING, AS_FLOAT, stat_bugrigs_reverse_spinning);
-       addstat(STAT_BUGRIGS_REVERSE_STOPPING, AS_FLOAT, stat_bugrigs_reverse_stopping);
-}
-
 #endif
 
 void RaceCarPhysics(entity this)
@@ -161,7 +71,7 @@ void RaceCarPhysics(entity this)
        float accel = bound(-1, this.movement.x / PHYS_MAXSPEED(this), 1);
        float steer = bound(-1, this.movement.y / PHYS_MAXSPEED(this), 1);
 
-       if (PHYS_BUGRIGS_REVERSE_SPEEDING)
+       if (PHYS_BUGRIGS_REVERSE_SPEEDING(this))
        {
                if (accel < 0)
                {
@@ -178,56 +88,56 @@ void RaceCarPhysics(entity this)
        this.angles_z = 0;
        makevectors(this.angles); // new forward direction!
 
-       if (IS_ONGROUND(this) || PHYS_BUGRIGS_AIR_STEERING)
+       if (IS_ONGROUND(this) || PHYS_BUGRIGS_AIR_STEERING(this))
        {
                float myspeed = this.velocity * v_forward;
                float upspeed = this.velocity * v_up;
 
                // responsiveness factor for steering and acceleration
-               float f = 1 / (1 + pow(max(-myspeed, myspeed) / PHYS_BUGRIGS_SPEED_REF, PHYS_BUGRIGS_SPEED_POW));
-               //MAXIMA: f(v) := 1 / (1 + (v / PHYS_BUGRIGS_SPEED_REF) ^ PHYS_BUGRIGS_SPEED_POW);
+               float f = 1 / (1 + pow(max(-myspeed, myspeed) / PHYS_BUGRIGS_SPEED_REF(this), PHYS_BUGRIGS_SPEED_POW(this)));
+               //MAXIMA: f(v) := 1 / (1 + (v / PHYS_BUGRIGS_SPEED_REF(this)) ^ PHYS_BUGRIGS_SPEED_POW(this));
 
                float steerfactor;
-               if (myspeed < 0 && PHYS_BUGRIGS_REVERSE_SPINNING)
-                       steerfactor = -myspeed * PHYS_BUGRIGS_STEER;
+               if (myspeed < 0 && PHYS_BUGRIGS_REVERSE_SPINNING(this))
+                       steerfactor = -myspeed * PHYS_BUGRIGS_STEER(this);
                else
-                       steerfactor = -myspeed * f * PHYS_BUGRIGS_STEER;
+                       steerfactor = -myspeed * f * PHYS_BUGRIGS_STEER(this);
 
                float accelfactor;
-               if (myspeed < 0 && PHYS_BUGRIGS_REVERSE_SPEEDING)
-                       accelfactor = PHYS_BUGRIGS_ACCEL;
+               if (myspeed < 0 && PHYS_BUGRIGS_REVERSE_SPEEDING(this))
+                       accelfactor = PHYS_BUGRIGS_ACCEL(this);
                else
-                       accelfactor = f * PHYS_BUGRIGS_ACCEL;
-               //MAXIMA: accel(v) := f(v) * PHYS_BUGRIGS_ACCEL;
+                       accelfactor = f * PHYS_BUGRIGS_ACCEL(this);
+               //MAXIMA: accel(v) := f(v) * PHYS_BUGRIGS_ACCEL(this);
 
                if (accel < 0)
                {
                        if (myspeed > 0)
                        {
-                               myspeed = max(0, myspeed - PHYS_INPUT_TIMELENGTH * (PHYS_BUGRIGS_FRICTION_FLOOR - PHYS_BUGRIGS_FRICTION_BRAKE * accel));
+                               myspeed = max(0, myspeed - PHYS_INPUT_TIMELENGTH * (PHYS_BUGRIGS_FRICTION_FLOOR(this) - PHYS_BUGRIGS_FRICTION_BRAKE(this) * accel));
                        }
                        else
                        {
-                               if (!PHYS_BUGRIGS_REVERSE_SPEEDING)
-                                       myspeed = min(0, myspeed + PHYS_INPUT_TIMELENGTH * PHYS_BUGRIGS_FRICTION_FLOOR);
+                               if (!PHYS_BUGRIGS_REVERSE_SPEEDING(this))
+                                       myspeed = min(0, myspeed + PHYS_INPUT_TIMELENGTH * PHYS_BUGRIGS_FRICTION_FLOOR(this));
                        }
                }
                else
                {
                        if (myspeed >= 0)
                        {
-                               myspeed = max(0, myspeed - PHYS_INPUT_TIMELENGTH * PHYS_BUGRIGS_FRICTION_FLOOR);
+                               myspeed = max(0, myspeed - PHYS_INPUT_TIMELENGTH * PHYS_BUGRIGS_FRICTION_FLOOR(this));
                        }
                        else
                        {
-                               if (PHYS_BUGRIGS_REVERSE_STOPPING)
+                               if (PHYS_BUGRIGS_REVERSE_STOPPING(this))
                                        myspeed = 0;
                                else
-                                       myspeed = min(0, myspeed + PHYS_INPUT_TIMELENGTH * (PHYS_BUGRIGS_FRICTION_FLOOR + PHYS_BUGRIGS_FRICTION_BRAKE * accel));
+                                       myspeed = min(0, myspeed + PHYS_INPUT_TIMELENGTH * (PHYS_BUGRIGS_FRICTION_FLOOR(this) + PHYS_BUGRIGS_FRICTION_BRAKE(this) * accel));
                        }
                }
                // terminal velocity = velocity at which 50 == accelfactor, that is, 1549 units/sec
-               //MAXIMA: friction(v) := PHYS_BUGRIGS_FRICTION_FLOOR;
+               //MAXIMA: friction(v) := PHYS_BUGRIGS_FRICTION_FLOOR(this);
 
                this.angles_y += steer * PHYS_INPUT_TIMELENGTH * steerfactor; // apply steering
                makevectors(this.angles); // new forward direction!
@@ -241,7 +151,7 @@ void RaceCarPhysics(entity this)
                float myspeed = vlen(this.velocity);
 
                // responsiveness factor for steering and acceleration
-               float f = 1 / (1 + pow(max(0, myspeed / PHYS_BUGRIGS_SPEED_REF), PHYS_BUGRIGS_SPEED_POW));
+               float f = 1 / (1 + pow(max(0, myspeed / PHYS_BUGRIGS_SPEED_REF(this)), PHYS_BUGRIGS_SPEED_POW(this)));
                float steerfactor = -myspeed * f;
                this.angles_y += steer * PHYS_INPUT_TIMELENGTH * steerfactor; // apply steering
 
@@ -249,20 +159,20 @@ void RaceCarPhysics(entity this)
                makevectors(this.angles); // new forward direction!
        }
 
-       rigvel *= max(0, 1 - vlen(rigvel) * PHYS_BUGRIGS_FRICTION_AIR * PHYS_INPUT_TIMELENGTH);
-       //MAXIMA: airfriction(v) := v * v * PHYS_BUGRIGS_FRICTION_AIR;
+       rigvel *= max(0, 1 - vlen(rigvel) * PHYS_BUGRIGS_FRICTION_AIR(this) * PHYS_INPUT_TIMELENGTH);
+       //MAXIMA: airfriction(v) := v * v * PHYS_BUGRIGS_FRICTION_AIR(this);
        //MAXIMA: total_acceleration(v) := accel(v) - friction(v) - airfriction(v);
        //MAXIMA: solve(total_acceleration(v) = 0, v);
 
-       if (PHYS_BUGRIGS_PLANAR_MOVEMENT)
+       if (PHYS_BUGRIGS_PLANAR_MOVEMENT(this))
        {
                vector rigvel_xy, neworigin, up;
                float mt;
 
-               rigvel_z -= PHYS_INPUT_TIMELENGTH * PHYS_GRAVITY; // 4x gravity plays better
+               rigvel_z -= PHYS_INPUT_TIMELENGTH * PHYS_GRAVITY(this); // 4x gravity plays better
                rigvel_xy = vec2(rigvel);
 
-               if (PHYS_BUGRIGS_CAR_JUMPING)
+               if (PHYS_BUGRIGS_CAR_JUMPING(this))
                        mt = MOVE_NORMAL;
                else
                        mt = MOVE_NOMONSTERS;
@@ -308,7 +218,7 @@ void RaceCarPhysics(entity this)
        }
        else
        {
-               rigvel_z -= PHYS_INPUT_TIMELENGTH * PHYS_GRAVITY; // 4x gravity plays better
+               rigvel_z -= PHYS_INPUT_TIMELENGTH * PHYS_GRAVITY(this); // 4x gravity plays better
                this.velocity = rigvel;
                this.movetype = MOVETYPE_FLY;
        }
@@ -341,7 +251,7 @@ void RaceCarPhysics(entity this)
        // smooth the angles
        vector vf1, vu1, smoothangles;
        makevectors(this.angles);
-       float f = bound(0, PHYS_INPUT_TIMELENGTH * PHYS_BUGRIGS_ANGLE_SMOOTHING, 1);
+       float f = bound(0, PHYS_INPUT_TIMELENGTH * PHYS_BUGRIGS_ANGLE_SMOOTHING(this), 1);
        if (f == 0)
                f = 1;
        vf1 = v_forward * f;
@@ -361,7 +271,7 @@ void RaceCarPhysics(entity this)
 #endif
 MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics)
 {
-       if(!PHYS_BUGRIGS || !IS_PLAYER(self)) { return false; }
+       if(!PHYS_BUGRIGS(self) || !IS_PLAYER(self)) { return false; }
 
 #ifdef SVQC
        self.angles = self.bugrigs_prevangles;
@@ -373,11 +283,9 @@ MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics)
 
 MUTATOR_HOOKFUNCTION(bugrigs, PlayerPhysics)
 {
-       if(!PHYS_BUGRIGS) { return false; }
+       if(!PHYS_BUGRIGS(self)) { return false; }
 #ifdef SVQC
        self.bugrigs_prevangles = self.angles;
-
-       bugrigs_UpdateStats(self);
 #endif
        return false;
 }
index 327f78b..3521ca7 100644 (file)
@@ -1,49 +1,30 @@
 #ifdef IMPLEMENTATION
 
+#define PHYS_DODGING                                           STAT(DODGING, this)
+#define PHYS_DODGING_DELAY                                     STAT(DODGING_DELAY, this)
+#define PHYS_DODGING_DISTANCE_THRESHOLD        STAT(DODGING_DISTANCE_THRESHOLD, this)
+#define PHYS_DODGING_FROZEN_NODOUBLETAP                STAT(DODGING_FROZEN_NO_DOUBLETAP, this)
+#define PHYS_DODGING_HEIGHT_THRESHOLD          STAT(DODGING_HEIGHT_THRESHOLD, this)
+#define PHYS_DODGING_HORIZ_SPEED                       STAT(DODGING_HORIZ_SPEED, this)
+#define PHYS_DODGING_HORIZ_SPEED_FROZEN        STAT(DODGING_HORIZ_SPEED_FROZEN, this)
+#define PHYS_DODGING_RAMP_TIME                                 STAT(DODGING_RAMP_TIME, this)
+#define PHYS_DODGING_UP_SPEED                          STAT(DODGING_UP_SPEED, this)
+#define PHYS_DODGING_WALL                                      STAT(DODGING_WALL, this)
+#define PHYS_DODGING_PRESSED_KEYS(s)           (s).pressedkeys
+
 #ifdef CSQC
        #define PHYS_DODGING_FRAMETIME                          (1 / (frametime <= 0 ? 60 : frametime))
-       #define PHYS_DODGING                                            getstati(STAT_DODGING)
-       #define PHYS_DODGING_DELAY                                      getstatf(STAT_DODGING_DELAY)
-       #define PHYS_DODGING_TIMEOUT(s)                         getstatf(STAT_DODGING_TIMEOUT)
-       #define PHYS_DODGING_HORIZ_SPEED_FROZEN         getstatf(STAT_DODGING_HORIZ_SPEED_FROZEN)
-       #define PHYS_DODGING_FROZEN_NODOUBLETAP         getstati(STAT_DODGING_FROZEN_NO_DOUBLETAP)
-       #define PHYS_DODGING_HORIZ_SPEED                        getstatf(STAT_DODGING_HORIZ_SPEED)
-       #define PHYS_DODGING_PRESSED_KEYS(s)            s.pressedkeys
-       #define PHYS_DODGING_HEIGHT_THRESHOLD           getstatf(STAT_DODGING_HEIGHT_THRESHOLD)
-       #define PHYS_DODGING_DISTANCE_THRESHOLD         getstatf(STAT_DODGING_DISTANCE_THRESHOLD)
-       #define PHYS_DODGING_RAMP_TIME                          getstatf(STAT_DODGING_RAMP_TIME)
-       #define PHYS_DODGING_UP_SPEED                           getstatf(STAT_DODGING_UP_SPEED)
-       #define PHYS_DODGING_WALL                                       getstatf(STAT_DODGING_WALL)
+       #define PHYS_DODGING_TIMEOUT(s)                         STAT(DODGING_TIMEOUT)
 #elif defined(SVQC)
        #define PHYS_DODGING_FRAMETIME                          sys_frametime
-       #define PHYS_DODGING                                            g_dodging
-       #define PHYS_DODGING_DELAY                                      autocvar_sv_dodging_delay
        #define PHYS_DODGING_TIMEOUT(s)                         s.cvar_cl_dodging_timeout
-       #define PHYS_DODGING_HORIZ_SPEED_FROZEN         autocvar_sv_dodging_horiz_speed_frozen
-       #define PHYS_DODGING_FROZEN_NODOUBLETAP         autocvar_sv_dodging_frozen_doubletap
-       #define PHYS_DODGING_HORIZ_SPEED                        autocvar_sv_dodging_horiz_speed
-       #define PHYS_DODGING_PRESSED_KEYS(s)            s.pressedkeys
-       #define PHYS_DODGING_HEIGHT_THRESHOLD           autocvar_sv_dodging_height_threshold
-       #define PHYS_DODGING_DISTANCE_THRESHOLD         autocvar_sv_dodging_wall_distance_threshold
-       #define PHYS_DODGING_RAMP_TIME                          autocvar_sv_dodging_ramp_time
-       #define PHYS_DODGING_UP_SPEED                           autocvar_sv_dodging_up_speed
-       #define PHYS_DODGING_WALL                                       autocvar_sv_dodging_wall_dodging
-
-       float autocvar_sv_dodging_delay;
-    float autocvar_sv_dodging_height_threshold;
-    float autocvar_sv_dodging_horiz_speed;
-    float autocvar_sv_dodging_horiz_speed_frozen;
-    float autocvar_sv_dodging_ramp_time;
-    bool autocvar_sv_dodging_sound;
-    float autocvar_sv_dodging_up_speed;
-    float autocvar_sv_dodging_wall_distance_threshold;
-    bool autocvar_sv_dodging_wall_dodging;
-    bool autocvar_sv_dodging_frozen_doubletap;
+
+
 #endif
 
 #ifdef SVQC
 
-float g_dodging;
+bool autocvar_sv_dodging_sound;
 
 // set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done..
 .float dodging_action;
@@ -54,19 +35,7 @@ float g_dodging;
 #include "../../../animdecide.qh"
 #include "../../../physics.qh"
 
-.float cvar_cl_dodging_timeout;
-
-.float stat_dodging;
-.float stat_dodging_delay;
-.float stat_dodging_horiz_speed_frozen;
-.float stat_dodging_frozen_nodoubletap;
-.float stat_dodging_frozen;
-.float stat_dodging_horiz_speed;
-.float stat_dodging_height_threshold;
-.float stat_dodging_distance_threshold;
-.float stat_dodging_ramp_time;
-.float stat_dodging_up_speed;
-.float stat_dodging_wall;
+.float cvar_cl_dodging_timeout = _STAT(DODGING_TIMEOUT);
 
 REGISTER_MUTATOR(dodging, cvar("g_dodging"))
 {
@@ -74,18 +43,6 @@ REGISTER_MUTATOR(dodging, cvar("g_dodging"))
        MUTATOR_ONADD
        {
                g_dodging = cvar("g_dodging");
-               addstat(STAT_DODGING, AS_INT, stat_dodging);
-               addstat(STAT_DODGING_DELAY, AS_FLOAT, stat_dodging_delay);
-               addstat(STAT_DODGING_TIMEOUT, AS_FLOAT, cvar_cl_dodging_timeout); // we stat this, so it is updated on the client when updated on server (otherwise, chaos)
-               addstat(STAT_DODGING_FROZEN_NO_DOUBLETAP, AS_INT, stat_dodging_frozen_nodoubletap);
-               addstat(STAT_DODGING_HORIZ_SPEED_FROZEN, AS_FLOAT, stat_dodging_horiz_speed_frozen);
-               addstat(STAT_DODGING_FROZEN, AS_INT, stat_dodging_frozen);
-               addstat(STAT_DODGING_HORIZ_SPEED, AS_FLOAT, stat_dodging_horiz_speed);
-               addstat(STAT_DODGING_HEIGHT_THRESHOLD, AS_FLOAT, stat_dodging_height_threshold);
-               addstat(STAT_DODGING_DISTANCE_THRESHOLD, AS_FLOAT, stat_dodging_distance_threshold);
-               addstat(STAT_DODGING_RAMP_TIME, AS_FLOAT, stat_dodging_ramp_time);
-