Merge branch 'master' into terencehill/menu_optimization
authorterencehill <piuntn@gmail.com>
Sun, 13 Dec 2015 23:51:54 +0000 (00:51 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 13 Dec 2015 23:51:54 +0000 (00:51 +0100)
172 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]
models/ok_nade_counter/ok_nade_counter.md3_9.skin
models/weapons/overkillbullet.tga [deleted file]
models/weapons/overkillbullet_gloss.tga [deleted file]
models/weapons/overkillbullet_reflect.tga [deleted file]
qcsrc/Makefile
qcsrc/client/autocvars.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/defs.qh
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/powerups.qc
qcsrc/client/hud/panel/radar.qc
qcsrc/client/hud/panel/weapons.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/miscfunctions.qh
qcsrc/client/progs.inc
qcsrc/client/progs.src [deleted file]
qcsrc/client/scoreboard.qc
qcsrc/client/view.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/animdecide.qc
qcsrc/common/animdecide.qh
qcsrc/common/command/all.qh
qcsrc/common/command/command.qh
qcsrc/common/command/generic.qc
qcsrc/common/debug.qh
qcsrc/common/effects/effectinfo.qc
qcsrc/common/effects/qc/gibs.qc
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/globalsound.qh
qcsrc/common/ent_cs.qh
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/impulses/all.qc [new file with mode: 0644]
qcsrc/common/impulses/all.qh [new file with mode: 0644]
qcsrc/common/mapinfo.qc
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/minigames/sv_minigames.qh
qcsrc/common/movetypes/movetypes.qc
qcsrc/common/mutators/base.qh
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/nades/nades.inc
qcsrc/common/mutators/mutator/nades/nades.qc
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/overkill.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/mutators/mutator/pinata/pinata.qc
qcsrc/common/net_notice.qc
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/physics.qc
qcsrc/common/sounds/all.qc
qcsrc/common/sounds/sound.qh
qcsrc/common/state.qh [new file with mode: 0644]
qcsrc/common/stats.qh
qcsrc/common/teams.qh
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/util.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qh
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc
qcsrc/common/vehicles/vehicle/racer.qc
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.qh
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.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/porto.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/tuba.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/lib/_all.inc
qcsrc/lib/arraylist.qh
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/lib/i18n.qh
qcsrc/lib/iter.qh
qcsrc/lib/linkedlist.qh
qcsrc/lib/log.qh
qcsrc/lib/macro.qh [new file with mode: 0644]
qcsrc/lib/misc.qh
qcsrc/lib/net.qh
qcsrc/lib/oo.qh
qcsrc/lib/registry.qh
qcsrc/lib/sort.qh
qcsrc/lib/spawnfunc.qh
qcsrc/lib/stats.qh
qcsrc/lib/string.qh
qcsrc/lib/test.qh
qcsrc/lib/unsafe.qh
qcsrc/lib/vector.qh
qcsrc/menu/draw.qh
qcsrc/menu/menu.qc
qcsrc/menu/progs.src [deleted file]
qcsrc/menu/xonotic/credits.qc
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/skinlist.qc
qcsrc/server/_all.qh
qcsrc/server/autocvars.qh
qcsrc/server/bot/aim.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cheats.qc
qcsrc/server/cheats.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_impulse.qh
qcsrc/server/cl_player.qc
qcsrc/server/command/all.qh
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_hook.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.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_tdm.qc
qcsrc/server/playerdemo.qc
qcsrc/server/progs.inc
qcsrc/server/progs.src [deleted file]
qcsrc/server/scores.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/weapons/hitplot.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/selection.qh
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/throwing.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponsystem.qc
textures/overkillbullet.tga [new file with mode: 0644]
textures/overkillbullet_gloss.tga [new file with mode: 0644]
textures/overkillbullet_reflect.tga [new file with mode: 0644]
xonotic-credits.txt [deleted file]

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 "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"a20" 6 "0 -1 0"
+"a19" 6 "0 -1 0"
+"a18" 6 "0 -1 0"
+"d19" 6 "0 -1 0"
+"e19" 6 "0 -1 0"
+"f19" 6 "0 -1 0"
+"g19" 6 "0 -1 0"
+"h19" 6 "0 -1 0"
+"i19" 6 "0 -1 0"
+"j19" 6 "0 -1 0"
+"k19" 6 "0 -1 0"
+"l19" 6 "0 -1 0"
+"m19" 6 "0 -1 0"
+"n19" 6 "0 -1 0"
+"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" 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 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 -1 0"
+"f9" 5 "0 -1 0"
+"g9" 5 "0 -1 0"
+"h9" 5 "0 -1 0"
+"i10" 5 "0 -1 0"
+"i9" 5 "0 -1 0"
+"i11" 5 "0 -1 0"
+"j11" 5 "0 -1 0"
+"k11" 5 "0 -1 0"
+"l11" 5 "0 -1 0"
+"l10" 5 "0 -1 0"
+"l9" 5 "0 -1 0"
+"n9" 5 "0 -1 0"
+"m9" 5 "0 -1 0"
+"o9" 5 "0 -1 0"
+"o10" 5 "0 -1 0"
+"p10" 5 "0 -1 0"
+"p11" 5 "0 -1 0"
+"p12" 5 "0 -1 0"
+"o13" 5 "0 -1 0"
+"p13" 5 "0 -1 0"
+"o14" 5 "0 -1 0"
+"n14" 5 "0 -1 0"
+"l14" 5 "0 -1 0"
+"f14" 5 "0 -1 0"
+"g14" 5 "0 -1 0"
+"h14" 5 "0 -1 0"
+"i14" 5 "0 -1 0"
+"j14" 5 "0 -1 0"
+"m14" 5 "0 -1 0"
+"k14" 5 "0 -1 0"
+"f13" 5 "0 -1 0"
+"j13" 5 "0 -1 0"
+"i12" 2 "0 -1 0"
+"l12" 2 "0 -1 0"
+"j12" 2 "0 -1 0"
+"k12" 2 "0 -1 0"
+"h13" 1 "0 -1 0"
+"g12" 3 "0 -1 0"
+"h11" 3 "0 -1 0"
+"m12" 3 "0 -1 0"
+"n11" 3 "0 -1 0"
+"d13" 8 "0 -1 0"
+"d15" 8 "0 -1 0"
+"b16" 8 "0 -1 0"
+"b14" 8 "0 -1 0"
+"b12" 8 "0 -1 0"
+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" 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"
+"s17" 4 "0 -1 0"
+"t17" 4 "0 -1 0"
+"t20" 4 "0 -1 0"
+"s20" 4 "0 -1 0"
+"r20" 4 "0 -1 0"
+"q20" 4 "0 -1 0"
+"p20" 4 "0 -1 0"
+"o20" 4 "0 -1 0"
+"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"
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+"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"
index 1402b7a..e3df814 100644 (file)
@@ -1 +1 @@
-sprite,models/ok_nade_counter/ok_nade_counter_10
\ No newline at end of file
+sprite,models/ok_nade_counter/ok_nade_counter_09
\ No newline at end of file
diff --git a/models/weapons/overkillbullet.tga b/models/weapons/overkillbullet.tga
deleted file mode 100644 (file)
index f48d302..0000000
Binary files a/models/weapons/overkillbullet.tga and /dev/null differ
diff --git a/models/weapons/overkillbullet_gloss.tga b/models/weapons/overkillbullet_gloss.tga
deleted file mode 100644 (file)
index 08f2fd0..0000000
Binary files a/models/weapons/overkillbullet_gloss.tga and /dev/null differ
diff --git a/models/weapons/overkillbullet_reflect.tga b/models/weapons/overkillbullet_reflect.tga
deleted file mode 100644 (file)
index ecb0222..0000000
Binary files a/models/weapons/overkillbullet_reflect.tga and /dev/null differ
index b5b77e0..d332a04 100644 (file)
@@ -2,6 +2,7 @@ SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git
 PERL ?= perl
 QCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"'
 QCC ?= gmqcc
+NDEBUG ?= 1
  
 QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
 
@@ -22,7 +23,7 @@ QCCFLAGS ?= \
        -fftepp -flno -futf8 -fno-bail-on-werror -fftepp-predefs \
        -frelaxed-switch -freturn-assignments \
        $(QCCFLAGS_WATERMARK) \
-       -DNDEBUG=1 \
+       -DNDEBUG=$(NDEBUG) \
        $(QCCFLAGS_FEATURES) \
        $(QCCFLAGS_EXTRA)
 
@@ -46,17 +47,17 @@ $(QCCVERSIONFILE):
 FILES_CSPROGS = $(shell find lib common client -type f)
 ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE)
        @echo make[1]: Entering directory \`$(PWD)/client\'
-       cd client && $(QCC) $(QCCFLAGS) -DCSQC
+       cd client && $(QCC) $(QCCFLAGS) -DCSQC -o ../../csprogs.dat progs.inc
 
 FILES_PROGS = $(shell find lib common server -type f)
 ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE)
        @echo make[1]: Entering directory \`$(PWD)/server\'
-       cd server && $(QCC) $(QCCFLAGS) -DSVQC
+       cd server && $(QCC) $(QCCFLAGS) -DSVQC -o ../../progs.dat progs.inc
 
 FILES_MENU = $(shell find lib common menu -type f)
 ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE)
        @echo make[1]: Entering directory \`$(PWD)/menu\'
-       cd menu && $(QCC) $(QCCFLAGS) -DMENUQC
+       cd menu && $(QCC) $(QCCFLAGS) -DMENUQC -o ../../menu.dat progs.inc
 
 .PHONY: testcase
 testcase:
index 919cf03..4697319 100644 (file)
@@ -153,10 +153,6 @@ float autocvar_crosshair_size;
 int autocvar_ekg;
 float autocvar_fov;
 float autocvar_g_balance_damagepush_speedfactor;
-float autocvar_g_balance_tuba_attenuation;
-float autocvar_g_balance_tuba_fadetime;
-float autocvar_g_balance_tuba_volume;
-int autocvar_g_balance_tuba_pitchstep;
 float autocvar_g_warmup_limit;
 bool autocvar_hud_cursormode = true;
 float autocvar_hud_colorflash_alpha;
index 506d35c..83c3f44 100644 (file)
@@ -333,10 +333,10 @@ void CSQCPlayer_FallbackFrame_PostUpdate(bool isnew)
        // player "pops in"
        if(isnew)
        {
-#define FIX_FRAMETIME(f,ft) do {                                                                                                                                                                       \
+#define FIX_FRAMETIME(f,ft) MACRO_BEGIN {                                                                                                                                                      \
                if(IS_DEAD_FRAME(self.f) && self.ft != 0 && self.death_time != 0)                                                                                       \
                        self.ft = self.death_time;                                                                                                                                                              \
-} while(0)
+} MACRO_END
                FIX_FRAMETIME(frame, frame1time);
                FIX_FRAMETIME(frame2, frame2time);
 #ifdef CSQCMODEL_HAVE_TWO_FRAMES
index 069598e..3e959b0 100644 (file)
@@ -108,13 +108,6 @@ int w_deathtype;
 float w_issilent, w_random;
 vector w_org, w_backoff;
 
-float rifle_scope;
-float vortex_scope;
-
-float minelayer_maxmines;
-
-float hagar_maxrockets;
-
 float bgmtime;
 
 string weaponorder_byimpulse;
@@ -130,5 +123,4 @@ float uid2name_dialog;
 
 #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
 
-float g_balance_porto_secondary;
 #endif
index d30a872..47126a7 100644 (file)
@@ -24,10 +24,10 @@ REGISTER_REGISTRY(hud_panels)
 #define HUD_PANEL(NAME) HUD_PANEL_##NAME
 
 // draw the background/borders
-#define HUD_Panel_DrawBg(theAlpha) do {                                                                                                                                                                \
+#define HUD_Panel_DrawBg(theAlpha) MACRO_BEGIN {                                                                                                                                                               \
        if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")                                                                                               \
                draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\
-} while(0)
+} MACRO_END
 
 int panel_order[hud_panels_MAX];
 string hud_panelorder_prev;
@@ -213,7 +213,7 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
 
 // Get value for panel.current_panel_bg: if "" fetch default, else use panel_bg_str
 // comment on last line of macro: // we probably want to see a background in config mode at all times...
-#define HUD_Panel_GetBg() do {                                                                                      \
+#define HUD_Panel_GetBg() MACRO_BEGIN {                                                                             \
        string panel_bg;                                                                                                \
        if (!autocvar__hud_configure && panel_bg_str == "0") {                                                          \
                panel_bg = "0";                                                                                             \
@@ -238,10 +238,10 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
        if (panel.current_panel_bg)                                                                                     \
                strunzone(panel.current_panel_bg);                                                                          \
        panel.current_panel_bg = strzone(panel_bg);                                                                     \
-} while(0)
+} MACRO_END
 
 // Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
-#define HUD_Panel_GetColor() do {                                                                                   \
+#define HUD_Panel_GetColor() MACRO_BEGIN {                                                                          \
        if ((teamplay) && panel_bg_color_team) {                                                                        \
                if (autocvar__hud_configure && myteam == NUM_SPECTATOR)                                                     \
                        panel_bg_color = '1 0 0' * panel_bg_color_team;                                                         \
@@ -262,20 +262,20 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
                        }                                                                                                       \
                }                                                                                                           \
        }                                                                                                               \
-} while(0)
+} MACRO_END
 
 // Get value for panel_bg_color_team: if "" fetch default, else use panel_bg_color_team_str
-#define HUD_Panel_GetColorTeam() do {                                                                               \
+#define HUD_Panel_GetColorTeam() MACRO_BEGIN {                                                                      \
        if (panel_bg_color_team_str == "") {                                                                            \
                panel_bg_color_team = autocvar_hud_panel_bg_color_team;                                                     \
        } else {                                                                                                        \
                panel_bg_color_team = stof(panel_bg_color_team_str);                                                        \
        }                                                                                                               \
-} while(0)
+} MACRO_END
 
 // Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
 // comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
-#define HUD_Panel_GetBgAlpha() do {                                                                                 \
+#define HUD_Panel_GetBgAlpha() MACRO_BEGIN {                                                                        \
        if (panel_bg_alpha_str == "") {                                                                                 \
                panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);                                                     \
        }                                                                                                               \
@@ -288,39 +288,39 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
                else                                                                                                        \
                        panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha);                                \
        }                                                                                                               \
-} while(0)
+} MACRO_END
 
 // Get value for panel_fg_alpha. Also do various minalpha checks
 // comment on line 2 of macro: // ALWAYS show disabled panels at 0.25 alpha when in config mode
-#define HUD_Panel_GetFgAlpha() do {                                                                                 \
+#define HUD_Panel_GetFgAlpha() MACRO_BEGIN {                                                                        \
        panel_fg_alpha = autocvar_hud_panel_fg_alpha;                                                                   \
        if (autocvar__hud_configure && !panel_enabled)                                                                  \
                panel_fg_alpha = 0.25;                                                                                      \
-} while(0)
+} MACRO_END
 
 // Get border. See comments above, it's similar.
-#define HUD_Panel_GetBorder() do {                                                                                  \
+#define HUD_Panel_GetBorder() MACRO_BEGIN {                                                                         \
        if (panel_bg_border_str == "") {                                                                                \
                panel_bg_border = autocvar_hud_panel_bg_border;                                                             \
        } else {                                                                                                        \
                panel_bg_border = stof(panel_bg_border_str);                                                                \
        }                                                                                                               \
-} while(0)
+} MACRO_END
 
 // Get padding. See comments above, it's similar.
 // last line is a port of the old function, basically always make sure the panel contents are at least 5 pixels tall/wide, to disallow extreme padding values
-#define HUD_Panel_GetPadding() do {                                                                                 \
+#define HUD_Panel_GetPadding() MACRO_BEGIN {                                                                        \
        if (panel_bg_padding_str == "") {                                                                               \
                panel_bg_padding = autocvar_hud_panel_bg_padding;                                                           \
        } else {                                                                                                        \
                panel_bg_padding = stof(panel_bg_padding_str);                                                              \
        }                                                                                                               \
        panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding);                                \
-} while(0)
+} MACRO_END
 
 // return smoothly faded pos and size of given panel when a dialog is active
 // don't center too wide panels, it doesn't work with different resolutions
-#define HUD_Panel_UpdatePosSize_ForMenu() do { \
+#define HUD_Panel_UpdatePosSize_ForMenu() MACRO_BEGIN { \
        vector menu_enable_size = panel_size; \
        float max_panel_width = 0.52 * vid_conwidth; \
        if(panel_size.x > max_panel_width) \
@@ -331,16 +331,16 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
        vector menu_enable_pos = eX * (panel_bg_border + 0.5 * max_panel_width) + eY * 0.5 * vid_conheight - 0.5 * menu_enable_size; \
        panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * menu_enable_pos; \
        panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * menu_enable_size; \
-} while(0)
+} MACRO_END
 
 // Scale the pos and size vectors to absolute coordinates
-#define HUD_Panel_ScalePosSize() do {                                                                               \
+#define HUD_Panel_ScalePosSize() MACRO_BEGIN {                                                                      \
        panel_pos.x *= vid_conwidth;  panel_pos.y *= vid_conheight;                                                     \
        panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight;                                                    \
-} while(0)
+} MACRO_END
 
 // NOTE: in hud_configure mode cvars must be reloaded every frame
-#define HUD_Panel_UpdateCvars() do {                                                                                \
+#define HUD_Panel_UpdateCvars() MACRO_BEGIN {                                                                       \
        if (panel.update_time <= time) {                                                                                \
                if (autocvar__hud_configure) panel_enabled = cvar(strcat("hud_panel_", panel.panel_name));                  \
                panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos")));                              \
@@ -386,9 +386,9 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
                panel_bg_padding = panel.current_panel_bg_padding;                                                          \
                panel_fg_alpha = panel.current_panel_fg_alpha * hud_fade_alpha;                                             \
        }                                                                                                               \
-} while(0)
+} MACRO_END
 
-#define HUD_Panel_UpdatePosSize() do {                                                                              \
+#define HUD_Panel_UpdatePosSize() MACRO_BEGIN {                                                                     \
        panel_enabled = cvar(strcat("hud_panel_", panel.panel_name));                                                   \
        panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos")));                                  \
        panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size")));                                \
@@ -398,7 +398,7 @@ REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CO
        }                                                                                                               \
        panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border"));                        \
        HUD_Panel_GetBorder();                                                                                          \
-} while(0)
+} MACRO_END
 
 const int NOTIFY_MAX_ENTRIES = 10;
 const float NOTIFY_ICON_MARGIN = 0.02;
index 6c37aa1..96343d6 100644 (file)
@@ -160,7 +160,7 @@ void HUD_Ammo()
 
        Weapon wep = switchweapon;
        int i;
-       bool infinite_ammo = (getstati(STAT_ITEMS, 0, 24) & IT_UNLIMITED_WEAPON_AMMO);
+       bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_WEAPON_AMMO);
        row = column = 0;
        if(autocvar_hud_panel_ammo_onlycurrent)
        {
index bab1755..3b094d3 100644 (file)
@@ -8,13 +8,13 @@ void HUD_HealthArmor()
                if(hud != HUD_NORMAL) return;
                if(spectatee_status == -1) return;
 
-               health = getstati(STAT_HEALTH);
+               health = STAT(HEALTH);
                if(health <= 0)
                {
                        prev_health = -1;
                        return;
                }
-               armor = getstati(STAT_ARMOR);
+               armor = STAT(ARMOR);
 
                // code to check for spectatee_status changes is in Ent_ClientData()
                // prev_p_health and prev_health can be set to -1 there
index 33f797f..9153b85 100644 (file)
@@ -1,11 +1,11 @@
 // Info messages panel (#14)
 
-#define drawInfoMessage(s) do {                                                                                                                                                                                \
+#define drawInfoMessage(s) MACRO_BEGIN {                                                                                                                                                       \
        if(autocvar_hud_panel_infomessages_flip)                                                                                                                                                \
                o.x = pos.x + mySize.x - stringwidth(s, true, fontsize);                                                                                                        \
        drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);                                                                                                               \
        o.y += fontsize.y;                                                                                                                                                                                              \
-} while(0)
+} MACRO_END
 void HUD_InfoMessages()
 {
        if(!autocvar__hud_configure)
index 8e3166b..9ea22c9 100644 (file)
@@ -135,14 +135,14 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        }
 
        // when status CHANGES, set old status into prevstatus and current status into status
-       #define X(team) do {                                                                                                                    \
+       #define X(team) MACRO_BEGIN {                                                                                                   \
                if (team##flag != team##flag_prevframe) {                                                                       \
                team##flag_statuschange_time = time;                                                                    \
                team##flag_prevstatus = team##flag_prevframe;                                                   \
                team##flag_prevframe = team##flag;                                                                              \
        }                                                                                                                                                       \
        team##flag_statuschange_elapsedtime = time - team##flag_statuschange_time;      \
-    } while (0)
+    } MACRO_END
        X(red);
        X(blue);
        X(yellow);
@@ -163,7 +163,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        string team##_icon, team##_icon_prevstatus; \
        int team##_alpha, team##_alpha_prevstatus; \
        team##_alpha = team##_alpha_prevstatus = 1; \
-       do { \
+       MACRO_BEGIN { \
                switch (team##flag) { \
                        case 1: team##_icon = "flag_" #team "_taken"; break; \
                        case 2: team##_icon = "flag_" #team "_lost"; break; \
@@ -190,7 +190,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                                } \
                                break; \
                } \
-       } while (0)
+       } MACRO_END
        X(red, myteam != NUM_TEAM_1);
        X(blue, myteam != NUM_TEAM_2);
        X(yellow, myteam != NUM_TEAM_3);
@@ -255,13 +255,13 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        neutralflag_pos = pos;
        flag_size = e1 * fs * size1 + e2 * size2;
 
-       #define X(team) do { \
+       #define X(team) MACRO_BEGIN { \
                f = bound(0, team##flag_statuschange_elapsedtime * 2, 1); \
                if (team##_icon_prevstatus && f < 1) \
                        drawpic_aspect_skin_expanding(team##flag_pos, team##_icon_prevstatus, flag_size, '1 1 1', panel_fg_alpha * team##_alpha_prevstatus, DRAWFLAG_NORMAL, f); \
                if (team##_icon) \
                        drawpic_aspect_skin(team##flag_pos, team##_icon, flag_size, '1 1 1', panel_fg_alpha * team##_alpha * f, DRAWFLAG_NORMAL); \
-       } while (0)
+       } MACRO_END
        X(red);
        X(blue);
        X(yellow);
@@ -415,7 +415,7 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
        float BLINK_FREQ = 5;
        float kaball_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
 
-       int stat_items = getstati(STAT_ITEMS, 0, 24);
+       int stat_items = STAT(ITEMS);
        int kaball = (stat_items/IT_KEY1) & 1;
 
        if(kaball != kaball_prevstatus)
@@ -451,7 +451,7 @@ void HUD_Mod_NexBall(vector pos, vector mySize)
        float nb_pb_starttime, dt, p;
        int stat_items;
 
-       stat_items = getstati(STAT_ITEMS, 0, 24);
+       stat_items = STAT(ITEMS);
        nb_pb_starttime = STAT(NB_METERSTART);
 
        if (stat_items & IT_KEY1)
index e75f21f..854ed59 100644 (file)
@@ -56,7 +56,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 allItems = STAT(ITEMS);
        int allBuffs = STAT(BUFFS);
        int strengthTime, shieldTime, superTime;
 
@@ -65,7 +65,7 @@ void HUD_Powerups()
        {
                if(!autocvar_hud_panel_powerups) return;
                if(spectatee_status == -1) return;
-               if(getstati(STAT_HEALTH) <= 0) return;
+               if(STAT(HEALTH) <= 0) return;
                if(!(allItems & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON)) && !allBuffs) return;
 
                strengthTime = bound(0, STAT(STRENGTH_FINISHED) - time, 99);
index 33f4e1e..66d5169 100644 (file)
@@ -79,7 +79,7 @@ float HUD_Radar_InputEvent(float bInputType, float nPrimary, float nSecondary)
                                return false;
                }
 
-               if ( getstati(STAT_HEALTH) <= 0 )
+               if ( STAT(HEALTH) <= 0 )
                {
                        // Show scoreboard
                        if ( bInputType < 2 )
@@ -369,7 +369,7 @@ void HUD_Radar()
        {
                string message = "Click to select teleport destination";
 
-               if ( getstati(STAT_HEALTH) <= 0 )
+               if ( STAT(HEALTH) <= 0 )
                {
                        message = "Click to select spawn location";
                }
index 8970332..9cfebb8 100644 (file)
@@ -11,9 +11,8 @@ void weaponorder_swap(int i, int j, entity pass)
 string weaponorder_cmp_str;
 int weaponorder_cmp(int i, int j, entity pass)
 {
-       int ai, aj;
-       ai = strstrofs(weaponorder_cmp_str, sprintf(" %d ", weaponorder[i].weapon), 0);
-       aj = strstrofs(weaponorder_cmp_str, sprintf(" %d ", weaponorder[j].weapon), 0);
+       int ai = strstrofs(weaponorder_cmp_str, sprintf(" %d ", weaponorder[i].m_id), 0);
+       int aj = strstrofs(weaponorder_cmp_str, sprintf(" %d ", weaponorder[j].m_id), 0);
        return aj - ai; // the string is in REVERSE order (higher prio at the right is what we want, but higher prio first is the string)
 }
 
@@ -118,7 +117,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(Weapons_from(weaponorder[i].weapon))) || (weaponorder[i].weapon == complain_weapon))
+                       if((weapons_stat & WepSet_FromWeapon(weaponorder[i])) || (weaponorder[i].m_id == complain_weapon))
                                ++weapon_count;
 
 
@@ -339,14 +338,14 @@ void HUD_Weapons()
                // retrieve information about the current weapon to be drawn
                setself(weaponorder[i]);
                weapon_id = self.impulse;
-               isCurrent = (self.weapon == switchweapon.m_id);
+               isCurrent = (self == switchweapon);
 
                // 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(Weapons_from(self.weapon))) || (self.weapon == complain_weapon)))
+               if (!((weapons_stat & WepSet_FromWeapon(self)) || (self.m_id == complain_weapon)))
                        continue;
 
                // figure out the drawing position of weapon
@@ -361,7 +360,7 @@ void HUD_Weapons()
                // draw the weapon accuracy
                if(autocvar_hud_panel_weapons_accuracy)
                {
-                       float panel_weapon_accuracy = weapon_accuracy[self.weapon-WEP_FIRST];
+                       float panel_weapon_accuracy = weapon_accuracy[self.m_id-WEP_FIRST];
                        if(panel_weapon_accuracy >= 0)
                        {
                                color = Accuracy_GetColor(panel_weapon_accuracy);
@@ -370,7 +369,7 @@ void HUD_Weapons()
                }
 
                // drawing all the weapon items
-               if(weapons_stat & WepSet_FromWeapon(Weapons_from(self.weapon)))
+               if(weapons_stat & WepSet_FromWeapon(self))
                {
                        // draw the weapon image
                        if(isCurrent)
@@ -442,7 +441,7 @@ void HUD_Weapons()
                }
 
                // draw the complain message
-               if(self.weapon == complain_weapon)
+               if(self.m_id == complain_weapon)
                {
                        if(fadetime)
                                a = ((complain_weapon_time + when > time) ? 1 : bound(0, (complain_weapon_time + when + fadetime - time) / fadetime, 1));
index f2df818..2009388 100644 (file)
@@ -42,6 +42,11 @@ void CSQC_Init()
        LOG_INFOF("^4CSQC Build information: ^1%s\n", WATERMARK);
 #endif
 
+       // needs to be done so early because of the constants they create
+       static_init();
+       static_init_late();
+       static_init_precache();
+
        binddb = db_create();
        tempdb = db_create();
        ClientProgsDB = db_load("client.db");
@@ -93,11 +98,6 @@ void CSQC_Init()
 
        GetTeam(NUM_SPECTATOR, true); // add specs first
 
-       // needs to be done so early because of the constants they create
-       static_init();
-       static_init_late();
-       static_init_precache();
-
        // precaches
 
        if(autocvar_cl_reticle)
@@ -167,6 +167,7 @@ void Shutdown()
 .float has_team;
 float SetTeam(entity o, int Team)
 {
+       assert_once(Team);
        entity tm;
        if(teamplay)
        {
@@ -270,7 +271,8 @@ void Playerchecker_Think()
                                e.ping_packetloss = 0;
                                e.ping_movementloss = 0;
                                //e.gotscores = 0; // we might already have the scores...
-                               SetTeam(e, entcs_GetTeam(i)); // will not hurt; later updates come with HUD_UpdatePlayerTeams
+                               int t = entcs_GetScoreTeam(i);
+                               if (t) SetTeam(e, t); // will not hurt; later updates come with HUD_UpdatePlayerTeams
                                RegisterPlayer(e);
                                HUD_UpdatePlayerPos(e);
                        }
@@ -357,7 +359,7 @@ NET_HANDLE(ENT_CLIENT_SCORES, bool isnew)
        if(!isNew && n != this.sv_entnum)
        {
                //print("A CSQC entity changed its owner!\n");
-               LOG_INFOF("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", num_for_edict(this), this.classname);
+               LOG_INFOF("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", etof(this), this.classname);
                isNew = true;
                Ent_Remove();
        }
@@ -736,7 +738,7 @@ void CSQC_Ent_Update(bool isnew)
        {
                if (t != this.enttype || isnew)
                {
-                       LOG_INFOF("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(this), this.entnum, this.enttype, t);
+                       LOG_INFOF("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", etof(this), this.entnum, this.enttype, t);
                        Ent_Remove();
                        clearentity(this);
                        isnew = true;
@@ -746,7 +748,7 @@ void CSQC_Ent_Update(bool isnew)
        {
                if (!isnew)
                {
-                       LOG_INFOF("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(this), this.entnum, t);
+                       LOG_INFOF("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", etof(this), this.entnum, t);
                        isnew = true;
                }
        }
@@ -908,22 +910,10 @@ NET_HANDLE(ENT_CLIENT_INIT, bool isnew)
 
        armorblockpercent = ReadByte() / 255.0;
 
-       g_balance_mortar_bouncefactor = ReadCoord();
-       g_balance_mortar_bouncestop = ReadCoord();
-       g_balance_electro_secondary_bouncefactor = ReadCoord();
-       g_balance_electro_secondary_bouncestop = ReadCoord();
-
-       vortex_scope = !ReadByte();
-       rifle_scope = !ReadByte();
-
        serverflags = ReadByte();
 
-       minelayer_maxmines = ReadByte();
-
-       hagar_maxrockets = ReadByte();
-
        g_trueaim_minrange = ReadCoord();
-       g_balance_porto_secondary = ReadByte();
+
        return = true;
 
        MUTATOR_CALLHOOK(Ent_Init);
@@ -1110,7 +1100,7 @@ NET_HANDLE(TE_CSQC_WEAPONCOMPLAIN, bool isNew)
 {
        complain_weapon = ReadByte();
        if (complain_weapon_name) strunzone(complain_weapon_name);
-       complain_weapon_name = strzone(WEP_NAME(complain_weapon));
+       complain_weapon_name = strzone(Weapons_from(complain_weapon).m_name);
        complain_weapon_type = ReadByte();
        return = true;
 
index 91d5de0..49a92bb 100644 (file)
@@ -136,10 +136,6 @@ const int HOOK_END =      2;
 
 .float ping, ping_packetloss, ping_movementloss;
 
-float g_balance_mortar_bouncefactor;
-float g_balance_mortar_bouncestop;
-float g_balance_electro_secondary_bouncefactor;
-float g_balance_electro_secondary_bouncestop;
 float g_trueaim_minrange;
 
 float hud;
index 673cf00..b7962d5 100644 (file)
@@ -79,6 +79,7 @@ void MoveToLast(entity e)
 
 float RegisterTeam(entity Team)
 {
+       assert_once(Team.team, eprint(Team));
        entity tm;
        AuditLists();
        for(tm = teams.sort_next; tm; tm = tm.sort_next)
index ddac22e..3066fc6 100644 (file)
@@ -42,8 +42,8 @@ float cvar_or(string cv, float v);
 
 vector project_3d_to_2d(vector vec);
 
-#define draw_beginBoldFont()    do { drawfont = FONT_USER + 2; } while (0)
-#define draw_endBoldFont()      do { drawfont = FONT_USER + 1; } while (0)
+#define draw_beginBoldFont()    MACRO_BEGIN { drawfont = FONT_USER + 2; } MACRO_END
+#define draw_endBoldFont()      MACRO_BEGIN { drawfont = FONT_USER + 1; } MACRO_END
 
 float expandingbox_sizefactor_from_fadelerp(float fadelerp);
 
@@ -60,7 +60,7 @@ vector _drawpic_sz;
 float _drawpic_oldsz;
 string _drawpic_picpath;
 #define drawpic_aspect(pos,pic,mySize,color,theAlpha,drawflag)\
-       do {\
+       MACRO_BEGIN {\
                _drawpic_imgsize = draw_getimagesize(pic);\
                if(_drawpic_imgsize != '0 0 0') {\
                        _drawpic_imgaspect = _drawpic_imgsize.x/_drawpic_imgsize.y;\
@@ -77,35 +77,35 @@ string _drawpic_picpath;
                                        drawpic(pos + eY * (_drawpic_oldsz - _drawpic_sz.y) * 0.5, pic, _drawpic_sz, color, theAlpha, drawflag);\
                        }\
                }\
-       } while(0)
+       } MACRO_END
 
 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
 #define drawpic_aspect_skin(pos,pic,sz,color,theAlpha,drawflag)\
-       do{\
+       MACRO_BEGIN {\
                _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
                if(precache_pic(_drawpic_picpath) == "") {\
                        _drawpic_picpath = strcat("gfx/hud/default/", pic);\
                }\
                drawpic_aspect(pos, _drawpic_picpath, sz, color, theAlpha, drawflag);\
                _drawpic_picpath = string_null;\
-       } while(0)
+       } MACRO_END
 
 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
 #define drawpic_skin(pos,pic,sz,color,theAlpha,drawflag)\
-       do{\
+       MACRO_BEGIN {\
                _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
                if(precache_pic(_drawpic_picpath) == "") {\
                        _drawpic_picpath = strcat("gfx/hud/default/", pic);\
                }\
                drawpic(pos, _drawpic_picpath, sz, color, theAlpha, drawflag);\
                _drawpic_picpath = string_null;\
-       } while(0)
+       } MACRO_END
 
 void drawpic_aspect_skin_expanding(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp);
 
 void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp);
 
-#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) do {                                                                                                                                     \
+#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) MACRO_BEGIN {                                                                                                                    \
        float textaspect, oldsz;                                                                                                                                                                                \
        textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y;                                                                                    \
        if(sz.x/sz.y > textaspect) {                                                                                                                                                                    \
@@ -117,7 +117,7 @@ void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theSc
                sz.y = sz.x / textaspect;                                                                                                                                                                       \
                pos.y += (oldsz - sz.y) * 0.5;                                                                                                                                                          \
        }                                                                                                                                                                                                                               \
-} while(0)
+} MACRO_END
 
 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
 void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag);
index 775e031..2727db4 100644 (file)
@@ -45,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"
diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src
deleted file mode 100644 (file)
index 8a3c036..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-../../csprogs.dat
-progs.inc
index 4d9a8c6..9c86d9e 100644 (file)
@@ -109,7 +109,7 @@ void HUD_UpdatePlayerTeams()
        for(pl = players.sort_next; pl; pl = pl.sort_next)
        {
                num += 1;
-               Team = entcs_GetTeam(pl.sv_entnum);
+               Team = entcs_GetScoreTeam(pl.sv_entnum);
                if(SetTeam(pl, Team))
                {
                        tmp = pl.sort_prev;
@@ -986,7 +986,7 @@ float HUD_WouldDrawScoreboard() {
                return 1;
        else if (intermission == 2)
                return 0;
-       else if (spectatee_status != -1 && getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard && gametype != MAPINFO_TYPE_CTS && !active_minigame)
+       else if (spectatee_status != -1 && STAT(HEALTH) <= 0 && autocvar_cl_deathscoreboard && gametype != MAPINFO_TYPE_CTS && !active_minigame)
                return 1;
        else if (scoreboard_showscores_force)
                return 1;
@@ -1002,8 +1002,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        float initial_posx = pos.x;
        int disownedcnt = 0;
        FOREACH(Weapons, it != WEP_Null, LAMBDA(
-               if (!it.weapon) continue;
-
                int weapon_stats = weapon_accuracy[i - WEP_FIRST];
 
                WepSet set = it.m_wepset;
@@ -1064,7 +1062,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 
        int column = 0;
        FOREACH(Weapons, it != WEP_Null, LAMBDA(
-               if (!it.weapon) continue;
                int weapon_stats = weapon_accuracy[i - WEP_FIRST];
 
                WepSet set = it.m_wepset;
index 85fea0d..8602ef2 100644 (file)
@@ -63,50 +63,50 @@ 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 \
+#define lowpass(value, frac, ref_store, ret) MACRO_BEGIN \
 { \
        float __frac = bound(0, frac, 1); \
        ret = ref_store = ref_store * (1 - __frac) + (value) * __frac; \
-} while (0)
+} MACRO_END
 
-#define lowpass_limited(value, frac, limit, ref_store, ret) do \
+#define lowpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \
 { \
        float __ignore; lowpass(value, frac, ref_store, __ignore); \
        ret = ref_store = bound((value) - (limit), ref_store, (value) + (limit)); \
-} while (0)
+} MACRO_END
 
-#define highpass(value, frac, ref_store, ret) do \
+#define highpass(value, frac, ref_store, ret) MACRO_BEGIN \
 { \
        float __f; lowpass(value, frac, ref_store, __f); \
        ret = (value) - __f; \
-} while (0)
+} MACRO_END
 
-#define highpass_limited(value, frac, limit, ref_store, ret) do \
+#define highpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \
 { \
        float __f; lowpass_limited(value, frac, limit, ref_store, __f); \
        ret = (value) - __f; \
-} while (0)
+} MACRO_END
 
-#define lowpass3(value, fracx, fracy, fracz, ref_store, ref_out) do \
+#define lowpass3(value, fracx, fracy, fracz, ref_store, ref_out) MACRO_BEGIN \
 { \
        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)
+} MACRO_END
 
-#define highpass3(value, fracx, fracy, fracz, ref_store, ref_out) do \
+#define highpass3(value, fracx, fracy, fracz, ref_store, ref_out) MACRO_BEGIN \
 { \
        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)
+} MACRO_END
 
-#define highpass3_limited(value, fracx, limitx, fracy, limity, fracz, limitz, ref_store, ref_out) do \
+#define highpass3_limited(value, fracx, limitx, fracy, limity, fracz, limitz, ref_store, ref_out) MACRO_BEGIN \
 { \
        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)
+} MACRO_END
 
 void viewmodel_animate(entity this)
 {
@@ -115,7 +115,7 @@ void viewmodel_animate(entity this)
        prevtime = time;
 
        if (autocvar_chase_active) return;
-       if (getstati(STAT_HEALTH) <= 0) return;
+       if (STAT(HEALTH) <= 0) return;
 
        entity view = CSQCModel_server2csqc(player_localentnum - 1);
 
@@ -272,7 +272,7 @@ void viewmodel_animate(entity this)
 
 void viewmodel_draw(entity this)
 {
-       int mask = (intermission || (getstati(STAT_HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL;
+       int mask = (intermission || (STAT(HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL;
        float a = this.alpha;
        int c = stof(getplayerkeyvalue(current_player, "colors"));
        vector g;
@@ -350,13 +350,13 @@ void Porto_Draw(entity this)
 
        if(activeweapon != WEP_PORTO || spectatee_status || gametype == MAPINFO_TYPE_NEXBALL)
                return;
-       if(g_balance_porto_secondary)
+       if(WEP_CVAR(porto, secondary))
                return;
        if(intermission == 1)
                return;
        if(intermission == 2)
                return;
-       if (getstati(STAT_HEALTH) <= 0)
+       if (STAT(HEALTH) <= 0)
                return;
 
        dir = view_forward;
@@ -448,7 +448,7 @@ vector GetCurrentFov(float fov)
        zoomdir = button_zoom;
        if(hud == HUD_NORMAL)
        if(switchweapon == activeweapon)
-       if((activeweapon == WEP_VORTEX && vortex_scope) || (activeweapon == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here
+       if((activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary))) // do NOT use switchweapon here
                zoomdir += button_attack2;
        if(spectatee_status > 0 || isdemo())
        {
@@ -672,7 +672,7 @@ float TrueAimCheck()
                        break;
        }
 
-       vector traceorigin = entcs_receiver(player_localentnum - 1).origin + (eZ * getstati(STAT_VIEWHEIGHT));
+       vector traceorigin = entcs_receiver(player_localentnum - 1).origin + (eZ * STAT(VIEWHEIGHT));
 
        vecs = decompressShotOrigin(STAT(SHOTORG));
 
@@ -757,7 +757,7 @@ bool WantEventchase()
                        return true;
                if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WEPSET(NEXBALL)))
                        return true;
-               if(autocvar_cl_eventchase_death && (getstati(STAT_HEALTH) <= 0))
+               if(autocvar_cl_eventchase_death && (STAT(HEALTH) <= 0))
                {
                        if(autocvar_cl_eventchase_death == 2)
                        {
@@ -954,7 +954,7 @@ void HUD_Crosshair()
 
                        case 2: // crosshair_color_by_health
                        {
-                               float x = getstati(STAT_HEALTH);
+                               float x = STAT(HEALTH);
 
                                //x = red
                                //y = green
@@ -1169,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 && minelayer_maxmines && autocvar_crosshair_ring_minelayer)
+                               else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && WEP_CVAR(minelayer, limit) && autocvar_crosshair_ring_minelayer)
                                {
-                                       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_value = bound(0, STAT(LAYED_MINES) / WEP_CVAR(minelayer, limit), 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 && STAT(HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
                                {
-                                       ring_value = bound(0, STAT(HAGAR_LOAD) / hagar_maxrockets, 1);
+                                       ring_value = bound(0, STAT(HAGAR_LOAD) / WEP_CVAR_SEC(hagar, load_max), 1);
                                        ring_alpha = autocvar_crosshair_ring_hagar_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring.tga";
@@ -1242,8 +1242,7 @@ void HUD_Crosshair()
                        }
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
-                       do \
-                       { \
+                       MACRO_BEGIN { \
                                if(wcross_blur > 0) \
                                { \
                                        for(i = -2; i <= 2; ++i) \
@@ -1254,8 +1253,7 @@ void HUD_Crosshair()
                                { \
                                        M(0,0,sz,wcross_name,wcross_alpha); \
                                } \
-                       } \
-                       while(0)
+                       } MACRO_END
 
 #define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \
                        drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size.x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size.y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
@@ -1432,7 +1430,7 @@ void CSQC_UpdateView(float w, float h)
 
        ticrate = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
 
-       float is_dead = (getstati(STAT_HEALTH) <= 0);
+       float is_dead = (STAT(HEALTH) <= 0);
 
        // FIXME do we need this hack?
        if(isdemo())
@@ -1710,7 +1708,7 @@ void CSQC_UpdateView(float w, float h)
        switchingweapon = Weapons_from(STAT(SWITCHINGWEAPON));
 
        // actually active weapon (for zoom)
-       activeweapon = Weapons_from(getstati(STAT_ACTIVEWEAPON));
+       activeweapon = Weapons_from(STAT(ACTIVEWEAPON));
 
        switchweapon = Weapons_from(STAT(SWITCHWEAPON));
 
@@ -2006,7 +2004,7 @@ void CSQC_UpdateView(float w, float h)
                splash_pos.y = (vid_conheight - splash_size.y) / 2;
 
                float myhealth_flash_temp;
-               myhealth = getstati(STAT_HEALTH);
+               myhealth = STAT(HEALTH);
 
                // fade out
                myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
@@ -2115,7 +2113,7 @@ void CSQC_UpdateView(float w, float h)
                if (strength_finished - time > 0) { sharpen_intensity += (strength_finished - time); }
                if (invincible_finished - time > 0) { sharpen_intensity += (invincible_finished - time); }
 
-               sharpen_intensity = bound(0, ((getstati(STAT_HEALTH) > 0) ? sharpen_intensity : 0), 5); // Check to see if player is alive (if not, set 0) - also bound to fade out starting at 5 seconds.
+               sharpen_intensity = bound(0, ((STAT(HEALTH) > 0) ? sharpen_intensity : 0), 5); // Check to see if player is alive (if not, set 0) - also bound to fade out starting at 5 seconds.
 
                if(autocvar_hud_powerup && sharpen_intensity > 0)
                {
index 2100c3f..1b79f7d 100644 (file)
@@ -344,8 +344,8 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                self.maxs = '0 0 -4';
                                self.move_movetype = MOVETYPE_BOUNCE;
                                self.move_touch = func_null;
-                               self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
-                               self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
+                               self.move_bounce_factor = WEP_CVAR_SEC(electro, bouncefactor);
+                               self.move_bounce_stopspeed = WEP_CVAR_SEC(electro, bouncestop);
                                break;
                        case PROJECTILE_RPC:
                        case PROJECTILE_ROCKET:
@@ -362,8 +362,8 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                self.maxs = '3 3 3';
                                self.move_movetype = MOVETYPE_BOUNCE;
                                self.move_touch = func_null;
-                               self.move_bounce_factor = g_balance_mortar_bouncefactor;
-                               self.move_bounce_stopspeed = g_balance_mortar_bouncestop;
+                               self.move_bounce_factor = WEP_CVAR(mortar, bouncefactor);
+                               self.move_bounce_stopspeed = WEP_CVAR(mortar, bouncestop);
                                break;
                        case PROJECTILE_SHAMBLER_LIGHTNING:
                                self.mins = '-8 -8 -8';
@@ -444,8 +444,8 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                            self.maxs = '0 0 -4';
                            self.move_movetype = MOVETYPE_BOUNCE;
                            self.move_touch = func_null;
-                           self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
-                           self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
+                           self.move_bounce_factor = WEP_CVAR_SEC(electro, bouncefactor);
+                           self.move_bounce_stopspeed = WEP_CVAR_SEC(electro, bouncestop);
                            break;
                        */
                        default:
index 23f43b9..44b3c1b 100644 (file)
@@ -56,9 +56,9 @@ bool monsters_animoverride(entity e)
 
 void animdecide_load_if_needed(entity e)
 {
-       if(e.modelindex == e.animdecide_modelindex)
-               return;
-       e.animdecide_modelindex = e.modelindex;
+       int mdlidx = e.modelindex;
+       if (mdlidx == e.animdecide_modelindex) return;
+       e.animdecide_modelindex = mdlidx;
 
        if(substring(e.model, 0, 16) == "models/monsters/")
        {
@@ -66,35 +66,39 @@ void animdecide_load_if_needed(entity e)
                        return;
        }
 
+#define ANIM_VEC(a, frames, rate) anim_vec(ANIM_##a, mdlidx, frames, rate)
+
        vector none = '0 0 0';
-       e.anim_die1 = animfixfps(e, '0 1 0.5', none); // 2 seconds
-       e.anim_die2 = animfixfps(e, '1 1 0.5', none); // 2 seconds
-       e.anim_draw = animfixfps(e, '2 1 3', none);
-       e.anim_duckwalk = animfixfps(e, '4 1 1', none);
-       e.anim_duckjump = animfixfps(e, '5 1 10', none);
-       e.anim_duckidle = animfixfps(e, '6 1 1', none);
-       e.anim_idle = animfixfps(e, '7 1 1', none);
-       e.anim_jump = animfixfps(e, '8 1 10', none);
-       e.anim_pain1 = animfixfps(e, '9 1 2', none); // 0.5 seconds
-       e.anim_pain2 = animfixfps(e, '10 1 2', none); // 0.5 seconds
-       e.anim_shoot = animfixfps(e, '11 1 5', none); // analyze models and set framerate
-       e.anim_taunt = animfixfps(e, '12 1 0.33', none);
-       e.anim_run = animfixfps(e, '13 1 1', none);
-       e.anim_runbackwards = animfixfps(e, '14 1 1', none);
-       e.anim_strafeleft = animfixfps(e, '15 1 1', none);
-       e.anim_straferight = animfixfps(e, '16 1 1', none);
-       e.anim_forwardright = animfixfps(e, '19 1 1', '16 1 1');
-       e.anim_forwardleft = animfixfps(e, '20 1 1', '15 1 1');
-       e.anim_backright = animfixfps(e, '21 1 1', '16 1 1');
-       e.anim_backleft  = animfixfps(e, '22 1 1', '15 1 1');
-       e.anim_melee = animfixfps(e, '23 1 1', '11 1 1');
-       e.anim_duckwalkbackwards = animfixfps(e, '24 1 1', '4 1 1');
-       e.anim_duckwalkstrafeleft = animfixfps(e, '25 1 1', '4 1 1');
-       e.anim_duckwalkstraferight = animfixfps(e, '26 1 1', '4 1 1');
-       e.anim_duckwalkforwardright = animfixfps(e, '27 1 1', '4 1 1');
-       e.anim_duckwalkforwardleft = animfixfps(e, '28 1 1', '4 1 1');
-       e.anim_duckwalkbackright = animfixfps(e, '29 1 1', '4 1 1');
-       e.anim_duckwalkbackleft  = animfixfps(e, '30 1 1', '4 1 1');
+       e.anim_die1 = animfixfps(e, ANIM_VEC(die1, 1, 0.5), none); // 2 seconds
+       e.anim_die2 = animfixfps(e, ANIM_VEC(die2, 1, 0.5), none); // 2 seconds
+       e.anim_draw = animfixfps(e, ANIM_VEC(draw, 1, 3), none);
+       e.anim_duckwalk = animfixfps(e, ANIM_VEC(duckwalk, 1, 1), none);
+       e.anim_duckjump = animfixfps(e, ANIM_VEC(duckjump, 1, 10), none);
+       e.anim_duckidle = animfixfps(e, ANIM_VEC(duckidle, 1, 1), none);
+       e.anim_idle = animfixfps(e, ANIM_VEC(idle, 1, 1), none);
+       e.anim_jump = animfixfps(e, ANIM_VEC(jump, 1, 10), none);
+       e.anim_pain1 = animfixfps(e, ANIM_VEC(pain1, 1, 2), none); // 0.5 seconds
+       e.anim_pain2 = animfixfps(e, ANIM_VEC(pain2, 1, 2), none); // 0.5 seconds
+       e.anim_shoot = animfixfps(e, ANIM_VEC(shoot, 1, 5), none); // analyze models and set framerate
+       e.anim_taunt = animfixfps(e, ANIM_VEC(taunt, 1, 0.33), none);
+       e.anim_run = animfixfps(e, ANIM_VEC(run, 1, 1), none);
+       e.anim_runbackwards = animfixfps(e, ANIM_VEC(runbackwards, 1, 1), none);
+       e.anim_strafeleft = animfixfps(e, ANIM_VEC(strafeleft, 1, 1), none);
+       e.anim_straferight = animfixfps(e, ANIM_VEC(straferight, 1, 1), none);
+       e.anim_forwardright = animfixfps(e, ANIM_VEC(forwardright, 1, 1), ANIM_VEC(straferight, 1, 1));
+       e.anim_forwardleft = animfixfps(e, ANIM_VEC(forwardleft, 1, 1), ANIM_VEC(strafeleft, 1, 1));
+       e.anim_backright = animfixfps(e, ANIM_VEC(backright, 1, 1), ANIM_VEC(straferight, 1, 1));
+       e.anim_backleft  = animfixfps(e, ANIM_VEC(backleft , 1, 1), ANIM_VEC(strafeleft, 1, 1));
+       e.anim_melee = animfixfps(e, ANIM_VEC(melee, 1, 1), ANIM_VEC(shoot, 1, 1));
+       e.anim_duckwalkbackwards = animfixfps(e, ANIM_VEC(duckwalkbackwards, 1, 1), ANIM_VEC(duckwalk, 1, 1));
+       e.anim_duckwalkstrafeleft = animfixfps(e, ANIM_VEC(duckwalkstrafeleft, 1, 1), ANIM_VEC(duckwalk, 1, 1));
+       e.anim_duckwalkstraferight = animfixfps(e, ANIM_VEC(duckwalkstraferight, 1, 1), ANIM_VEC(duckwalk, 1, 1));
+       e.anim_duckwalkforwardright = animfixfps(e, ANIM_VEC(duckwalkforwardright, 1, 1), ANIM_VEC(duckwalk, 1, 1));
+       e.anim_duckwalkforwardleft = animfixfps(e, ANIM_VEC(duckwalkforwardleft, 1, 1), ANIM_VEC(duckwalk, 1, 1));
+       e.anim_duckwalkbackright = animfixfps(e, ANIM_VEC(duckwalkbackright, 1,  1), ANIM_VEC(duckwalk, 1, 1));
+       e.anim_duckwalkbackleft  = animfixfps(e, ANIM_VEC(duckwalkbackleft , 1,  1), ANIM_VEC(duckwalk, 1, 1));
+
+#undef ANIM_VEC
 
        // these anims ought to stay until stopped explicitly by weaponsystem
        e.anim_shoot_z = 0.001;
index 521c6ab..578a30f 100644 (file)
@@ -8,40 +8,100 @@ void animdecide_load_if_needed(entity e);
 void animdecide_setimplicitstate(entity e, float onground);
 void animdecide_setframes(entity e, bool support_blending, .int fld_frame, .int fld_frame1time, .int fld_frame2, .int fld_frame2time);
 
+CLASS(Animation, Object)
+       ATTRIB(Animation, m_framenames, string, string_null)
+       STATIC_METHOD(Animation, getframe, int(Animation this, int mdlidx))
+       {
+               FOREACH_WORD(this.m_framenames, true, {
+                       int f = frameforname(mdlidx, it);
+                       if (f != -1) return f;
+               });
+#ifdef CSQC
+               LOG_DEBUGF("Missing animation for %s: %s\n", modelnameforindex(mdlidx), this.registered_id);
+#endif
+               return -1;
+       }
+ENDCLASS(Animation)
+
+REGISTRY(Animations, BITS(8))
+REGISTER_REGISTRY(Animations)
+#define Animations_from(id) _Animations_from(id, NULL)
+#define WriteAnimation(to, it) WriteRegistry(Animations, to, it)
+#define ReadAnimation() ReadRegistry(Animations)
+#define REGISTER_ANIMATION(id, framenames) \
+       .vector anim_##id; \
+       REGISTER(Animations, ANIM_##id, m_id, NEW(Animation)) { \
+               this.m_framenames = framenames; \
+       }
+
+vector anim_vec(Animation anim, int mdlidx, int numframes, float framerate)
+{
+       vector v;
+       v.x = Animation_getframe(anim, mdlidx);
+       v.y = numframes;
+       v.z = framerate;
+       return v;
+}
+
 // player animation data for this model
 // each vector is as follows:
 // _x = startframe
 // _y = numframes
 // _z = framerate
-.vector anim_die1; // player dies
-.vector anim_die2; // player dies differently
-.vector anim_draw; // player pulls out a weapon
-.vector anim_duckwalk; // player walking while crouching
-.vector anim_duckjump; // player jumping from a crouch
-.vector anim_duckidle; // player idling while crouching
-.vector anim_idle; // player standing
-.vector anim_jump; // player jump
-.vector anim_pain1; // player flinches from pain
-.vector anim_pain2; // player flinches from pain, differently
-.vector anim_shoot; // player shoots
-.vector anim_taunt; // player taunts others (FIXME: no code references this)
-.vector anim_run; // player running forward
-.vector anim_runbackwards; // player running backward
-.vector anim_strafeleft; // player shuffling left quickly
-.vector anim_straferight; // player shuffling right quickly
-.vector anim_forwardright; // player running forward and right
-.vector anim_forwardleft; // player running forward and left
-.vector anim_backright; // player running backward and right
-.vector anim_backleft; // player running back and left
-.vector anim_melee; // player doing the melee action
-.vector anim_duck; // player doing the melee action
-.vector anim_duckwalkbackwards;
-.vector anim_duckwalkstrafeleft;
-.vector anim_duckwalkstraferight;
-.vector anim_duckwalkforwardright;
-.vector anim_duckwalkforwardleft;
-.vector anim_duckwalkbackright;
-.vector anim_duckwalkbackleft;
+/** player dies */
+REGISTER_ANIMATION(die1, "dieone groupified_0_anim");
+/** player dies differently */
+REGISTER_ANIMATION(die2, "dietwo groupified_1_anim");
+/** player pulls out a weapon */
+REGISTER_ANIMATION(draw, "draw groupified_2_anim");
+REGISTER_ANIMATION(duck, "duck groupified_3_anim");
+/** player walking while crouching */
+REGISTER_ANIMATION(duckwalk, "duckwalk groupified_4_anim");
+/** player jumping from a crouch */
+REGISTER_ANIMATION(duckjump, "duckjump groupified_5_anim");
+/** player idling while crouching */
+REGISTER_ANIMATION(duckidle, "duckidle groupified_6_anim");
+/** player standing */
+REGISTER_ANIMATION(idle, "idle groupified_7_anim");
+/** player jump */
+REGISTER_ANIMATION(jump, "jump groupified_8_anim");
+/** player flinches from pain */
+REGISTER_ANIMATION(pain1, "painone groupified_9_anim");
+/** player flinches from pain, differently */
+REGISTER_ANIMATION(pain2, "paintwo groupified_10_anim");
+/** player shoots */
+REGISTER_ANIMATION(shoot, "shoot groupified_11_anim");
+/** player taunts others (FIXME: no code references this) */
+REGISTER_ANIMATION(taunt, "taunt groupified_12_anim");
+/** player running forward */
+REGISTER_ANIMATION(run, "run groupified_13_anim");
+/** player running backward */
+REGISTER_ANIMATION(runbackwards, "runbackwards groupified_14_anim");
+/** player shuffling left quickly */
+REGISTER_ANIMATION(strafeleft, "strafeleft groupified_15_anim");
+/** player shuffling right quickly */
+REGISTER_ANIMATION(straferight, "straferight groupified_16_anim");
+/**  */
+REGISTER_ANIMATION(dead1, "deadone groupified_17_anim");
+/**  */
+REGISTER_ANIMATION(dead2, "deadtwo groupified_18_anim");
+/** player running forward and right */
+REGISTER_ANIMATION(forwardright, "forwardright groupified_19_anim");
+/** player running forward and left */
+REGISTER_ANIMATION(forwardleft, "forwardleft groupified_20_anim");
+/** player running backward and right */
+REGISTER_ANIMATION(backright, "backright groupified_21_anim");
+/** player running back and left */
+REGISTER_ANIMATION(backleft, "backleft groupified_22_anim");
+/** player doing the melee action */
+REGISTER_ANIMATION(melee, "melee groupified_23_anim");
+REGISTER_ANIMATION(duckwalkbackwards, "duckwalkbackwards groupified_24_anim");
+REGISTER_ANIMATION(duckwalkstrafeleft, "duckwalkstrafeleft duckstrafeleft groupified_25_anim");
+REGISTER_ANIMATION(duckwalkstraferight, "duckwalkstraferight duckstraferight groupified_26_anim");
+REGISTER_ANIMATION(duckwalkforwardright, "duckwalkforwardright duckforwardright groupified_27_anim");
+REGISTER_ANIMATION(duckwalkforwardleft, "duckwalkforwardleft groupified_28_anim");
+REGISTER_ANIMATION(duckwalkbackright, "duckwalkbackright duckbackwardright groupified_29_anim");
+REGISTER_ANIMATION(duckwalkbackleft, "duckwalkbackleft duckbackwardleft groupified_30_anim");
 .float animdecide_modelindex;
 
 // please network this one
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..6931a98 100644 (file)
@@ -274,16 +274,9 @@ void GenericCommand_maplist(float request, float argc)
                                {
                                        MapInfo_Enumerate();
                                        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
-                                       argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
-
-                                       tmp_string = "";
-                                       for(i = 0; i < argc; ++i)
-                                               if(MapInfo_CheckMap(argv(i)))
-                                                       tmp_string = strcat(tmp_string, " ", argv(i));
-
-                                       tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
-                                       cvar_set("g_maplist", tmp_string);
-
+                                       string filtered = "";
+                                       FOREACH_WORD(cvar_string("g_maplist"), MapInfo_CheckMap(it), filtered = cons(filtered, it));
+                                       cvar_set("g_maplist", filtered);
                                        return;
                                }
 
@@ -559,7 +552,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 +562,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 5ead524..7470235 100644 (file)
@@ -28,7 +28,7 @@ REGISTER_NET_TEMP(net_debug)
                int channel = MSG_ONE;
                msg_entity = to;
                WriteHeader(channel, net_debug);
-               WriteShort(channel, num_for_edict(this));
+               WriteShort(channel, etof(this));
                WriteByte(channel, is_pure(this));
                WriteCoord(channel, this.origin.x);
                WriteCoord(channel, this.origin.y);
@@ -71,7 +71,7 @@ bool autocvar_debugdraw;
                                pos.z = 0;
                                pos.y += ofs * size;
                                drawcolorcodedstring2(pos,
-                                       sprintf("%d: '%s'@%s:%d", (e.debug ? e.sv_entnum : num_for_edict(e)),
+                                       sprintf("%d: '%s'@%s:%d", (e.debug ? e.sv_entnum : etof(e)),
                                        e.classname, e.sourceLocFile, e.sourceLocLine),
                                        size * '1 1 0', rgb, 0.5, DRAWFLAG_NORMAL);
                                ++ofs;
@@ -81,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)
                {
index f4df323..f6b82a6 100644 (file)
 #define EFFECTINFO_PARSER(on) \
     on(type,                                        MY(type) \
-    ,{ ASSERT(n == 1 && "type");                    MY(type) = strzone(argv(1)); \
+    ,{ demand(n == 1 && "type");                    MY(type) = strzone(argv(1)); \
     }, sprintf(" %s",                               (MY(type)) \
     )) \
     on(airfriction,                                 MY(airfriction) \
-    ,{ ASSERT(n == 1 && "airfriction");             MY(airfriction) = stof(argv(1)); \
+    ,{ demand(n == 1 && "airfriction");             MY(airfriction) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(airfriction)) \
     )) \
     on(alpha,                                       MY(alpha_min) ||                    MY(alpha_max) ||                MY(alpha_fade) \
-    ,{ ASSERT(n == 3 && "alpha");                   MY(alpha_min) = stof(argv(1));      MY(alpha_max) = stof(argv(2));  MY(alpha_fade) = stof(argv(3)); \
+    ,{ demand(n == 3 && "alpha");                   MY(alpha_min) = stof(argv(1));      MY(alpha_max) = stof(argv(2));  MY(alpha_fade) = stof(argv(3)); \
     }, sprintf(" %s %s %s",                         ftos(MY(alpha_min)),                ftos(MY(alpha_max)),            ftos(MY(alpha_fade)) \
     )) \
     on(blend,                                       MY(blend) \
-    ,{ ASSERT(n == 1 && "blend");                   MY(blend) = strzone(argv(1)); \
+    ,{ demand(n == 1 && "blend");                   MY(blend) = strzone(argv(1)); \
     }, sprintf(" %s",                               (MY(blend)) \
     )) \
     on(bounce,                                      MY(bounce) \
-    ,{ ASSERT(n == 1 && "bounce");                  MY(bounce) = stof(argv(1)); \
+    ,{ demand(n == 1 && "bounce");                  MY(bounce) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(bounce)) \
     )) \
     on(color,                                       MY(color_min) ||                    MY(color_max) \
-    ,{ ASSERT(n == 2 && "color");                   MY(color_min) = strzone(argv(1));   MY(color_max) = strzone(argv(2)); \
+    ,{ demand(n == 2 && "color");                   MY(color_min) = strzone(argv(1));   MY(color_max) = strzone(argv(2)); \
     }, sprintf(" %s %s",                            (MY(color_min)),                    (MY(color_max)) \
     )) \
     on(countabsolute,                               MY(countabsolute) \
-    ,{ ASSERT(n == 1 && "countabsolute");           MY(countabsolute) = stof(argv(1)); \
+    ,{ demand(n == 1 && "countabsolute");           MY(countabsolute) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(countabsolute)) \
     )) \
     on(count,                                       MY(count) \
-    ,{ ASSERT(n == 1 && "count");                   MY(count) = stof(argv(1)); \
+    ,{ demand(n == 1 && "count");                   MY(count) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(count)) \
     )) \
     on(gravity,                                     MY(gravity) \
-    ,{ ASSERT(n == 1 && "gravity");                 MY(gravity) = stof(argv(1)); \
+    ,{ demand(n == 1 && "gravity");                 MY(gravity) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(gravity)) \
     )) \
     on(lightcolor,                                  MY(lightcolor) \
-    ,{ ASSERT(n == 3 && "lightcolor");              MY(lightcolor) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "lightcolor");              MY(lightcolor) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(lightcolor)) \
     )) \
     on(lightradiusfade,                             MY(lightradiusfade) \
-    ,{ ASSERT(n == 1 && "lightradiusfade");         MY(lightradiusfade) = stof(argv(1)); \
+    ,{ demand(n == 1 && "lightradiusfade");         MY(lightradiusfade) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(lightradiusfade)) \
     )) \
     on(lightradius,                                 MY(lightradius) \
-    ,{ ASSERT(n == 1 && "lightradius");             MY(lightradius) = stof(argv(1)); \
+    ,{ demand(n == 1 && "lightradius");             MY(lightradius) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(lightradius)) \
     )) \
     on(lighttime,                                   MY(lighttime) \
-    ,{ ASSERT(n == 1 && "lighttime");               MY(lighttime) = stof(argv(1)); \
+    ,{ demand(n == 1 && "lighttime");               MY(lighttime) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(lighttime)) \
     )) \
     on(liquidfriction,                              MY(liquidfriction) \
-    ,{ ASSERT(n == 1 && "liquidfriction");          MY(liquidfriction) = stof(argv(1)); \
+    ,{ demand(n == 1 && "liquidfriction");          MY(liquidfriction) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(liquidfriction)) \
     )) \
     on(notunderwater,                               MY(notunderwater) \
-    ,{ ASSERT(n == 0 && "notunderwater");           MY(notunderwater) = true; \
+    ,{ demand(n == 0 && "notunderwater");           MY(notunderwater) = true; \
     }, "" \
     ) \
     on(orientation,                                 MY(orientation) \
-    ,{ ASSERT(n == 1 && "orientation");             MY(orientation) = strzone(argv(1)); \
+    ,{ demand(n == 1 && "orientation");             MY(orientation) = strzone(argv(1)); \
     }, sprintf(" %s",                               (MY(orientation)) \
     )) \
     on(originjitter,                                MY(originjitter) \
-    ,{ ASSERT(n == 3 && "originjitter");            MY(originjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "originjitter");            MY(originjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(originjitter)) \
     )) \
     on(originoffset,                                MY(originoffset) \
-    ,{ ASSERT(n == 3 && "originoffset");            MY(originoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "originoffset");            MY(originoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(originoffset)) \
     )) \
     on(relativeoriginoffset,                        MY(relativeoriginoffset) \
-    ,{ ASSERT(n == 3 && "relativeoriginoffset");    MY(relativeoriginoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "relativeoriginoffset");    MY(relativeoriginoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(relativeoriginoffset)) \
     )) \
     on(relativevelocityoffset,                      MY(relativevelocityoffset) \
-    ,{ ASSERT(n == 3 && "relativevelocityoffset");  MY(relativevelocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "relativevelocityoffset");  MY(relativevelocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(relativevelocityoffset)) \
     )) \
     on(rotate,                                      MY(startangle_min) ||               MY(startangle_max) ||               MY(spin_min) ||                 MY(spin_max) \
-    ,{ ASSERT(n == 4 && "rotate");                  MY(startangle_min) = stof(argv(1)); MY(startangle_max) = stof(argv(2)); MY(spin_min) = stof(argv(3));   MY(spin_max) = stof(argv(4)); \
+    ,{ demand(n == 4 && "rotate");                  MY(startangle_min) = stof(argv(1)); MY(startangle_max) = stof(argv(2)); MY(spin_min) = stof(argv(3));   MY(spin_max) = stof(argv(4)); \
     }, sprintf(" %s %s %s %s",                      ftos(MY(startangle_min)),           ftos(MY(startangle_max)),           ftos(MY(spin_min)),             ftos(MY(spin_max)) \
     )) \
     on(sizeincrease,                                MY(sizeincrease) \
-    ,{ ASSERT(n == 1 && "sizeincrease");            MY(sizeincrease) = stof(argv(1)); \
+    ,{ demand(n == 1 && "sizeincrease");            MY(sizeincrease) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(sizeincrease)) \
     )) \
     on(size,                                        MY(size_min) ||                     MY(size_max) \
-    ,{ ASSERT(n == 2 && "size");                    MY(size_min) = stof(argv(1));       MY(size_max) = stof(argv(2)); \
+    ,{ demand(n == 2 && "size");                    MY(size_min) = stof(argv(1));       MY(size_max) = stof(argv(2)); \
     }, sprintf(" %s %s",                            ftos(MY(size_min)),                 ftos(MY(size_max)) \
     )) \
     on(staincolor,                                  MY(staincolor_min) ||                   MY(staincolor_max) \
-    ,{ ASSERT(n == 2 && "staincolor");              MY(staincolor_min) = strzone(argv(1));  MY(staincolor_max) = strzone(argv(2)); \
+    ,{ demand(n == 2 && "staincolor");              MY(staincolor_min) = strzone(argv(1));  MY(staincolor_max) = strzone(argv(2)); \
     }, sprintf(" %s %s",                            (MY(staincolor_min)),                   (MY(staincolor_max)) \
     )) \
     on(stainsize,                                   MY(stainsize_min) ||                MY(stainsize_max) \
-    ,{ ASSERT(n == 2 && "stainsize");               MY(stainsize_min) = stof(argv(1));  MY(stainsize_max) = stof(argv(2)); \
+    ,{ demand(n == 2 && "stainsize");               MY(stainsize_min) = stof(argv(1));  MY(stainsize_max) = stof(argv(2)); \
     }, sprintf(" %s %s",                            ftos(MY(stainsize_min)),            ftos(MY(stainsize_max)) \
     )) \
     on(staintex,                                    MY(staintex_min) ||                 MY(staintex_max) \
-    ,{ ASSERT(n == 2 && "staintex");                MY(staintex_min) = stof(argv(1));   MY(staintex_max) = stof(argv(2)); \
+    ,{ demand(n == 2 && "staintex");                MY(staintex_min) = stof(argv(1));   MY(staintex_max) = stof(argv(2)); \
     }, sprintf(" %s %s",                            ftos(MY(staintex_min)),             ftos(MY(staintex_max)) \
     )) \
     on(stretchfactor,                               MY(stretchfactor) \
-    ,{ ASSERT(n == 1 && "stretchfactor");           MY(stretchfactor) = stof(argv(1)); \
+    ,{ demand(n == 1 && "stretchfactor");           MY(stretchfactor) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(stretchfactor)) \
     )) \
     on(tex,                                         MY(tex_min) ||                      MY(tex_max) \
-    ,{ ASSERT(n == 2 && "tex");                     MY(tex_min) = stof(argv(1));        MY(tex_max) = stof(argv(2)); \
+    ,{ demand(n == 2 && "tex");                     MY(tex_min) = stof(argv(1));        MY(tex_max) = stof(argv(2)); \
     }, sprintf(" %s %s",                            ftos(MY(tex_min)),                  ftos(MY(tex_max)) \
     )) \
     on(time,                                        MY(time_min) ||                     MY(time_max) \
-    ,{ ASSERT(n == 2 && "time");                    MY(time_min) = stof(argv(1));       MY(time_max) = stof(argv(2)); \
+    ,{ demand(n == 2 && "time");                    MY(time_min) = stof(argv(1));       MY(time_max) = stof(argv(2)); \
     }, sprintf(" %s %s",                            ftos(MY(time_min)),                 ftos(MY(time_max)) \
     )) \
     on(trailspacing,                                MY(trailspacing) \
-    ,{ ASSERT(n == 1 && "trailspacing");            MY(trailspacing) = stof(argv(1)); \
+    ,{ demand(n == 1 && "trailspacing");            MY(trailspacing) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(trailspacing)) \
     )) \
     on(underwater,                                  MY(underwater) \
-    ,{ ASSERT(n == 0 && "underwater");              MY(underwater) = true; \
+    ,{ demand(n == 0 && "underwater");              MY(underwater) = true; \
     }, "" \
     ) \
     on(velocityjitter,                              MY(velocityjitter) \
-    ,{ ASSERT(n == 3 && "velocityjitter");          MY(velocityjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "velocityjitter");          MY(velocityjitter) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(velocityjitter)) \
     )) \
     on(velocitymultiplier,                          MY(velocitymultiplier) \
-    ,{ ASSERT(n == 1 && "velocitymultiplier");      MY(velocitymultiplier) = stof(argv(1)); \
+    ,{ demand(n == 1 && "velocitymultiplier");      MY(velocitymultiplier) = stof(argv(1)); \
     }, sprintf(" %s",                               ftos(MY(velocitymultiplier)) \
     )) \
     on(velocityoffset,                              MY(velocityoffset) \
-    ,{ ASSERT(n == 3 && "velocityoffset");          MY(velocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
+    ,{ demand(n == 3 && "velocityoffset");          MY(velocityoffset) = vec3(stof(argv(1)), stof(argv(2)), stof(argv(3))); \
     }, sprintf(" %v",                               (MY(velocityoffset)) \
     )) \
     /**/
@@ -238,11 +238,11 @@ void effectinfo_read()
         n--;
         string k = argv(0);
         if (k == "effect") {
-            ASSERT(n == 1);
+            demand(n == 1);
             info = NEW(EffectInfo, strzone(argv(1)));
             continue;
         }
-        ASSERT(info != NULL);
+        demand(info != NULL);
         switch (k) {
             #define MY(f) info.effectinfo_##f
             #define p(k, isset, parse, unparse) case #k: parse break;
@@ -259,10 +259,10 @@ void effectinfo_read()
 
 void effectinfo_dump(int fh, bool alsoprint)
 {
-    #define WRITE(s) do { \
+    #define WRITE(s) MACRO_BEGIN { \
         fputs(fh, s); \
         if (alsoprint) LOG_INFO(s); \
-    } while (0)
+    } MACRO_END
     WRITE("// ********************************************** //\n");
     WRITE("// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n");
     WRITE("// **                                          ** //\n");
index 3c778b5..19f4750 100644 (file)
@@ -34,9 +34,9 @@ void Violence_GibSplash_At(vector org, vector dir, float type, float amount, ent
        // if this is a copied dead body, send the num of its player instead
        // TODO: remove this field, read from model txt files
        if(self.classname == "body")
-               e.team = num_for_edict(self.enemy);
+               e.team = etof(self.enemy);
        else
-               e.team = num_for_edict(self);
+               e.team = etof(self);
 
        setorigin(e, org);
        e.velocity = dir;
index 6e0e461..83a2440 100644 (file)
@@ -1,6 +1,6 @@
 #include "globalsound.qh"
 
-#include "../common/ent_cs.qh"
+#include "../../ent_cs.qh"
 
 #ifdef IMPLEMENTATION
        #include "../../animdecide.qh"
@@ -71,8 +71,7 @@
                        string sample = GlobalSound_sample(gs.m_globalsoundstr, r);
                        int who = ReadByte();
                        entity e = entcs_receiver(who - 1);
-                       int chan = ReadByte();
-                       chan = (chan & BIT(7) ? -1 : 1) * (chan & BITS(7));
+                       int chan = ReadSByte();
                        float vol = ReadByte() / 255;
                        float atten = ReadByte() / 64;
                        vector o;
                        UpdatePlayerSounds(e);
                        string s = e.(ps.m_playersoundfld);
                        string sample = GlobalSound_sample(s, r);
-                       int chan = ReadByte();
-                       chan = (chan & BIT(7) ? -1 : 1) * (chan & BITS(7));
+                       int chan = ReadSByte();
                        float vol = ReadByte() / 255;
                        float atten = ReadByte() / 64;
                        vector o;
                                case VOICETYPE_TEAMRADIO:
                                {
                                        #define X() \
-                                               do \
+                                               MACRO_BEGIN \
                                                { \
                                                        float atten = (msg_entity.cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; \
                                                        if (gs) globalsound(MSG_ONE, this, gs, r, chan, VOL_BASEVOICE, atten); \
                                                        else if (ps) playersound(MSG_ONE, this, ps, r, chan, VOL_BASEVOICE, atten); \
                                                        else soundto(MSG_ONE, this, chan, sample, VOL_BASEVOICE, atten); \
-                                               } \
-                                               while (0)
+                                               } MACRO_END
 
                                        if (fake) { msg_entity = this; X(); }
                                        else
                                        float tauntrand = 0;
                                        if (voicetype == VOICETYPE_AUTOTAUNT) tauntrand = random();
                                        #define X() \
-                                               do \
+                                               MACRO_BEGIN \
                                                { \
                                                        if (voicetype != VOICETYPE_AUTOTAUNT || tauntrand < msg_entity.cvar_cl_autotaunt) \
                                                        { \
                                                                else if (ps) playersound(MSG_ONE, this, ps, r, chan, VOL_BASEVOICE, atten); \
                                                                else soundto(MSG_ONE, this, chan, sample, VOL_BASEVOICE, atten); \
                                                        } \
-                                               } \
-                                               while (0)
+                                               } MACRO_END
                                        if (fake)
                                        {
                                                msg_entity = this;
index 892d3d0..1708f91 100644 (file)
@@ -124,9 +124,9 @@ void PrecachePlayerSounds(string f);
        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 PlayerSound(this, def, chan, voicetype) _GlobalSound(this, NULL, def, string_null, chan, voicetype, false)
        #define VoiceMessage(this, def, msg) \
-               do \
+               MACRO_BEGIN \
                { \
                        entity VM = def; \
                        int voicetype = VM.m_playersoundvt; \
@@ -137,8 +137,7 @@ void PrecachePlayerSounds(string f);
                        else if (flood > 0) fake = false; \
                        else break; \
                        _GlobalSound(this, NULL, VM, string_null, CH_VOICE, voicetype, fake); \
-               } \
-               while (0)
+               } MACRO_END
 
 #endif
 
index 8122ccd..389aadc 100644 (file)
@@ -83,6 +83,16 @@ REGISTER_NET_TEMP(CLIENT_ENTCS)
        }
 
        /**
+        * Same as `entcs_GetTeam`, but returns -1 for no team in teamplay
+        */
+       int entcs_GetScoreTeam(int i)
+       {
+               int t = entcs_GetTeam(i);
+               if (teamplay && !t) t = -1;
+               return t;
+       }
+
+       /**
        * @param i zero indexed player
        */
        string entcs_GetName(int i)
index cc418df..97bfe91 100644 (file)
@@ -180,13 +180,13 @@ void GiveBall(entity plyr, entity ball)
        }
 
        plyr.(weaponentity).weapons = plyr.weapons;
-       plyr.(weaponentity).switchweapon = plyr.weapon;
+       plyr.(weaponentity).m_switchweapon = PS(plyr).m_weapon;
        plyr.weapons = WEPSET(NEXBALL);
        setself(plyr);
        Weapon w = WEP_NEXBALL;
        w.wr_resetplayer(w);
-       plyr.switchweapon = WEP_NEXBALL.m_id;
-       W_SwitchWeapon(WEP_NEXBALL.m_id);
+       PS(plyr).m_switchweapon = WEP_NEXBALL;
+       W_SwitchWeapon(WEP_NEXBALL);
        setself(this);
 }
 
@@ -971,8 +971,8 @@ MUTATOR_HOOKFUNCTION(nb, PlayerPreThink)
                                self.weapons = self.(weaponentity).weapons;
                                Weapon w = WEP_NEXBALL;
                                w.wr_resetplayer(w);
-                               self.switchweapon = self.(weaponentity).switchweapon;
-                               W_SwitchWeapon(self.switchweapon);
+                               PS(self).m_switchweapon = self.(weaponentity).m_switchweapon;
+                               W_SwitchWeapon(PS(self).m_switchweapon);
 
                                self.(weaponentity).weapons = '0 0 0';
                        }
@@ -1021,12 +1021,12 @@ MUTATOR_HOOKFUNCTION(nb, PlayerPhysics)
 
 MUTATOR_HOOKFUNCTION(nb, ForbidThrowCurrentWeapon)
 {SELFPARAM();
-       return self.weapon == WEP_NEXBALL.m_id;
+       return PS(self).m_weapon == WEP_NEXBALL;
 }
 
 MUTATOR_HOOKFUNCTION(nb, ForbidDropCurrentWeapon)
 {SELFPARAM();
-       return self.weapon == WEP_MORTAR.m_id; // TODO: what is this for?
+       return PS(self).m_weapon == WEP_MORTAR; // TODO: what is this for?
 }
 
 MUTATOR_HOOKFUNCTION(nb, FilterItem)
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..7f277b6
--- /dev/null
@@ -0,0 +1,222 @@
+#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_ID(alias, id) LEGACY_IMPULSE(alias, id, sprintf("impulse %d", IMP_##alias.impulse))
+
+#define LEGACY_IMPULSE(alias, id, new) \
+       STATIC_INIT(legacy_##alias) { \
+               string s = new; \
+               if (s == #alias) LOG_FATALF("LEGACY_IMPULSE: would define a recursive alias for '%s', use LEGACY_IMPULSE_ID instead", s); \
+               IMPULSE_ALIAS(alias, s); \
+       } \
+       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_ID(use, 21)
+
+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 5ca1c38..b4cd541 100644 (file)
     #include "mapinfo.qh"
 #endif
 
+bool autocvar_developer_mapper;
+
+#define LOG_MAPWARN(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNING(__VA_ARGS__); } MACRO_END
+#define LOG_MAPWARNF(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNINGF(__VA_ARGS__); } MACRO_END
+
 // generic string stuff
 
 int _MapInfo_Cache_Active;
@@ -390,7 +395,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        if(inWorldspawn)
        {
-               LOG_INFO(fn, " ended still in worldspawn, BUG\n");
+               LOG_MAPWARN(fn, " ended still in worldspawn, BUG\n");
                return 0;
        }
        diameter = vlen(mapMaxs - mapMins);
@@ -628,7 +633,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
                if (sa == "") continue;
                int p = strstrofs(sa, "=", 0);
                if (p < 0) {
-                       LOG_WARNINGF("Invalid gametype setting in mapinfo for gametype %s: %s\n", MapInfo_Type_ToString(pWantedType), sa);
+                       LOG_MAPWARNF("Invalid gametype setting in mapinfo for gametype %s: %s\n", MapInfo_Type_ToString(pWantedType), sa);
                        continue;
                }
                string k = substring(sa, 0, p);
@@ -668,7 +673,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
                }
                FOREACH(Gametypes, true, LAMBDA(handled |= it.m_parse_mapinfo(k, v)));
                if (!handled)
-            LOG_WARNINGF("Invalid gametype setting in mapinfo for gametype %s: %s\n", MapInfo_Type_ToString(pWantedType), sa);
+            LOG_MAPWARNF("Invalid gametype setting in mapinfo for gametype %s: %s\n", MapInfo_Type_ToString(pWantedType), sa);
        }
 
        if (pWantedType == MAPINFO_TYPE_RACE && cvar("g_race_teams") >= 2)
@@ -691,13 +696,13 @@ Gametype MapInfo_Type(int t)
 
 int MapInfo_Type_FromString(string t)
 {
-#define deprecate(from, to) do { \
+#define deprecate(from, to) MACRO_BEGIN { \
        if (t == #from) { \
                string replacement = #to; \
-               LOG_WARNINGF("MapInfo_Type_FromString (probably %s): using deprecated name '%s'. Should use '%s'.\n", MapInfo_Map_bspname, t, replacement); \
+               LOG_MAPWARNF("MapInfo_Type_FromString (probably %s): using deprecated name '%s'. Should use '%s'.\n", MapInfo_Map_bspname, t, replacement); \
                t = replacement; \
        } \
-} while (0)
+} MACRO_END
        deprecate(nexball, nb);
        deprecate(freezetag, ft);
        deprecate(keepaway, ka);
@@ -770,7 +775,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                {
                        fh = fopen(s, FILE_READ);
                        if(fh < 0)
-                               LOG_INFO("Map ", pFilename, " references not existing config file ", s, "\n");
+                               LOG_MAPWARN("Map ", pFilename, " references not existing config file ", s, "\n");
                        else
                        {
                                for (;;)
@@ -799,18 +804,18 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                        }
                }
                else
-                       LOG_INFO("Map ", pFilename, " uses too many levels of inclusion\n");
+                       LOG_MAPWARN("Map ", pFilename, " uses too many levels of inclusion\n");
        }
        else if(t == "")
-               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_MAPWARN("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if (!cvar_value_issafe(t))
-               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_MAPWARN("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if (!cvar_value_issafe(s))
-               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_MAPWARN("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(MAPINFO_SETTEMP_ACL_SYSTEM, t) <= 0)
-               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_MAPWARN("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(acl, t) <= 0)
-               LOG_INFO("Map ", pFilename, " contains a denied setting, ignored\n");
+               LOG_MAPWARN("Map ", pFilename, " contains a denied setting, ignored\n");
        else
        {
                if(type == 0) // server set
@@ -870,7 +875,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
 
        if(strstrofs(pFilename, "/", 0) >= 0)
        {
-               LOG_INFO("Invalid character in map name, ignored\n");
+               LOG_MAPWARN("Invalid character in map name, ignored\n");
                return 0;
        }
 
@@ -960,7 +965,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                                error("... but I just wrote it!");
                }
 
-               LOG_INFO("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
+               LOG_MAPWARN("autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
        }
 
        _MapInfo_Map_Reset();
@@ -999,7 +1004,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        else if(t == "monsters") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_MONSTERS;
                        else if(t == "new_toys") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_WEAPONS;
                        else
-                               LOG_TRACE("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
+                               LOG_MAPWARN("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
                }
                else if(t == "hidden")
                {
@@ -1026,11 +1031,11 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                {
                        t = car(s); s = cdr(s);
                        f = MapInfo_Type_FromString(t);
-                       LOG_WARNING("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
+                       LOG_MAPWARN("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
                        if(f)
                                _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, true);
                        else
-                               LOG_TRACE("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+                               LOG_MAPWARN("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
                else if(t == "gametype")
                {
@@ -1039,7 +1044,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        if(f)
                                _MapInfo_Map_ApplyGametypeEx (s, pGametypeToSet, f);
                        else
-                               LOG_TRACE("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+                               LOG_MAPWARN("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
                else if(t == "size")
                {
@@ -1050,16 +1055,16 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        t = car(s); s = cdr(s); d = stof(t);
                        t = car(s); s = cdr(s); e = stof(t);
                        if(s == "")
-                               LOG_INFO("Map ", pFilename, " contains an incorrect size line (not enough params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+                               LOG_MAPWARN("Map ", pFilename, " contains an incorrect size line (not enough params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
                        else
                        {
                                t = car(s); s = cdr(s); f = stof(t);
                                if(s != "")
-                                       LOG_INFO("Map ", pFilename, " contains an incorrect size line (too many params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+                                       LOG_MAPWARN("Map ", pFilename, " contains an incorrect size line (too many params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
                                else
                                {
                                        if(a >= d || b >= e || c >= f)
-                                               LOG_INFO("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
+                                               LOG_MAPWARN("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
                                        else
                                        {
                                                MapInfo_Map_mins.x = a;
@@ -1084,7 +1089,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                        else
                        {
-                               LOG_TRACE("Map ", pFilename, " has a setting for unknown game type ", t, ", ignored\n");
+                               LOG_MAPWARN("Map ", pFilename, " has a setting for unknown game type ", t, ", ignored\n");
                        }
                }
                else if(t == "clientsettemp_for_type")
@@ -1099,13 +1104,13 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                        else
                        {
-                               LOG_TRACE("Map ", pFilename, " has a client setting for unknown game type ", t, ", ignored\n");
+                               LOG_MAPWARN("Map ", pFilename, " has a client setting for unknown game type ", t, ", ignored\n");
                        }
                }
                else if(t == "fog")
                {
                        if (!cvar_value_issafe(s))
-                               LOG_INFO("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
+                               LOG_MAPWARN("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
                        else
                                MapInfo_Map_fog = s;
                }
@@ -1121,7 +1126,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        if(pGametypeToSet)
                        {
                                if (!cvar_value_issafe(t))
-                                       LOG_INFO("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
+                                       LOG_MAPWARN("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
                                else
                                        MapInfo_Map_clientstuff = strcat(
                                                MapInfo_Map_clientstuff, "cd loop \"", t, "\"\n"
@@ -1129,7 +1134,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                }
                else
-                       LOG_TRACE("Map ", pFilename, " provides unknown info item ", t, ", ignored\n");
+                       LOG_MAPWARN("Map ", pFilename, " provides unknown info item ", t, ", ignored\n");
        }
        fclose(fh);
 
@@ -1143,7 +1148,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
        MapInfo_Cache_Store();
        if(MapInfo_Map_supportedGametypes != 0)
                return r;
-       LOG_TRACE("Map ", pFilename, " supports no game types, ignored\n");
+       LOG_MAPWARN("Map ", pFilename, " supports no game types, ignored\n");
        return 0;
 }
 float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, int pGametypeToSet)
@@ -1335,14 +1340,14 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
        {
                if(cvar("g_mapinfo_allow_unsupported_modes_and_let_stuff_break"))
                {
-                       LOG_INFO("EMERGENCY: can't play the selected map in the given game mode. Working with only the override settings.\n");
+                       LOG_SEVERE("can't play the selected map in the given game mode. Working with only the override settings.\n");
                        _MapInfo_Map_ApplyGametypeEx("", t, t);
                        return; // do not call Get_ByName!
                }
 
                if(MapInfo_Map_supportedGametypes == 0)
                {
-                       LOG_INFO("Mapinfo system is not functional at all. Assuming deathmatch.\n");
+                       LOG_SEVERE("Mapinfo system is not functional at all. Assuming deathmatch.\n");
                        MapInfo_Map_supportedGametypes = MAPINFO_TYPE_DEATHMATCH;
                        MapInfo_LoadMapSettings_SaveGameType(MAPINFO_TYPE_DEATHMATCH);
                        _MapInfo_Map_ApplyGametypeEx("", MAPINFO_TYPE_DEATHMATCH, MAPINFO_TYPE_DEATHMATCH);
@@ -1357,7 +1362,7 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
                }
 
                // t is now a supported mode!
-               LOG_INFO("EMERGENCY: can't play the selected map in the given game mode. Falling back to a supported mode.\n");
+               LOG_WARNING("can't play the selected map in the given game mode. Falling back to a supported mode.\n");
                MapInfo_LoadMapSettings_SaveGameType(t);
        }
        MapInfo_Get_ByName(s, 1, t);
index a9f4a4f..ea5596f 100644 (file)
@@ -74,7 +74,7 @@ MINIGAME_SIMPLELINKED_ENTITIES
 
 void minigame_autoclean_entity(entity e)
 {
-       LOG_DEBUG("CL Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+       LOG_DEBUG("CL Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")\n");
        remove(e);
 }
 
@@ -235,7 +235,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew)
 
        if ( sf & MINIG_SF_CREATE )
        {
-               LOG_DEBUG("CL Reading entity: ",ftos(num_for_edict(self)),
+               LOG_DEBUG("CL Reading entity: ",ftos(etof(self)),
                        " classname:",self.classname," enttype:",ftos(self.enttype) );
                LOG_DEBUG(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
        }
index f69fc15..ca111e6 100644 (file)
@@ -25,7 +25,7 @@ void minigame_rmplayer(entity minigame_session, entity player)
                }
                minigame_session.minigame_event(minigame_session,"part",player);
                GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":",
-                       ftos(num_for_edict(player)),":",player.netname));
+                       ftos(etof(player)),":",player.netname));
                minigame_session.minigame_players = p.list_next;
                remove ( p );
                player_clear_minigame(player);
@@ -38,7 +38,7 @@ void minigame_rmplayer(entity minigame_session, entity player)
                        {
                                minigame_session.minigame_event(minigame_session,"part",player);
                                GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":",
-                                       ftos(num_for_edict(player)),":",player.netname));
+                                       ftos(etof(player)),":",player.netname));
                                p.list_next = e.list_next;
                                remove(e);
                                player_clear_minigame(player);
@@ -86,7 +86,7 @@ bool minigame_SendEntity(entity this, entity to, int sf)
                if ( sf & MINIG_SF_CREATE )
                {
                        WriteString(MSG_ENTITY,self.owner.netname);
-                       WriteLong(MSG_ENTITY,num_for_edict(self.minigame_players));
+                       WriteLong(MSG_ENTITY,etof(self.minigame_players));
                }
                if ( sf & MINIG_SF_UPDATE )
                        WriteByte(MSG_ENTITY,self.team);
@@ -155,7 +155,7 @@ int minigame_addplayer(entity minigame_session, entity player)
        }
        else { remove(player_pointer); }
        GameLogEcho(strcat(":minigame:join",(mgteam?"":"fail"),":",minigame_session.netname,":",
-               ftos(num_for_edict(player)),":",player.netname));
+               ftos(etof(player)),":",player.netname));
 
        return mgteam;
 }
@@ -169,7 +169,7 @@ entity start_minigame(entity player, string minigame )
        if ( e )
        {
                entity minig = new(minigame);
-               minig.netname = strzone(strcat(e.netname,"_",ftos(num_for_edict(minig))));
+               minig.netname = strzone(strcat(e.netname,"_",ftos(etof(minig))));
                minig.descriptor = e;
                minig.minigame_event = e.minigame_event;
                minig.minigame_event(minig,"start");
@@ -235,7 +235,7 @@ void end_minigame(entity minigame_session)
        while( (e = findentity(e, owner, minigame_session)) )
                if ( e.minigame_autoclean )
                {
-                       LOG_TRACE("SV Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+                       LOG_TRACE("SV Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")\n");
                        remove(e);
                }
 
@@ -274,7 +274,7 @@ string invite_minigame(entity inviter, entity player)
                inviter.active_minigame.netname, inviter.netname );
 
        GameLogEcho(strcat(":minigame:invite:",inviter.active_minigame.netname,":",
-               ftos(num_for_edict(player)),":",player.netname));
+               ftos(etof(player)),":",player.netname));
 
        return "";
 }
@@ -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 f6b52da..e03e9fa 100644 (file)
@@ -441,12 +441,12 @@ 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_DEBUG("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
-               num_for_edict(this), this.classname, vtos(this.move_origin));
+       LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
+               etof(this), this.classname, vtos(this.move_origin));
        return false;
        : success;
-       LOG_DEBUG("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
-               num_for_edict(this), this.classname, vtos(this.move_origin));
+       LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
+               etof(this), this.classname, vtos(this.move_origin));
        _Movetype_LinkEdict(this, true);
        return true;
 }
index 54b7b66..6e06e55 100644 (file)
@@ -300,7 +300,7 @@ STATIC_INIT_LATE(Mutators) {
     bool mut##_##cb() { return = false; } \
     [[accumulate]] bool mut##_##cb()
 
-#define MUTATOR_HOOK(cb, func, order) do {                              \
+#define MUTATOR_HOOK(cb, func, order) MACRO_BEGIN {                     \
     MUTATOR_ONADD {                                                     \
         if (!CallbackChain_Add(HOOK_##cb, CALLBACK_##func, order)) {    \
             LOG_INFO("HOOK FAILED: ", #cb, ":", #func, "\n");           \
@@ -310,7 +310,7 @@ STATIC_INIT_LATE(Mutators) {
     MUTATOR_ONROLLBACK_OR_REMOVE {                                      \
         CallbackChain_Remove(HOOK_##cb, CALLBACK_##func);               \
     }                                                                   \
-} while (0)
+} MACRO_END
 
 #include "events.qh"
 
index 1c9e3a2..37a0573 100644 (file)
@@ -880,7 +880,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
 
        if(self.buffs & BUFF_AMMO.m_itemid)
        if(self.clip_size)
-               self.clip_load = self.(weapon_load[self.switchweapon]) = self.clip_size;
+               self.clip_load = self.(weapon_load[PS(self).m_switchweapon.m_id]) = self.clip_size;
 
        if((self.buffs & BUFF_INVISIBLE.m_itemid) && (self.oldbuffs & BUFF_INVISIBLE.m_itemid))
        if(self.alpha != autocvar_g_buffs_invisible_alpha)
@@ -902,7 +902,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
 
                        if(self.clip_load)
                                self.buff_ammo_prev_clipload = self.clip_load;
-                       self.clip_load = self.(weapon_load[self.switchweapon]) = self.clip_size;
+                       self.clip_load = self.(weapon_load[PS(self).m_switchweapon.m_id]) = self.clip_size;
                }
 
                BUFF_ONREM(BUFF_AMMO)
index 6d16fd1..d2f350c 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef MENUQC
-#define NADE_PROJECTILE(i, projectile, trail) do { \
+#define NADE_PROJECTILE(i, projectile, trail) MACRO_BEGIN { \
     this.m_projectile[i] = projectile; \
     this.m_trail[i] = trail; \
-} while (0)
+} MACRO_END
 #else
 #define NADE_PROJECTILE(i, projectile, trail)
 #endif
index c1ab977..28aaac5 100644 (file)
@@ -658,6 +658,11 @@ void nade_boom()
 
 void nade_touch()
 {SELFPARAM();
+       if(other)
+               UpdateCSQCProjectile(self);
+
+       if(other == self.realowner)
+               return; // no self impacts
        /*float is_weapclip = 0;
        if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
        if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
index 2a0df8c..20a9d94 100644 (file)
@@ -169,8 +169,7 @@ MUTATOR_HOOKFUNCTION(nt, SetStartItems)
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
                entity e = Weapons_from(i);
-               if(!e.weapon)
-                       continue;
+               if(e == WEP_Null) continue;
 
                n = tokenize_console(nt_GetReplacement(e.netname, autocvar_g_new_toys_autoreplace));
 
index a07ad44..a6d42d5 100644 (file)
@@ -68,8 +68,8 @@ REGISTER_MUTATOR(nix, cvar("g_nix") && !cvar("g_instagib") && !cvar("g_overkill"
                        e.ammo_rockets = start_ammo_rockets;
                        e.ammo_fuel = start_ammo_fuel;
                        e.weapons = start_weapons;
-                       if(!client_hasweapon(e, e.weapon, true, false))
-                               e.switchweapon = w_getbestweapon(self);
+                       if(!client_hasweapon(e, PS(e).m_weapon, true, false))
+                               PS(e).m_switchweapon = w_getbestweapon(self);
                }
        }
 
@@ -79,8 +79,7 @@ REGISTER_MUTATOR(nix, cvar("g_nix") && !cvar("g_instagib") && !cvar("g_overkill"
 bool NIX_CanChooseWeapon(int wpn)
 {
        entity e = Weapons_from(wpn);
-       if(!e.weapon) // skip dummies
-               return false;
+       if (e == WEP_Null) return false; // skip dummies
        if(g_weaponarena)
        {
                if(!(g_weaponarena_weapons & e.m_wepset))
@@ -210,10 +209,13 @@ void NIX_GiveCurrentWeapon()
                self.weapons |= WEPSET(BLASTER);
        self.weapons |= e.m_wepset;
 
-       if(self.switchweapon != nix_weapon)
-               if(!client_hasweapon(self, self.switchweapon, true, false))
-                       if(client_hasweapon(self, nix_weapon, true, false))
-                               W_SwitchWeapon(nix_weapon);
+    Weapon w = Weapons_from(nix_weapon);
+       if(PS(self).m_switchweapon != w)
+               if(!client_hasweapon(self, PS(self).m_switchweapon, true, false))
+               {
+                       if(client_hasweapon(self, w, true, false))
+                               W_SwitchWeapon(w);
+               }
 }
 
 MUTATOR_HOOKFUNCTION(nix, ForbidThrowCurrentWeapon)
index 8341f7c..28b1715 100644 (file)
@@ -14,31 +14,32 @@ CLASS(HeavyMachineGun, Weapon)
 /* wepimg    */ ATTRIB(HeavyMachineGun, model2, string, "weaponhmg");
 /* refname   */ ATTRIB(HeavyMachineGun, netname, string, "hmg");
 /* wepname   */ ATTRIB(HeavyMachineGun, m_name, string, _("Heavy Machine Gun"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, NONE) \
+               P(class, prefix, damage, float, NONE) \
+               P(class, prefix, force, float, NONE) \
+               P(class, prefix, refire, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+               P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, solidpenetration, float, NONE) \
+               P(class, prefix, spread_add, float, NONE) \
+               P(class, prefix, spread_max, float, NONE) \
+               P(class, prefix, spread_min, float, NONE) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, weaponreplace, string, NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+    END()
+    W_PROPS(X, HeavyMachineGun, hmg)
+#undef X
+
 ENDCLASS(HeavyMachineGun)
-REGISTER_WEAPON(HMG, NEW(HeavyMachineGun));
-
-#define HMG_SETTINGS(w_cvar,w_prop) HMG_SETTINGS_LIST(w_cvar, w_prop, HMG, hmg)
-#define HMG_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
-       w_cvar(id, sn, NONE, spread_min) \
-       w_cvar(id, sn, NONE, spread_max) \
-       w_cvar(id, sn, NONE, spread_add) \
-       w_cvar(id, sn, NONE, solidpenetration) \
-       w_cvar(id, sn, NONE, damage) \
-       w_cvar(id, sn, NONE, force) \
-       w_cvar(id, sn, NONE, refire) \
-       w_cvar(id, sn, NONE, ammo) \
-       w_prop(id, sn, float,  reloading_ammo, reload_ammo) \
-       w_prop(id, sn, float,  reloading_time, reload_time) \
-       w_prop(id, sn, float,  switchdelay_raise, switchdelay_raise) \
-       w_prop(id, sn, float,  switchdelay_drop, switchdelay_drop) \
-       w_prop(id, sn, string, weaponreplace, weaponreplace) \
-       w_prop(id, sn, float,  weaponstart, weaponstart) \
-       w_prop(id, sn, float,  weaponstartoverride, weaponstartoverride) \
-       w_prop(id, sn, float,  weaponthrowable, weaponthrowable)
+REGISTER_WEAPON(HMG, hmg, NEW(HeavyMachineGun));
 
-#ifdef SVQC
-HMG_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
-#endif
 #endif
 #ifdef IMPLEMENTATION
 #ifdef SVQC
@@ -118,10 +119,6 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weapone
                                }
                        }
                }
-               METHOD(HeavyMachineGun, wr_init, void(entity thiswep))
-               {
-                       HMG_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-               }
                METHOD(HeavyMachineGun, wr_checkammo1, bool(entity thiswep))
                {
                        float ammo_amount = self.ammo_nails >= WEP_CVAR(hmg, ammo);
@@ -140,10 +137,6 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weapone
 
                        return ammo_amount;
                }
-               METHOD(HeavyMachineGun, wr_config, void(entity thiswep))
-               {
-                       HMG_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-               }
                METHOD(HeavyMachineGun, wr_reload, void(entity thiswep))
                {
                        W_Reload(self, WEP_CVAR(hmg, ammo), SND(RELOAD));
index 05b6ddd..bd1a9ef 100644 (file)
@@ -44,7 +44,7 @@ MUTATOR_HOOKFUNCTION(ok, W_DecreaseAmmo)
        entity actor = MUTATOR_ARGV(0, entity);
        if (actor.ok_use_ammocharge)
        {
-               ok_DecreaseCharge(actor, actor.weapon);
+               ok_DecreaseCharge(actor, PS(actor).m_weapon.m_id);
                return true;
        }
 }
@@ -65,8 +65,7 @@ void ok_DecreaseCharge(entity ent, int wep)
 
        entity wepent = Weapons_from(wep);
 
-       if(wepent.weapon == 0)
-               return; // dummy
+       if (wepent == WEP_Null) return;  // dummy
 
        ent.ammo_charge[wep] -= max(0, cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
 }
@@ -75,8 +74,7 @@ void ok_IncreaseCharge(entity ent, int wep)
 {
        entity wepent = Weapons_from(wep);
 
-       if(wepent.weapon == 0)
-               return; // dummy
+       if (wepent == WEP_Null) return;  // dummy
 
        if(ent.ok_use_ammocharge)
        if(!ent.BUTTON_ATCK) // not while attacking?
@@ -89,8 +87,7 @@ float ok_CheckWeaponCharge(entity ent, int wep)
 
        entity wepent = Weapons_from(wep);
 
-       if(wepent.weapon == 0)
-               return 0; // dummy
+       if(wepent == WEP_Null) return 0;  // dummy
 
        return (ent.ammo_charge[wep] >= cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
 }
@@ -123,29 +120,30 @@ MUTATOR_HOOKFUNCTION(ok, PlayerDamage_SplitHealthArmor)
 }
 
 MUTATOR_HOOKFUNCTION(ok, PlayerDies)
-{SELFPARAM();
+{
+       SELFPARAM();
        entity targ = ((frag_attacker) ? frag_attacker : frag_target);
 
-       if(IS_MONSTER(self))
+       if(IS_MONSTER(this))
        {
                remove(other); // remove default item
-               other = world;
+               other = NULL;
        }
 
-       setself(new(droppedweapon)); // hax
-       self.ok_item = true;
-       self.noalign = true;
-       self.pickup_anyway = true;
-       spawnfunc_item_armor_small(this);
-       self.movetype = MOVETYPE_TOSS;
-       self.gravity = 1;
-       self.reset = SUB_Remove;
-       setorigin(self, frag_target.origin + '0 0 32');
-       self.velocity = '0 0 200' + normalize(targ.origin - self.origin) * 500;
-       SUB_SetFade(self, time + 5, 1);
-       setself(this);
-
-       self.ok_lastwep = self.switchweapon;
+       entity e = new(droppedweapon); // hax
+       e.ok_item = true;
+       e.noalign = true;
+       e.pickup_anyway = true;
+       e.spawnfunc_checked = true;
+       spawnfunc_item_armor_small(e);
+       e.movetype = MOVETYPE_TOSS;
+       e.gravity = 1;
+       e.reset = SUB_Remove;
+       setorigin(e, frag_target.origin + '0 0 32');
+       e.velocity = '0 0 200' + normalize(targ.origin - self.origin) * 500;
+       SUB_SetFade(e, time + 5, 1);
+
+       this.ok_lastwep = PS(this).m_switchweapon.m_id;
 
        return false;
 }
@@ -185,11 +183,11 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
 
        if(self.ok_lastwep)
        {
-               self.switchweapon = self.ok_lastwep;
+               PS(self).m_switchweapon = Weapons_from(self.ok_lastwep);
                self.ok_lastwep = 0;
        }
 
-       ok_IncreaseCharge(self, self.weapon);
+       ok_IncreaseCharge(self, PS(self).m_weapon.m_id);
 
        if(self.BUTTON_ATCK2)
        if(!forbidWeaponUse(self) || self.weapon_blocked) // allow if weapon is blocked
@@ -198,8 +196,8 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
                self.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor();
                makevectors(self.v_angle);
 
-               int oldwep = self.weapon;
-               self.weapon = WEP_BLASTER.m_id;
+               Weapon oldwep = PS(self).m_weapon;
+               PS(self).m_weapon = WEP_BLASTER;
                W_Blaster_Attack(
                        self,
                        WEP_BLASTER.m_id | HITTYPE_SECONDARY,
@@ -213,23 +211,23 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
                        WEP_CVAR_SEC(vaporizer, delay),
                        WEP_CVAR_SEC(vaporizer, lifetime)
                );
-               self.weapon = oldwep;
+               PS(self).m_weapon = oldwep;
        }
 
        self.weapon_blocked = false;
 
-       self.ok_ammo_charge = self.ammo_charge[self.weapon];
+       self.ok_ammo_charge = self.ammo_charge[PS(self).m_weapon.m_id];
 
        if(self.ok_use_ammocharge)
-       if(!ok_CheckWeaponCharge(self, self.weapon))
+       if(!ok_CheckWeaponCharge(self, PS(self).m_weapon.m_id))
        {
-               if(autocvar_g_overkill_ammo_charge_notice && time > self.ok_notice_time && self.BUTTON_ATCK && IS_REAL_CLIENT(self) && self.weapon == self.switchweapon)
+               if(autocvar_g_overkill_ammo_charge_notice && time > self.ok_notice_time && self.BUTTON_ATCK && IS_REAL_CLIENT(self) && PS(self).m_weapon == PS(self).m_switchweapon)
                {
                        //Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_OVERKILL_CHARGE);
                        self.ok_notice_time = time + 2;
                        play2(self, SND(DRYFIRE));
                }
-               Weapon wpn = Weapons_from(self.weapon);
+               Weapon wpn = PS(self).m_weapon;
                .entity weaponentity = weaponentities[0]; // TODO: unhardcode
                if(self.(weaponentity).state != WS_CLEAR)
                        w_ready(wpn, self, weaponentity, (self.BUTTON_ATCK ? 1 : 0) | (self.BUTTON_ATCK2 ? 2 : 0));
@@ -279,6 +277,7 @@ MUTATOR_HOOKFUNCTION(ok, OnEntityPreSpawn)
                        wep.team = self.team;
                        wep.respawntime = autocvar_g_overkill_superguns_respawn_time;
                        wep.pickup_anyway = true;
+                       wep.spawnfunc_checked = true;
                        wep.think = self_spawnfunc_weapon_hmg;
                        wep.nextthink = time + 0.1;
                        return true;
@@ -295,6 +294,7 @@ MUTATOR_HOOKFUNCTION(ok, OnEntityPreSpawn)
                        wep.team = self.team;
                        wep.respawntime = autocvar_g_overkill_superguns_respawn_time;
                        wep.pickup_anyway = true;
+                       wep.spawnfunc_checked = true;
                        wep.think = self_spawnfunc_weapon_rpc;
                        wep.nextthink = time + 0.1;
                        return true;
@@ -320,7 +320,7 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem)
 
 MUTATOR_HOOKFUNCTION(ok, SpectateCopy)
 {SELFPARAM();
-       self.ammo_charge[self.weapon] = other.ammo_charge[other.weapon];
+       self.ammo_charge[PS(self).m_weapon.m_id] = other.ammo_charge[PS(other).m_weapon.m_id];
        self.ok_use_ammocharge = other.ok_use_ammocharge;
 
        return false;
index 94f1bd1..638873d 100644 (file)
@@ -14,36 +14,37 @@ CLASS(RocketPropelledChainsaw, Weapon)
 /* wepimg    */ ATTRIB(RocketPropelledChainsaw, model2, string, "weaponrpc");
 /* refname   */ ATTRIB(RocketPropelledChainsaw, netname, string, "rpc");
 /* wepname   */ ATTRIB(RocketPropelledChainsaw, m_name, string, _("Rocket Propelled Chainsaw"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, NONE) \
+               P(class, prefix, animtime, float, NONE) \
+               P(class, prefix, damage2, float, NONE) \
+               P(class, prefix, damageforcescale, float, NONE) \
+               P(class, prefix, damage, float, NONE) \
+               P(class, prefix, edgedamage, float, NONE) \
+               P(class, prefix, force, float, NONE) \
+               P(class, prefix, health, float, NONE) \
+               P(class, prefix, lifetime, float, NONE) \
+               P(class, prefix, radius, float, NONE) \
+               P(class, prefix, refire, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, speedaccel, float, NONE) \
+               P(class, prefix, speed, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+    END()
+    W_PROPS(X, RocketPropelledChainsaw, rpc)
+#undef X
+
 ENDCLASS(RocketPropelledChainsaw)
-REGISTER_WEAPON(RPC, NEW(RocketPropelledChainsaw));
-
-#define RPC_SETTINGS(w_cvar,w_prop) RPC_SETTINGS_LIST(w_cvar, w_prop, RPC, rpc)
-#define RPC_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
-       w_cvar(id, sn, NONE, ammo) \
-       w_cvar(id, sn, NONE, animtime) \
-       w_cvar(id, sn, NONE, damage) \
-       w_cvar(id, sn, NONE, damage2) \
-       w_cvar(id, sn, NONE, damageforcescale) \
-       w_cvar(id, sn, NONE, edgedamage) \
-       w_cvar(id, sn, NONE, force) \
-       w_cvar(id, sn, NONE, health) \
-       w_cvar(id, sn, NONE, lifetime) \
-       w_cvar(id, sn, NONE, radius) \
-       w_cvar(id, sn, NONE, refire) \
-       w_cvar(id, sn, NONE, speed) \
-       w_cvar(id, sn, NONE, speedaccel) \
-       w_prop(id, sn, float,  reloading_ammo, reload_ammo) \
-       w_prop(id, sn, float,  reloading_time, reload_time) \
-       w_prop(id, sn, float,  switchdelay_raise, switchdelay_raise) \
-       w_prop(id, sn, float,  switchdelay_drop, switchdelay_drop) \
-       w_prop(id, sn, string, weaponreplace, weaponreplace) \
-       w_prop(id, sn, float,  weaponstart, weaponstart) \
-       w_prop(id, sn, float,  weaponstartoverride, weaponstartoverride) \
-       w_prop(id, sn, float,  weaponthrowable, weaponthrowable)
+REGISTER_WEAPON(RPC, rpc, NEW(RocketPropelledChainsaw));
 
-#ifdef SVQC
-RPC_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
-#endif
 #endif
 #ifdef IMPLEMENTATION
 #ifdef SVQC
@@ -174,13 +175,9 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                                }
                        }
                }
-               METHOD(RocketPropelledChainsaw, wr_init, void(entity thiswep))
-               {
-                       RPC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-               }
                METHOD(RocketPropelledChainsaw, wr_checkammo1, bool(entity thiswep))
                {
-                       float ammo_amount = self.WEP_AMMO(RPC) >= WEP_CVAR(rpc, ammo);
+                       float ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(rpc, ammo);
                        ammo_amount += self.(weapon_load[WEP_RPC.m_id]) >= WEP_CVAR(rpc, ammo);
                        return ammo_amount;
                }
@@ -188,10 +185,6 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                {
                        return false;
                }
-               METHOD(RocketPropelledChainsaw, wr_config, void(entity thiswep))
-               {
-                       RPC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-               }
                METHOD(RocketPropelledChainsaw, wr_reload, void(entity thiswep))
                {
                        W_Reload(self, WEP_CVAR(rpc, ammo), SND(RELOAD));
index 99c1321..d5cbb7f 100644 (file)
@@ -5,7 +5,7 @@ MUTATOR_HOOKFUNCTION(pinata, PlayerDies)
 {SELFPARAM();
        for(int j = WEP_FIRST; j <= WEP_LAST; ++j)
        if(self.weapons & WepSet_FromWeapon(Weapons_from(j)))
-       if(self.switchweapon != j)
+       if(PS(self).m_switchweapon.m_id != j)
        if(W_IsWeaponThrowable(j))
                W_ThrowNewWeapon(self, j, false, self.origin + (self.mins + self.maxs) * 0.5, randomvec() * 175 + '0 0 325');
 
index c25997b..06f3107 100644 (file)
@@ -79,7 +79,7 @@ void cl_notice_run()
     drawfill(v1, v2, '0.5 0.5 0.5', 0.5, DRAWFLAG_NORMAL);
 
     vector v3 = v1 + '10 10 0';
-    #define OUT(s, z) do { drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3.y += z + 4; } while (0)
+    #define OUT(s, z) MACRO_BEGIN { drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3.y += z + 4; } MACRO_END
 
     OUT(_("^1Server notices:"), 32);
     LL_EACH(cl_notices, it.alpha > time, LAMBDA(
index 94a46d9..c8664e7 100644 (file)
@@ -239,14 +239,14 @@ void Destroy_All_Notifications()
        entity notif;
        int i;
 
-       #define DESTROY_LOOP(type,count) do { \
+       #define DESTROY_LOOP(type,count) MACRO_BEGIN { \
                for(i = 1; i <= count; ++i) \
                { \
                        notif = Get_Notif_Ent(type, i); \
                        if (!notif) { backtrace("Destroy_All_Notifications(): Missing notification entity!\n"); return; } \
                        Destroy_Notification_Entity(notif); \
                } \
-       } while(0)
+       } MACRO_END
 
        // kill all networked notifications and centerprints
        #ifdef SVQC
@@ -737,7 +737,7 @@ void Create_Notification_Entity(
                                // ======================
                                //  Process Notif String
                                // ======================
-                               #define SET_NOTIF_STRING(string,stringname) do { \
+                               #define SET_NOTIF_STRING(string,stringname) MACRO_BEGIN { \
                                        notif.nent_string = strzone(CCR( \
                                                Process_Notif_Line( \
                                                        typeId, \
@@ -748,7 +748,7 @@ void Create_Notification_Entity(
                                                        stringname \
                                                )) \
                                        ); \
-                               } while(0)
+                               } MACRO_END
 
                                if(GENTLE)
                                {
@@ -2049,7 +2049,7 @@ void Send_Notification(
                //   2. Manually handling each separate call on per-usage basis (See old CTF usage of verbose)
                entity found_choice;
 
-               #define RECURSE_FROM_CHOICE(ent,action) do { \
+               #define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN { \
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) \
                        { \
                                switch(ent.msg_choice_choices[net_name - 1]) \
@@ -2069,7 +2069,7 @@ void Send_Notification(
                                found_choice.nent_floatcount, \
                                s1, s2, s3, s4, \
                                f1, f2, f3, f4); \
-               } while(0)
+               } MACRO_END
 
                switch(broadcast)
                {
index f3cd0ba..6619e7d 100644 (file)
@@ -318,7 +318,7 @@ string BUFF_NAME(int i);
     ARG_CASE(ARG_CS_SV,     "spree_inf",     (autocvar_notification_show_sprees ? notif_arg_spree_inf(1, input, s2, f2) : "")) \
     ARG_CASE(ARG_CS_SV,     "spree_end",     (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
     ARG_CASE(ARG_CS_SV,     "spree_lost",    (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
-    ARG_CASE(ARG_CS_SV,     "item_wepname",  WEP_NAME(f1)) \
+    ARG_CASE(ARG_CS_SV,     "item_wepname",  Weapons_from(f1).m_name) \
     ARG_CASE(ARG_CS_SV,     "item_buffname", BUFF_NAME(f1)) \
     ARG_CASE(ARG_CS_SV,     "f3buffname",    BUFF_NAME(f3)) \
     ARG_CASE(ARG_CS_SV,     "item_wepammo",  (s1 != "" ? sprintf(_(" with %s"), s1) : "")) \
@@ -328,9 +328,9 @@ string BUFF_NAME(int i);
     ARG_CASE(ARG_CS_SV_HA,  "minigame1_name",find(world,netname,s1).descriptor.message) \
     ARG_CASE(ARG_CS_SV_HA,  "minigame1_d",   find(world,netname,s1).descriptor.netname)
 
-#define NOTIF_HIT_MAX(count,funcname) do { \
+#define NOTIF_HIT_MAX(count,funcname) MACRO_BEGIN { \
     if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } \
-} while(0)
+} MACRO_END
 #define NOTIF_HIT_UNKNOWN(token,funcname) { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; }
 
 #define KILL_SPREE_LIST \
@@ -897,29 +897,6 @@ float notif_global_error;
 void RegisterNotifications_First()
 {
     notif_global_error = false;
-
-    #ifdef SVQC
-    #define dedi (server_is_dedicated ? "a dedicated " : "")
-    #else
-    #define dedi ""
-    #endif
-
-    LOG_INFOF("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME);
-    #undef dedi
-
-    // maybe do another implementation of this with checksums? for now, we don't need versioning
-    /*if(autocvar_notification_version != NOTIF_VERSION)
-    {
-        #ifdef CSQC
-        if(autocvar_notification_version_mismatch_client_error)
-        #else
-        if(autocvar_notification_version_mismatch_server_error)
-        #endif
-            notif_global_error = true;
-
-        printf("^1NOTIFICATION VERSION MISMATCH: ^7program = %s, config = %d, code = %d.\n",
-            PROGNAME, autocvar_notification_version, NOTIF_VERSION);
-    }*/
 }
 
 void RegisterNotifications_Done()
@@ -928,11 +905,10 @@ void RegisterNotifications_Done()
     {
         // shit happened... stop the loading of the program now if this is unacceptable
         if(autocvar_notification_errors_are_fatal)
-            error("Notification initialization failed! Read above and fix the errors!\n");
+            LOG_FATAL("Notification initialization failed! Read above and fix the errors!\n");
         else
-            LOG_INFO("Notification initialization failed! Read above and fix the errors!\n");
+            LOG_SEVERE("Notification initialization failed! Read above and fix the errors!\n");
     }
-    else { LOG_INFO("Notification initialization successful!\n"); }
 }
 
 // NOW we actually activate the declarations
index f7551e2..dc1dcac 100644 (file)
@@ -628,7 +628,7 @@ string specialcommand = "xwxwxsxsxaxdxaxdx1x ";
 void SpecialCommand()
 {
 #ifdef SVQC
-       if (!CheatImpulse(99))
+       if (!CheatImpulse(CHIMPULSE_GIVE_ALL.impulse))
                LOG_INFO("A hollow voice says \"Plugh\".\n");
 #endif
 }
@@ -1258,7 +1258,7 @@ void PM_Main(entity this)
 {
        int buttons = PHYS_INPUT_BUTTON_MASK(this);
 #ifdef CSQC
-       this.items = getstati(STAT_ITEMS, 0, 24);
+       this.items = STAT(ITEMS);
 
        this.movement = PHYS_INPUT_MOVEVALUES(this);
 
index 92c5ef0..0ec413c 100644 (file)
@@ -76,7 +76,7 @@ void soundat(entity e, vector o, int chan, string samp, float vol, float _atten)
 void stopsoundto(int _dest, entity e, int chan)
 {
        if (!sound_allowed(_dest, e)) return;
-       int entno = num_for_edict(e);
+       int entno = etof(e);
        if (entno >= 8192 || chan < 0 || chan > 7)
        {
                int idx = precache_sound_index(SND(Null));
index 1e02758..7e9ba26 100644 (file)
@@ -40,13 +40,12 @@ const float VOL_BASEVOICE = 1.0;
 // Otherwise, channels 8 to 15 would be blocked for a weird QW feature.
 #ifdef SVQC
        #define _sound(e, c, s, v, a) \
-               do \
+               MACRO_BEGIN \
                { \
                        entity __e = e; \
-                       if (!sound_allowed(MSG_BROADCAST, __e)) break; \
-                       sound7(__e, c, s, v, a, 0, 0); \
-               } \
-               while (0)
+                       if (sound_allowed(MSG_BROADCAST, __e)) \
+                               sound7(__e, c, s, v, a, 0, 0); \
+               } MACRO_END
 #else
        #define _sound(e, c, s, v, a) sound7(e, c, s, v, a, 0, 0)
 #endif
@@ -65,7 +64,7 @@ const float VOL_BASEVOICE = 1.0;
  * @param sf
  */
 #define sound8(e, o, chan, samp, vol, atten, speed, sf) \
-       do \
+       MACRO_BEGIN \
        { \
                entity __e; \
                int __chan = chan; \
@@ -87,11 +86,12 @@ const float VOL_BASEVOICE = 1.0;
                setorigin(__e, o); \
                setsize(__e, '0 0 0', '0 0 0'); \
                sound7(__e, __chan, __samp, vol, atten, speed, sf); \
-               if (auto) break; \
-               setorigin(__e, old_origin); \
-               setsize(__e, old_mins, old_maxs); \
-       } \
-       while (0)
+               if (!auto) \
+               { \
+                       setorigin(__e, old_origin); \
+                       setsize(__e, old_mins, old_maxs); \
+               } \
+       } MACRO_END
 
 CLASS(Sound, Object)
        ATTRIB(Sound, m_id, int, 0)
diff --git a/qcsrc/common/state.qh b/qcsrc/common/state.qh
new file mode 100644 (file)
index 0000000..1779354
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Purpose: common player state, usable on client and server
+ * Client: singleton representing the viewed player
+ * Server: instance per client, clients decoupled from players
+ */
+CLASS(PlayerState, Object)
+       ATTRIB(PlayerState, m_client, entity, NULL)
+       CONSTRUCTOR(PlayerState, entity client)
+       {
+               CONSTRUCT(PlayerState);
+               this.m_client = client;
+       }
+       ATTRIB(PlayerState, m_switchingweapon, Weapon, Weapons_from(-1))
+       ATTRIB(PlayerState, m_switchweapon, Weapon, Weapons_from(-1))
+       ATTRIB(PlayerState, m_weapon, Weapon, Weapons_from(-1))
+       METHOD(PlayerState, ps_push, void(PlayerState this, entity cl))
+       {
+               STAT(ACTIVEWEAPON, cl) = this.m_weapon.m_id;
+               STAT(SWITCHINGWEAPON, cl) = this.m_switchingweapon.m_id;
+               STAT(SWITCHWEAPON, cl) = this.m_switchweapon.m_id;
+       }
+ENDCLASS(PlayerState)
+
+.PlayerState _ps;
+#if NDEBUG
+       #define PS(this) (this._ps)
+#else
+       PlayerState PS(entity this) { assert(IS_CLIENT(this)); return this._ps; }
+#endif
+
+void PlayerState_attach(entity this)
+{
+       // TODO: dynamic
+       // this._ps = NEW(PlayerState, this);
+}
+
+void PlayerState_detach(entity this)
+{
+       // TODO: dynamic
+       // if (!PS(this)) return;  // initial connect
+       // remove(PS(this));
+       // this._ps = NULL;
+}
+
+/**
+ * Purpose: common client state, usable on client and server
+ * Client: singleton representing the viewed player
+ * Server: instance per client
+ */
+CLASS(ClientState, Object)
+       ATTRIB(ClientState, m_client, entity, NULL)
+       CONSTRUCTOR(ClientState, entity client)
+       {
+               CONSTRUCT(ClientState);
+               this.m_client = client;
+       }
+ENDCLASS(ClientState)
+
+.ClientState _cs;
+
+#if NDEBUG
+       #define CS(this) (this._cs)
+#else
+       ClientState CS(entity this) { assert(IS_CLIENT(this)); assert(this._cs); return this._cs; }
+#endif
+
+void ClientState_attach(entity this)
+{
+       this._cs = NEW(ClientState, this);
+       this._ps = NEW(PlayerState, this);  // TODO: dynamic
+}
+
+void ClientState_detach(entity this)
+{
+       remove(CS(this));
+       this._cs = NULL;
+       this._ps = NULL;  // TODO: dynamic
+}
index d523293..e8320bd 100644 (file)
@@ -9,16 +9,37 @@
 // 255 is the current limit (MAX_CL_STATS - 1), engine will need to be modified if you wish to add more stats
 
 const int MAX_CL_STATS = 256;
-#ifndef CSQC
-const int STAT_HEALTH = 0; // .health
-const int STAT_ARMOR = 4; // .armorvalue
-const int STAT_SHELLS = 6; // .ammo_shells
-const int STAT_NAILS = 7; // .ammo_nails
-const int STAT_ROCKETS = 8; // .ammo_rockets
-const int STAT_CELLS = 9; // .ammo_cells
-const int STAT_ACTIVEWEAPON = 10; // .weapon
-const int STAT_ITEMS = 15; // .items | .items2 << 23 | serverflags << 28
-const int STAT_VIEWHEIGHT = 16; // .view_ofs_z
+
+// const int STAT_HEALTH = 0;
+// const int STAT_ARMOR = 4;
+// const int STAT_SHELLS = 6;
+// const int STAT_NAILS = 7;
+// const int STAT_ROCKETS = 8;
+// const int STAT_CELLS = 9;
+// const int STAT_ACTIVEWEAPON = 10;
+// const int STAT_ITEMS = 15; // .items | .items2 << 23 | serverflags << 28
+// const int STAT_VIEWHEIGHT = 16;
+
+#if defined(CSQC)
+    #define g_stat_HEALTH getstati(STAT_HEALTH)
+    #define g_stat_ARMOR getstat_int(STAT_ARMOR)
+    #define g_stat_SHELLS getstat_int(STAT_SHELLS)
+    #define g_stat_NAILS getstat_int(STAT_NAILS)
+    #define g_stat_ROCKETS getstat_int(STAT_ROCKETS)
+    #define g_stat_CELLS getstat_int(STAT_CELLS)
+    #define g_stat_ACTIVEWEAPON getstat_int(STAT_ACTIVEWEAPON)
+    #define g_stat_ITEMS getstat_int(STAT_ITEMS)
+    #define g_stat_VIEWHEIGHT getstati(STAT_VIEWHEIGHT)
+#elif defined(SVQC)
+    #define stat_HEALTH health
+    #define stat_ARMOR armorvalue
+    #define stat_SHELLS ammo_shells
+    #define stat_NAILS ammo_nails
+    #define stat_ROCKETS ammo_rockets
+    #define stat_CELLS ammo_cells
+    #define stat_ACTIVEWEAPON weapon
+    #define stat_ITEMS items
+    #define stat_VIEWHEIGHT view_ofs_z
 #endif
 
 REGISTER_STAT(WEAPONS, vectori)
index 074835d..9fc5bdb 100644 (file)
@@ -160,8 +160,8 @@ float Team_TeamToNumber(float teamid)
 #define TCR(input,teamcolor,teamtext) strreplace("^TC", teamcolor, strreplace("^TT", teamtext, input))
 
 // safe team comparisons
-#define SAME_TEAM(a,b) (teamplay ? ((a.team == b.team) ? 1 : 0) : ((a == b) ? 1 : 0))
-#define DIFF_TEAM(a,b) (teamplay ? ((a.team != b.team) ? 1 : 0) : ((a != b) ? 1 : 0))
+#define SAME_TEAM(a,b) (teamplay ? (a.team == b.team) : (a == b))
+#define DIFF_TEAM(a,b) (teamplay ? (a.team != b.team) : (a != b))
 
 // used for notification system multi-team identifiers
 #define APP_TEAM_NUM_2(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : prefix##BLUE)
index 7f97668..1d8864f 100644 (file)
@@ -23,7 +23,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_MUSIC)
 void target_music_sendto(float to, float is)
 {SELFPARAM();
        WriteHeader(to, TE_CSQC_TARGET_MUSIC);
-       WriteShort(to, num_for_edict(self));
+       WriteShort(to, etof(self));
        WriteByte(to, self.volume * 255.0 * is);
        WriteByte(to, self.fade_time * 16.0);
        WriteByte(to, self.fade_rate * 16.0);
index b958371..59737cb 100644 (file)
@@ -157,7 +157,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                if(valuefield == "")
                                {
                                        if(value == "")
-                                               value = ftos(num_for_edict(valueent));
+                                               value = ftos(etof(valueent));
                                }
                                else
                                {
index b322741..c81b1a5 100644 (file)
@@ -1431,14 +1431,13 @@ vector animfixfps(entity e, vector a, vector b)
        // multi-frame anim: keep as-is
        if(a.y == 1)
        {
-               float dur;
-               dur = frameduration(e.modelindex, a.x);
-               if(dur <= 0 && b.y)
+               float dur = frameduration(e.modelindex, a.x);
+               if (dur <= 0 && b.y)
                {
                        a = b;
                        dur = frameduration(e.modelindex, a.x);
                }
-               if(dur > 0)
+               if (dur > 0)
                        a.z = 1.0 / dur;
        }
        return a;
index 0068a51..97a6b46 100644 (file)
@@ -877,7 +877,7 @@ void vehicles_exit(bool eject)
                _player.view_ofs                = PL_VIEW_OFS;
                _player.event_damage    = PlayerDamage;
                _player.hud                             = HUD_NORMAL;
-               _player.switchweapon    = _vehicle.switchweapon;
+               PS(_player).m_switchweapon = _vehicle.m_switchweapon;
                _player.last_vehiclecheck = time + 3;
                _player.vehicle_enter_delay = time + 2;
 
@@ -951,17 +951,21 @@ void vehicles_touch()
        vehicles_enter(other, self);
 }
 
-bool vehicle_impulse(int imp)
-{SELFPARAM();
-       switch(imp)
+bool vehicle_impulse(entity this, int imp)
+{
+       entity v = this.vehicle;
+       if (!v) return false;
+       if (v.deadflag != DEAD_NO) return false;
+       bool(int) f = v.vehicles_impulse;
+       if (f && f(imp)) return true;
+       switch (imp)
        {
-               case 17:
+               case IMP_weapon_drop.impulse:
                {
                        stuffcmd(self, "\ntoggle cl_eventchase_vehicle\nset _vehicles_shownchasemessage 1\n");
                        return true;
                }
        }
-
        return false;
 }
 
@@ -1059,7 +1063,7 @@ void vehicles_enter(entity pl, entity veh)
        veh.colormap            = pl.colormap;
        if(veh.tur_head)
                veh.tur_head.colormap = pl.colormap;
-       veh.switchweapon = pl.switchweapon;
+       veh.m_switchweapon = PS(pl).m_switchweapon;
        pl.hud = veh.vehicleid;
        pl.PlayerPhysplug = veh.PlayerPhysplug;
 
index 423c8ec..496ef9c 100644 (file)
@@ -101,7 +101,7 @@ float vehicles_exit_running;
 
 void vehicles_exit(float eject);
 float vehicle_initialize(entity vehicle, float nodrop);
-bool vehicle_impulse(int imp);
+bool vehicle_impulse(entity this, int imp);
 bool vehicles_crushable(entity e);
 
 #endif
index 244b4e2..f279e9e 100644 (file)
@@ -261,7 +261,7 @@ void bumblebee_gunner_exit(int _exitflag)
        player.event_damage   = PlayerDamage;
        player.hud            = HUD_NORMAL;
        player.teleportable       = TELEPORT_NORMAL;
-       player.switchweapon   = gunner.switchweapon;
+       PS(player).m_switchweapon = gunner.m_switchweapon;
        player.vehicle_enter_delay = time + 2;
 
        fixedmakevectors(vehic.angles);
@@ -330,7 +330,7 @@ bool bumblebee_gunner_enter()
 
        RemoveGrapplingHook(player);
 
-       gunner.switchweapon = player.switchweapon;
+       gunner.m_switchweapon = PS(player).m_switchweapon;
        gunner.vehicle_exit = bumblebee_gunner_exit;
        gunner.vehicle_hudmodel.viewmodelforclient = player;
 
index 8ff6045..11ee8eb 100644 (file)
@@ -37,7 +37,7 @@ bool bumble_raygun_send(entity this, entity to, float sf)
     WriteByte(MSG_ENTITY, sf);
     if(sf & BRG_SETUP)
     {
-        WriteByte(MSG_ENTITY, num_for_edict(self.realowner));
+        WriteByte(MSG_ENTITY, etof(self.realowner));
         WriteByte(MSG_ENTITY, self.realowner.team);
         WriteByte(MSG_ENTITY, self.cnt);
     }
index 38e343f..22c3f1e 100644 (file)
@@ -532,17 +532,17 @@ void racer_draw()
        self.lastpushtime = time;
        if(!pushdeltatime) return;
 
-       tracebox(self.move_origin, self.mins, self.maxs, self.move_origin - ('0 0 1' * getstatf(STAT_VEH_RACER_SPRINGLENGTH)), MOVE_NOMONSTERS, self);
+       tracebox(self.move_origin, self.mins, self.maxs, self.move_origin - ('0 0 1' * STAT(VEH_RACER_SPRINGLENGTH)), MOVE_NOMONSTERS, self);
 
-       vector df = self.move_velocity * -getstatf(STAT_VEH_RACER_FRICTION);
-       df_z += (1 - trace_fraction) * getstatf(STAT_VEH_RACER_HOVERPOWER) + sin(time * 2) * (getstatf(STAT_VEH_RACER_SPRINGLENGTH) * 2);
+       vector df = self.move_velocity * -STAT(VEH_RACER_FRICTION);
+       df_z += (1 - trace_fraction) * STAT(VEH_RACER_HOVERPOWER) + sin(time * 2) * (STAT(VEH_RACER_SPRINGLENGTH) * 2);
 
-       float forced = getstatf(STAT_VEH_RACER_UPFORCEDAMPER);
+       float forced = STAT(VEH_RACER_UPFORCEDAMPER);
 
        int cont = pointcontents(self.move_origin - '0 0 64');
        if(cont == CONTENT_WATER || cont == CONTENT_LAVA || cont == CONTENT_SLIME)
        {
-               forced = getstatf(STAT_VEH_RACER_WATER_UPFORCEDAMPER);
+               forced = STAT(VEH_RACER_WATER_UPFORCEDAMPER);
                self.move_velocity_z += 200;
        }
 
@@ -550,8 +550,8 @@ void racer_draw()
        if(self.move_velocity_z > 0)
                self.move_velocity_z *= 1 - forced * pushdeltatime;
 
-       self.move_angles_x *= 1 - (getstatf(STAT_VEH_RACER_ANGLESTABILIZER) * pushdeltatime);
-       self.move_angles_z *= 1 - (getstatf(STAT_VEH_RACER_ANGLESTABILIZER) * pushdeltatime);
+       self.move_angles_x *= 1 - (STAT(VEH_RACER_ANGLESTABILIZER) * pushdeltatime);
+       self.move_angles_z *= 1 - (STAT(VEH_RACER_ANGLESTABILIZER) * pushdeltatime);
 
        Movetype_Physics_MatchServer(false);
 }
index a373932..7ebac81 100644 (file)
@@ -569,28 +569,28 @@ float raptor_impulse(float _imp)
 {SELFPARAM();
        switch(_imp)
        {
-               case 1:
+               case IMP_weapon_group_1.impulse:
                        self.vehicle.vehicle_weapon2mode = RSM_BOMB;
                        CSQCVehicleSetup(self, 0);
                        return true;
-               case 2:
+               case IMP_weapon_group_2.impulse:
                        self.vehicle.vehicle_weapon2mode = RSM_FLARE;
                        CSQCVehicleSetup(self, 0);
                        return true;
 
-               case 10:
-               case 15:
-               case 18:
+               case IMP_weapon_next_byid.impulse:
+               case IMP_weapon_next_bypriority.impulse:
+               case IMP_weapon_next_bygroup.impulse:
                        self.vehicle.vehicle_weapon2mode += 1;
                        if(self.vehicle.vehicle_weapon2mode > RSM_LAST)
                                self.vehicle.vehicle_weapon2mode = RSM_FIRST;
 
                        CSQCVehicleSetup(self, 0);
                        return true;
-               case 11:
-               case 12:
-               case 16:
-               case 19:
+               case IMP_weapon_last.impulse:
+               case IMP_weapon_prev_byid.impulse:
+               case IMP_weapon_prev_bypriority.impulse:
+               case IMP_weapon_prev_bygroup.impulse:
                        self.vehicle.vehicle_weapon2mode -= 1;
                        if(self.vehicle.vehicle_weapon2mode < RSM_FIRST)
                                self.vehicle.vehicle_weapon2mode = RSM_LAST;
@@ -599,9 +599,9 @@ float raptor_impulse(float _imp)
                        return true;
 
                /*
-               case 17: // toss gun, could be used to exit?
+               case IMP_weapon_drop.impulse: // toss gun, could be used to exit?
                        break;
-               case 20: // Manual minigun reload?
+               case IMP_weapon_reload.impulse: // Manual minigun reload?
                        break;
                */
        }
index 8cb2487..d817c2e 100644 (file)
@@ -88,7 +88,7 @@ float spiderbot_frame()
 
        player.BUTTON_ZOOM        = 0;
        player.BUTTON_CROUCH    = 0;
-       player.switchweapon      = 0;
+       PS(player).m_switchweapon = WEP_Null;
        player.vehicle_weapon2mode = spider.vehicle_weapon2mode;
 
 
@@ -497,22 +497,22 @@ bool spiderbot_impulse(int _imp)
 {SELFPARAM();
        switch(_imp)
        {
-               case 1:
+               case IMP_weapon_group_1.impulse:
                        self.vehicle.vehicle_weapon2mode = SBRM_VOLLY;
                        CSQCVehicleSetup(self, 0);
                        return true;
-               case 2:
+               case IMP_weapon_group_2.impulse:
                        self.vehicle.vehicle_weapon2mode = SBRM_GUIDE;
                        CSQCVehicleSetup(self, 0);
                        return true;
-               case 3:
+               case IMP_weapon_group_3.impulse:
                        self.vehicle.vehicle_weapon2mode = SBRM_ARTILLERY;
                        CSQCVehicleSetup(self, 0);
                        return true;
 
-               case 10:
-               case 15:
-               case 18:
+               case IMP_weapon_next_byid.impulse:
+               case IMP_weapon_next_bypriority.impulse:
+               case IMP_weapon_next_bygroup.impulse:
                        self.vehicle.vehicle_weapon2mode += 1;
                        if(self.vehicle.vehicle_weapon2mode > SBRM_LAST)
                                self.vehicle.vehicle_weapon2mode = SBRM_FIRST;
@@ -520,10 +520,10 @@ bool spiderbot_impulse(int _imp)
                        //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
                        CSQCVehicleSetup(self, 0);
                        return true;
-               case 11:
-               case 12:
-               case 16:
-               case 19:
+               case IMP_weapon_last.impulse:
+               case IMP_weapon_prev_byid.impulse:
+               case IMP_weapon_prev_bypriority.impulse:
+               case IMP_weapon_prev_bygroup.impulse:
                        self.vehicle.vehicle_weapon2mode -= 1;
                        if(self.vehicle.vehicle_weapon2mode < SBRM_FIRST)
                                self.vehicle.vehicle_weapon2mode = SBRM_LAST;
@@ -533,9 +533,9 @@ bool spiderbot_impulse(int _imp)
                        return true;
 
                /*
-               case 17: // toss gun, could be used to exit?
+               case IMP_weapon_drop.impulse: // toss gun, could be used to exit?
                        break;
-               case 20: // Manual minigun reload?
+               case IMP_weapon_reload.impulse: // Manual minigun reload?
                        break;
                */
        }
index fc3bd91..b18d699 100644 (file)
@@ -562,8 +562,10 @@ NET_HANDLE(wframe, bool isNew)
        switch (viewmodel.state)
        {
                case WS_RAISE:
+                       viewmodel.weapon_switchdelay = activeweapon.switchdelay_raise;
+                       break;
                case WS_DROP:
-                       viewmodel.weapon_switchdelay = ReadFloat();
+                       viewmodel.weapon_switchdelay = activeweapon.switchdelay_drop;
                        break;
         default:
             viewmodel.weapon_switchdelay = 0;
@@ -587,16 +589,6 @@ void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim)
        WriteByte(channel, weaponentity.state);
        WriteFloat(channel, weaponentity.weapon_nextthink);
        WriteByte(channel, weaponentity.m_alpha * 255);
-       Weapon w = Weapons_from(actor.weapon);
-       switch (weaponentity.state)
-       {
-               case WS_RAISE:
-                       WriteFloat(channel, w.switchdelay_raise);
-                       break;
-               case WS_DROP:
-                       WriteFloat(channel, w.switchdelay_drop);
-                       break;
-       }
 }
 #endif