]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/quickmenu
authorMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 04:32:07 +0000 (14:32 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 04:32:07 +0000 (14:32 +1000)
# Conflicts:
# qcsrc/client/command/cl_cmd.qc

211 files changed:
commands.cfg
minigames.cfg
monsters.cfg
notifications.cfg
qcsrc/client/bgmscript.qc
qcsrc/client/command/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/damage.qc
qcsrc/client/generator.qc
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/mutators/events.qh
qcsrc/client/particles.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/scoreboard.qc
qcsrc/client/tuba.qc
qcsrc/client/view.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/animdecide.qc
qcsrc/common/animdecide.qh
qcsrc/common/command/generic.qc
qcsrc/common/command/rpn.qc
qcsrc/common/effects.inc [new file with mode: 0644]
qcsrc/common/effects.qc
qcsrc/common/effects.qh
qcsrc/common/items/inventory.qh
qcsrc/common/items/item.qh
qcsrc/common/items/item/pickup.qc
qcsrc/common/items/item/pickup.qh
qcsrc/common/mapinfo.qc
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/ttt.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/monsters/all.inc
qcsrc/common/monsters/all.qh
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/monster/zombie.qc
qcsrc/common/monsters/spawn.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/monsters/sv_monsters.qh
qcsrc/common/movetypes/movetypes.qc
qcsrc/common/movetypes/push.qc
qcsrc/common/mutators/base.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/notifications.inc [new file with mode: 0644]
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/physics.qc
qcsrc/common/physics.qh
qcsrc/common/playerstats.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/disablerelay.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/turrets/checkpoint.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/config.qc
qcsrc/common/turrets/config.qh
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/unit/ewheel.qc
qcsrc/common/turrets/unit/flac.qc
qcsrc/common/turrets/unit/fusionreactor.qc
qcsrc/common/turrets/unit/mlrs.qc
qcsrc/common/turrets/unit/plasma.qc
qcsrc/common/turrets/unit/plasma_dual.qc
qcsrc/common/turrets/unit/walker.qc
qcsrc/common/util-pre.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/unit/bumblebee.qc
qcsrc/common/vehicles/unit/racer.qc
qcsrc/common/vehicles/unit/raptor.qc
qcsrc/common/vehicles/unit/spiderbot.qc
qcsrc/common/viewloc.qc
qcsrc/common/weapons/calculations.qc
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/config.qh
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_blaster.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_electro.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_hmg.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_mortar.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_rpc.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/common/weapons/w_shotgun.qc
qcsrc/common/weapons/w_tuba.qc
qcsrc/common/weapons/w_vaporizer.qc
qcsrc/common/weapons/w_vortex.qc
qcsrc/csqcmodellib/cl_player.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/lib/Bool.qh [new file with mode: 0644]
qcsrc/lib/_all.inc
qcsrc/lib/prandom.qc
qcsrc/lib/test.qc
qcsrc/lib/urllib.qc
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/draw.qc
qcsrc/menu/item/label.qc
qcsrc/menu/menu.qc
qcsrc/menu/skin.qh
qcsrc/menu/xonotic/maplist.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/skinlist.qc
qcsrc/menu/xonotic/slider_decibels.qc
qcsrc/menu/xonotic/slider_resolution.qc
qcsrc/menu/xonotic/statslist.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server-testcase/framework.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/aim.qc
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/role_keyhunt.qc
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/campaign.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/banning.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/ent_cs.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_world.qc
qcsrc/server/ipban.qc
qcsrc/server/mapvoting.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_deathmatch.qc [new file with mode: 0644]
qcsrc/server/mutators/gamemode_domination.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_invasion.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/gamemode_race.qc
qcsrc/server/mutators/gamemode_tdm.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_new_toys.qc
qcsrc/server/mutators/mutator_physical_items.qc
qcsrc/server/mutators/mutator_random_gravity.qc
qcsrc/server/mutators/mutator_superspec.qc
qcsrc/server/mutators/mutator_touchexplode.qc
qcsrc/server/mutators/mutators.qh
qcsrc/server/mutators/mutators_include.qc
qcsrc/server/mutators/sandbox.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib/expandnode.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/path_waypoint.qc
qcsrc/server/playerdemo.qc
qcsrc/server/portals.qc
qcsrc/server/race.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/steerlib.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_plats.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponstats.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc

index 812e572b274b341177468f8ec99d616e4944ead0..e860a7edb8910f90db4302b239463f1fe416248a 100644 (file)
@@ -157,9 +157,7 @@ alias reportcvar           "qc_cmd_cmd    reportcvar           ${* ?}" // Old sy
 alias selectteam           "qc_cmd_cmd    selectteam           ${* ?}" // Attempt to choose a team to join into
 alias selfstuff            "qc_cmd_cmd    selfstuff            ${* ?}" // Stuffcmd a command to your own client
 alias sentcvar             "qc_cmd_cmd    sentcvar             ${* ?}" // New system for sending a client cvar to the server
-alias mobedit              "qc_cmd_cmd    mobedit              ${* ?}" // Edit a monster's properties
-alias mobkill              "qc_cmd_cmd    mobkill              ${* ?}" // Kill a monster
-alias mobspawn             "qc_cmd_cmd    mobspawn             ${* ?}" // Spawn a monster infront of the player
+alias editmob              "qc_cmd_cmd    editmob              ${* ?}" // Edit a monster's properties
 alias physics              "qc_cmd_cmd    physics              ${* ?}" // Change physics set
 alias spectate             "qc_cmd_cmd    spectate             ${* ?}" // Become an observer
 alias suggestmap           "qc_cmd_cmd    suggestmap           ${* ?}" // Suggest a map to the mapvote at match end
@@ -181,6 +179,15 @@ alias spec "spectate"
 alias sandbox "cmd g_sandbox ${* ?}"
 
 
+// monster aliases
+alias killmob "editmob kill ${* ?}"
+alias spawnmob "editmob spawn ${* ?}"
+alias skinmob "editmob skin ${* ?}"
+alias namemob "editmob name ${* ?}"
+alias movemob "editmob movetarget ${* ?}"
+alias butcher "editmob butcher ${* ?}"
+
+
 // ============================================================
 //  sv_cmd (server console command) - server/command/sv_cmd.qc
 // ============================================================
index 04c370cfc66e70e779db9489f651d8ea27714d14..9922d7e5674db21aa80098de1f956eb4f8863791 100644 (file)
@@ -1,4 +1,4 @@
-set sv_minigames 1 "Allow minigames"
+set sv_minigames 0 "Allow minigames"
 set sv_minigames_observer 1 "Force minigame players to be observers. 0: don't move them to observer, 1: move them to observer, 2: force observer"
 
 // Pong
index 3ff25a404f410256a83243c070db9bfaeb75c621..9d961c0ad636036bfd440a91ecdddbb2f83dc75b 100644 (file)
@@ -1,35 +1,37 @@
 // {{{ #1: Zombie
-set g_monster_zombie_attack_leap_damage 50
+set g_monster_zombie_attack_leap_damage 60
 set g_monster_zombie_attack_leap_delay 1.5
 set g_monster_zombie_attack_leap_force 55
 set g_monster_zombie_attack_leap_speed 500
-set g_monster_zombie_attack_melee_damage 40
-set g_monster_zombie_attack_melee_delay 1.2
-set g_monster_zombie_health 150
-set g_monster_zombie_speed_run 400
+set g_monster_zombie_attack_melee_damage 55
+set g_monster_zombie_attack_melee_delay 1
+set g_monster_zombie_damageforcescale 0.550000012
+set g_monster_zombie_health 200
+set g_monster_zombie_speed_run 600
 set g_monster_zombie_speed_stop 100
-set g_monster_zombie_speed_walk 150
+set g_monster_zombie_speed_walk 300
 // }}}
 // {{{ #2: Spider
 set g_monster_spider_attack_bite_damage 35
-set g_monster_spider_attack_bite_delay 1.2
-set g_monster_spider_attack_web_damagetime 4
+set g_monster_spider_attack_bite_delay 1.5
+set g_monster_spider_attack_web_damagetime 7
 set g_monster_spider_attack_web_delay 1.5
-set g_monster_spider_attack_web_speed 1000
+set g_monster_spider_attack_web_speed 1300
 set g_monster_spider_attack_web_speed_up 150
-set g_monster_spider_health 160
-set g_monster_spider_speed_run 450
+set g_monster_spider_damageforcescale 0.600000024
+set g_monster_spider_health 180
+set g_monster_spider_speed_run 750
 set g_monster_spider_speed_stop 100
-set g_monster_spider_speed_walk 150
+set g_monster_spider_speed_walk 400
 // }}}
 // {{{ #3: Mage
-set g_monster_mage_attack_push_damage 15
+set g_monster_mage_attack_push_damage 25
 set g_monster_mage_attack_push_delay 1
 set g_monster_mage_attack_push_force 300
 set g_monster_mage_attack_push_radius 150
-set g_monster_mage_attack_spike_accel 400
-set g_monster_mage_attack_spike_damage 30
-set g_monster_mage_attack_spike_decel 400
+set g_monster_mage_attack_spike_accel 480
+set g_monster_mage_attack_spike_damage 45
+set g_monster_mage_attack_spike_decel 480
 set g_monster_mage_attack_spike_delay 2
 set g_monster_mage_attack_spike_radius 60
 set g_monster_mage_attack_spike_smart 1
@@ -38,44 +40,49 @@ set g_monster_mage_attack_spike_smart_trace_max 2500
 set g_monster_mage_attack_spike_smart_trace_min 1000
 set g_monster_mage_attack_spike_speed_max 370
 set g_monster_mage_attack_spike_turnrate 0.65
-set g_monster_mage_heal_allies 15
+set g_monster_mage_damageforcescale 0.5
+set g_monster_mage_heal_allies 20
 set g_monster_mage_heal_delay 1.5
 set g_monster_mage_heal_minhealth 250
-set g_monster_mage_heal_range 200
-set g_monster_mage_heal_self 35
-set g_monster_mage_health 200
+set g_monster_mage_heal_range 250
+set g_monster_mage_heal_self 40
+set g_monster_mage_health 400
 set g_monster_mage_shield_blockpercent 0.8
 set g_monster_mage_shield_delay 7
 set g_monster_mage_shield_time 3
-set g_monster_mage_speed_run 75
+set g_monster_mage_speed_run 400
 set g_monster_mage_speed_stop 50
-set g_monster_mage_speed_walk 50
+set g_monster_mage_speed_walk 250
 // }}}
 // {{{ #4: Wyvern
-set g_monster_wyvern_attack_fireball_damage 30
-set g_monster_wyvern_attack_fireball_damagetime 3
+set g_monster_wyvern_attack_fireball_damage 50
+set g_monster_wyvern_attack_fireball_damagetime 2
 set g_monster_wyvern_attack_fireball_edgedamage 20
 set g_monster_wyvern_attack_fireball_force 50
 set g_monster_wyvern_attack_fireball_radius 120
-set g_monster_wyvern_attack_fireball_speed 900
-set g_monster_wyvern_health 95
-set g_monster_wyvern_speed_run 120
+set g_monster_wyvern_attack_fireball_speed 1200
+set g_monster_wyvern_damageforcescale 0.600000024
+set g_monster_wyvern_health 150
+set g_monster_wyvern_speed_run 250
 set g_monster_wyvern_speed_stop 300
-set g_monster_wyvern_speed_walk 40
+set g_monster_wyvern_speed_walk 120
 // }}}
 // {{{ #5: Shambler
-set g_monster_shambler_attack_claw_damage 50
-set g_monster_shambler_attack_lightning_damage 15
+set g_monster_shambler_attack_claw_damage 60
+set g_monster_shambler_attack_lightning_damage 25
+set g_monster_shambler_attack_lightning_damage_zap 15
 set g_monster_shambler_attack_lightning_force 100
 set g_monster_shambler_attack_lightning_radius 50
 set g_monster_shambler_attack_lightning_radius_zap 250
-set g_monster_shambler_attack_lightning_speed 800
+set g_monster_shambler_attack_lightning_speed 1000
 set g_monster_shambler_attack_lightning_speed_up 150
 set g_monster_shambler_attack_smash_damage 50
-set g_monster_shambler_health 500
-set g_monster_shambler_speed_run 150
+set g_monster_shambler_attack_smash_range 0
+set g_monster_shambler_damageforcescale 0.100000001
+set g_monster_shambler_health 650
+set g_monster_shambler_speed_run 320
 set g_monster_shambler_speed_stop 300
-set g_monster_shambler_speed_walk 100
+set g_monster_shambler_speed_walk 150
 // }}}
 
 // {{{ Misc
index 524036275f7af411b85a9231d36d8592071b5867..fed20f6535cd559e3f74124083e6ddb365839f65 100644 (file)
@@ -102,7 +102,8 @@ seta notification_ANNCE_VOTE_ACCEPT "2" "0 = disabled, 1 = enabled if gentle mod
 seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
 seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
 
-// MSG_INFO notifications (count = 296):
+// MSG_INFO notifications (count = 311):
+seta notification_INFO_CONNECTING "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CTF_CAPTURE_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CTF_CAPTURE_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -246,7 +247,7 @@ seta notification_INFO_DEATH_SELF_TURRET_PHASER "1" "0 = off, 1 = print to conso
 seta notification_INFO_DEATH_SELF_TURRET_PLASMA "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_DEATH_SELF_TURRET_TESLA "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_DEATH_SELF_TURRET_WALK_GUN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-seta notification_INFO_DEATH_SELF_TURRET_WALK_MEELE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_DEATH_SELF_TURRET_WALK_MELEE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_DEATH_SELF_TURRET_WALK_ROCKET "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_DEATH_SELF_VH_BUMB_DEATH "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_DEATH_SELF_VH_CRUSH "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -313,6 +314,19 @@ seta notification_INFO_KEYHUNT_PICKUP_PINK "1" "0 = off, 1 = print to console, 2
 seta notification_INFO_LMS_FORFEIT "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_LMS_NOLIVES "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_MONSTERS_DISABLED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_CAPTURE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_CPDESTROYED_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_CPDESTROYED_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_CPDESTROYED_YELLOW "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_CPDESTROYED_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_YELLOW "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_OVERTIME_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_OVERTIME_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_OVERTIME_YELLOW "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_ONSLAUGHT_GENDESTROYED_OVERTIME_PINK "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_POWERUP_INVISIBILITY "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_POWERUP_SHIELD "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_POWERUP_SPEED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -329,6 +343,7 @@ seta notification_INFO_RACE_NEW_BROKEN "1" "0 = off, 1 = print to console, 2 = p
 seta notification_INFO_RACE_NEW_IMPROVED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_RACE_NEW_MISSING_UID "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_RACE_NEW_SET "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_MINIGAME_INVITE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_SCORES_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_SCORES_BLUE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_SCORES_YELLOW "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -400,7 +415,7 @@ seta notification_INFO_WEAPON_TUBA_SUICIDE "1" "0 = off, 1 = print to console, 2
 seta notification_INFO_WEAPON_VAPORIZER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_WEAPON_VORTEX_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 
-// MSG_CENTER notifications (count = 201):
+// MSG_CENTER notifications (count = 221):
 seta notification_CENTER_ALONE "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_ASSAULT_ATTACKING "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_ASSAULT_DEFENDING "1" "0 = off, 1 = centerprint"
@@ -525,6 +540,7 @@ seta notification_CENTER_FREEZETAG_REVIVE "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_FREEZETAG_REVIVE_SELF "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_FREEZETAG_REVIVED "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_FREEZETAG_AUTO_REVIVED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_GENERATOR_UNDERATTACK "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_ROUND_TEAM_WIN_RED "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_ROUND_TEAM_WIN_BLUE "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_ROUND_TEAM_WIN_YELLOW "1" "0 = off, 1 = centerprint"
@@ -569,7 +585,20 @@ seta notification_CENTER_MOTD "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_NIX_COUNTDOWN "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_NIX_NEWWEAPON "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_NADE "1" "0 = off, 1 = centerprint"
-seta notification_CENTER_ONS_NOTSHIELDED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_CAPTURE "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_CAPTURE_RED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_CAPTURE_BLUE "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_CAPTURE_YELLOW "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_CAPTURE_PINK "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_CONTROLPOINT_SHIELDED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_GENERATOR_SHIELDED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_NOTSHIELDED_RED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_NOTSHIELDED_BLUE "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_NOTSHIELDED_YELLOW "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_NOTSHIELDED_PINK "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_NOTSHIELDED_TEAM "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_TELEPORT "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_ONS_TELEPORT_ANTISPAM "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_OVERTIME_FRAG "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_OVERTIME_CONTROLPOINT "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_OVERTIME_TIME "1" "0 = off, 1 = centerprint"
@@ -601,6 +630,12 @@ seta notification_CENTER_TEAMCHANGE_SPECTATE "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_TEAMCHANGE_SUICIDE "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_TIMEOUT_BEGINNING "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_TIMEOUT_ENDING "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_JOIN_PREVENT_MINIGAME "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_VEHICLE_ENTER "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_VEHICLE_ENTER_GUNNER "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_VEHICLE_ENTER_STEAL "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_VEHICLE_STEAL "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_VEHICLE_STEAL_SELF "1" "0 = off, 1 = centerprint"
 seta notification_CENTER_WEAPON_MINELAYER_LIMIT "1" "0 = off, 1 = centerprint"
 
 // MSG_MULTI notifications (count = 152):
@@ -676,7 +711,7 @@ seta notification_DEATH_SELF_TURRET_PHASER "1" "Enable this multiple notificatio
 seta notification_DEATH_SELF_TURRET_PLASMA "1" "Enable this multiple notification"
 seta notification_DEATH_SELF_TURRET_TESLA "1" "Enable this multiple notification"
 seta notification_DEATH_SELF_TURRET_WALK_GUN "1" "Enable this multiple notification"
-seta notification_DEATH_SELF_TURRET_WALK_MEELE "1" "Enable this multiple notification"
+seta notification_DEATH_SELF_TURRET_WALK_MELEE "1" "Enable this multiple notification"
 seta notification_DEATH_SELF_TURRET_WALK_ROCKET "1" "Enable this multiple notification"
 seta notification_DEATH_SELF_VH_BUMB_DEATH "1" "Enable this multiple notification"
 seta notification_DEATH_SELF_VH_CRUSH "1" "Enable this multiple notification"
@@ -824,4 +859,4 @@ seta notification_show_sprees_info "3" "Show spree information in MSG_INFO messa
 seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
 seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
 
-// Notification counts (total = 762): MSG_ANNCE = 89, MSG_INFO = 296, MSG_CENTER = 201, MSG_MULTI = 152, MSG_CHOICE = 24
+// Notification counts (total = 797): MSG_ANNCE = 89, MSG_INFO = 311, MSG_CENTER = 221, MSG_MULTI = 152, MSG_CHOICE = 24
index 697cae91ca3296d36c9d0c79612bb575a7ab4e38..894bf6955af35a3b376199c29e12fe351ca1f5e2 100644 (file)
@@ -136,7 +136,7 @@ void BGMScript_InitEntity(entity e)
                e.bgmscriptline = e.bgmscriptline0 = i;
                if(i >= bgmscriptbufsize)
                {
-                       printf("ERROR: bgmscript does not define %s\n", e.bgmscript);
+                       LOG_INFOF("ERROR: bgmscript does not define %s\n", e.bgmscript);
                        strunzone(e.bgmscript);
                        e.bgmscript = string_null;
                }
index c3b601984b39d58dd7c212061b07157c532ae0df..2d6093868cc1ea496e5822880e0c69f5900c4f00 100644 (file)
@@ -53,22 +53,22 @@ void LocalCommand_blurtest(int request)
                        blurtest_time1 = time + stof(argv(1));
                        blurtest_radius = stof(argv(2));
                        blurtest_power = stof(argv(3));
-                       print("Enabled blurtest\n");
+                       LOG_INFO("Enabled blurtest\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd blurtest\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd blurtest\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
        #else
        if(request)
        {
-               print("Blurtest is not enabled on this client.\n");
+               LOG_INFO("Blurtest is not enabled on this client.\n");
                return;
        }
        #endif
@@ -82,7 +82,7 @@ void LocalCommand_boxparticles(int request, int argc)
                {
                        if (argc == 9)
                        {
-                               int effect = particleeffectnum(argv(1));
+                               int effect = _particleeffectnum(argv(1));
                                if (effect >= 0)
                                {
                                        int index = stoi(argv(2));
@@ -104,22 +104,22 @@ void LocalCommand_boxparticles(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2boxparticles^7\n");
+                       LOG_INFO("Incorrect parameters for ^2boxparticles^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
-                       print("  'effectname' is the name of a particle effect in effectinfo.txt\n");
-                       print("  'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
-                       print("  'org_from' is the starting origin of the box\n");
-                       print("  'org_to' is the ending origin of the box\n");
-                       print("  'dir_from' is the minimum velocity\n");
-                       print("  'dir_to' is the maximum velocity\n");
-                       print("  'countmultiplier' defines a multiplier for the particle count (affects count only, not countabsolute or trailspacing)\n");
-                       print("  'flags' can contain:\n");
-                       print("    1 to respect globals particles_alphamin, particles_alphamax (set right before via prvm_globalset client)\n");
-                       print("    2 to respect globals particles_colormin, particles_colormax (set right before via prvm_globalset client)\n");
-                       print("    4 to respect globals particles_fade (set right before via prvm_globalset client)\n");
-                       print("    128 to draw a trail, not a box\n");
+                       LOG_INFO("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
+                       LOG_INFO("  'effectname' is the name of a particle effect in effectinfo.txt\n");
+                       LOG_INFO("  'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
+                       LOG_INFO("  'org_from' is the starting origin of the box\n");
+                       LOG_INFO("  'org_to' is the ending origin of the box\n");
+                       LOG_INFO("  'dir_from' is the minimum velocity\n");
+                       LOG_INFO("  'dir_to' is the maximum velocity\n");
+                       LOG_INFO("  'countmultiplier' defines a multiplier for the particle count (affects count only, not countabsolute or trailspacing)\n");
+                       LOG_INFO("  'flags' can contain:\n");
+                       LOG_INFO("    1 to respect globals particles_alphamin, particles_alphamax (set right before via prvm_globalset client)\n");
+                       LOG_INFO("    2 to respect globals particles_colormin, particles_colormax (set right before via prvm_globalset client)\n");
+                       LOG_INFO("    4 to respect globals particles_fade (set right before via prvm_globalset client)\n");
+                       LOG_INFO("    128 to draw a trail, not a box\n");
                        return;
                }
        }
@@ -142,13 +142,13 @@ void LocalCommand_create_scrshot_ent(int request)
                                fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles.x), " ", ftos(view_angles.y), " ", ftos(view_angles.z)), "\"\n"));
                                fputs(fh, "}\n");
 
-                               print("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
+                               LOG_INFO("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
 
                                fclose(fh);
                        }
                        else
                        {
-                               print("^1Error: ^7Could not dump to file!\n");
+                               LOG_INFO("^1Error: ^7Could not dump to file!\n");
                        }
                        return;
                }
@@ -156,8 +156,8 @@ void LocalCommand_create_scrshot_ent(int request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd create_scrshot_ent\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd create_scrshot_ent\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -186,8 +186,8 @@ void LocalCommand_debugmodel(int request, int argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd debugmodel model\n");
-                       print("  Where 'model' is a string of the model name to use for the debug model.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd debugmodel model\n");
+                       LOG_INFO("  Where 'model' is a string of the model name to use for the debug model.\n");
                        return;
                }
        }
@@ -230,11 +230,11 @@ void LocalCommand_handlevote(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2handlevote^7\n");
+                       LOG_INFO("Incorrect parameters for ^2handlevote^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd handlevote vote\n");
-                       print("  Where 'vote' is the selection for either the current poll or uid2name.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd handlevote vote\n");
+                       LOG_INFO("  Where 'vote' is the selection for either the current poll or uid2name.\n");
                        return;
                }
        }
@@ -315,18 +315,18 @@ void LocalCommand_hud(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2hud^7\n");
+                       LOG_INFO("Incorrect parameters for ^2hud^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
-                       print("  Where 'action' is the command to complete,\n");
-                       print("  'configname' is the name to save to for \"save\" action,\n");
-                       print("  'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
-                       print("  and 'layout' is how to organize the scoreboard columns for the set action.\n");
-                       print("  quickmenu [[default | file | \"\"] submenu]\n");
-                       print("    Called without options (or with "") loads either the default quickmenu or a quickmenu file if hud_panel_quickmenu_file is set to a valid filename.\n");
-                       print("    Submenu option allows to open quickmenu directly in a submenu, it requires to specify 'default', 'file' or '\"\"' option.\n");
-                       print("  Full list of commands here: \"configure, quickmenu, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
+                       LOG_INFO("  Where 'action' is the command to complete,\n");
+                       LOG_INFO("  'configname' is the name to save to for \"save\" action,\n");
+                       LOG_INFO("  'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
+                       LOG_INFO("  and 'layout' is how to organize the scoreboard columns for the set action.\n");
+                       LOG_INFO("  quickmenu [[default | file | \"\"] submenu]\n");
+                       LOG_INFO("    Called without options (or with "") loads either the default quickmenu or a quickmenu file if hud_panel_quickmenu_file is set to a valid filename.\n");
+                       LOG_INFO("    Submenu option allows to open quickmenu directly in a submenu, it requires to specify 'default', 'file' or '\"\"' option.\n");
+                       LOG_INFO("  Full list of commands here: \"configure, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
                        return;
                }
        }
@@ -346,11 +346,11 @@ void LocalCommand_localprint(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2localprint^7\n");
+                       LOG_INFO("Incorrect parameters for ^2localprint^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd localprint \"message\"\n");
-                       print("  'message' is the centerprint message to send to yourself.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd localprint \"message\"\n");
+                       LOG_INFO("  'message' is the centerprint message to send to yourself.\n");
                        return;
                }
        }
@@ -370,11 +370,11 @@ void LocalCommand_mv_download(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2mv_download^7\n");
+                       LOG_INFO("Incorrect parameters for ^2mv_download^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd mv_download mapid\n");
-                       print("  Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd mv_download mapid\n");
+                       LOG_INFO("  Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
                        return;
                }
        }
@@ -389,17 +389,17 @@ void LocalCommand_find(int request, int argc)
                        entity client;
 
                        for(client = world; (client = find(client, classname, argv(1))); )
-                               print(etos(client), "\n");
+                               LOG_INFO(etos(client), "\n");
 
                        return;
                }
 
                default:
-                       print("Incorrect parameters for ^2find^7\n");
+                       LOG_INFO("Incorrect parameters for ^2find^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd find classname\n");
-                       print("  Where 'classname' is the classname to search for.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd find classname\n");
+                       LOG_INFO("  Where 'classname' is the classname to search for.\n");
                        return;
                }
        }
@@ -429,11 +429,11 @@ void LocalCommand_sendcvar(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2sendcvar^7\n");
+                       LOG_INFO("Incorrect parameters for ^2sendcvar^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd sendcvar <cvar>\n");
-                       print("  Where 'cvar' is the cvar plus arguments to send to the server.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd sendcvar <cvar>\n");
+                       LOG_INFO("  Where 'cvar' is the cvar plus arguments to send to the server.\n");
                        return;
                }
        }
@@ -484,7 +484,7 @@ void LocalCommand_(int request)
 void LocalCommand_macro_help()
 {
        #define CLIENT_COMMAND(name,function,description) \
-               { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
+               { if(strtolower(description) != "") { LOG_INFO("  ^2", name, "^7: ", description, "\n"); } }
 
        CLIENT_COMMANDS(0, 0);
        #undef CLIENT_COMMAND
@@ -544,14 +544,14 @@ void GameCommand(string command)
        {
                if(argc == 1)
                {
-                       print("\nClient console commands:\n");
+                       LOG_INFO("\nClient console commands:\n");
                        LocalCommand_macro_help();
 
-                       print("\nGeneric commands shared by all programs:\n");
+                       LOG_INFO("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
 
-                       print("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above.\n");
-                       print("For help about a specific command, type cl_cmd help COMMAND\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above.\n");
+                       LOG_INFO("For help about a specific command, type cl_cmd help COMMAND\n");
 
                        return;
                }
@@ -571,7 +571,7 @@ void GameCommand(string command)
        ) return;
 
        // nothing above caught the command, must be invalid
-       print(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n");
+       LOG_INFO(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n");
 
        return;
 }
index 80b68a6e287384480a002026329a1f8f4cba283d..d8c44d660c022dc49d5cf5f481fd4aedfde2bc94 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "../common/animdecide.qh"
 #include "../common/csqcmodel_settings.qh"
+#include "../common/effects.qh"
 #include "../common/teams.qh"
 #include "../common/triggers/trigger/viewloc.qh"
 
@@ -137,7 +138,7 @@ void CSQCPlayer_ModelAppearance_PostUpdate(void)
                self.forceplayermodels_isgoodmodel = fexists(self.forceplayermodels_savemodel);
                self.forceplayermodels_isgoodmodel_mdl = self.forceplayermodels_savemodel;
                if(!self.forceplayermodels_isgoodmodel)
-                       printf("Warning: missing model %s has been used\n", self.forceplayermodels_savemodel);
+                       LOG_INFOF("Warning: missing model %s has been used\n", self.forceplayermodels_savemodel);
        }
 }
 void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer)
@@ -379,7 +380,7 @@ int CSQCPlayer_FallbackFrame(int f)
                case 29: return 4; // anim_duckwalkbackright -> anim_duckwalk
                case 30: return 4; // anim_duckwalkbackleft -> anim_duckwalk
        }
-       printf("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, self.model);
+       LOG_INFOF("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, self.model);
        return f;
 }
 void CSQCPlayer_FallbackFrame_Apply(void)
@@ -450,7 +451,7 @@ void CSQCModel_AutoTagIndex_Apply(void)
                                                        // we need to prevent this from 'appening
                                                        self.tag_entity = world;
                                                        self.drawmask = 0;
-                                                       dprint("h_ model lacks weapon attachment, but v_ model is attached to it\n");
+                                                       LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it\n");
                                                }
                                        }
                                        else if(self.tag_entity.isplayermodel)
@@ -527,7 +528,7 @@ void CSQCModel_Effects_Apply(void)
        self.traileffect = 0;
 
        if(eff & EF_BRIGHTFIELD)
-               self.traileffect = particleeffectnum("TR_NEXUIZPLASMA");
+               self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA);
        // ignoring EF_MUZZLEFLASH
        if(eff & EF_BRIGHTLIGHT)
                adddynamiclight(self.origin, 400, '3 3 3');
@@ -545,9 +546,9 @@ void CSQCModel_Effects_Apply(void)
        if(eff & EF_FULLBRIGHT)
                self.renderflags |= RF_FULLBRIGHT;
        if(eff & EF_FLAME)
-               pointparticles(particleeffectnum("EF_FLAME"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+               pointparticles(particleeffectnum(EFFECT_EF_FLAME), self.origin, '0 0 0', bound(0, frametime, 0.1));
        if(eff & EF_STARDUST)
-               pointparticles(particleeffectnum("EF_STARDUST"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+               pointparticles(particleeffectnum(EFFECT_EF_STARDUST), self.origin, '0 0 0', bound(0, frametime, 0.1));
        if(eff & EF_NOSHADOW)
                self.renderflags |= RF_NOSHADOW;
        if(eff & EF_NODEPTHTEST)
@@ -561,24 +562,24 @@ void CSQCModel_Effects_Apply(void)
                self.renderflags |= RF_DYNAMICMODELLIGHT;
        // ignoring EF_UNUSED18, EF_UNUSED19, EF_RESTARTANIM_BIT, EF_TELEPORT_BIT, EF_LOWPRECISION
        if(self.csqcmodel_modelflags & MF_ROCKET)
-               self.traileffect = particleeffectnum("TR_ROCKET");
+               self.traileffect = particleeffectnum(EFFECT_TR_ROCKET);
        if(self.csqcmodel_modelflags & MF_GRENADE)
-               self.traileffect = particleeffectnum("TR_GRENADE");
+               self.traileffect = particleeffectnum(EFFECT_TR_GRENADE);
        if(self.csqcmodel_modelflags & MF_GIB)
-               self.traileffect = particleeffectnum("TR_BLOOD");
+               self.traileffect = particleeffectnum(EFFECT_TR_BLOOD);
        if(self.csqcmodel_modelflags & MF_ROTATE)
        {
                self.renderflags |= RF_USEAXIS;
                makevectors(self.angles + '0 100 0' * fmod(time, 3.6));
        }
        if(self.csqcmodel_modelflags & MF_TRACER)
-               self.traileffect = particleeffectnum("TR_WIZSPIKE");
+               self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE);
        if(self.csqcmodel_modelflags & MF_ZOMGIB)
-               self.traileffect = particleeffectnum("TR_SLIGHTBLOOD");
+               self.traileffect = particleeffectnum(EFFECT_TR_SLIGHTBLOOD);
        if(self.csqcmodel_modelflags & MF_TRACER2)
-               self.traileffect = particleeffectnum("TR_KNIGHTSPIKE");
+               self.traileffect = particleeffectnum(EFFECT_TR_KNIGHTSPIKE);
        if(self.csqcmodel_modelflags & MF_TRACER3)
-               self.traileffect = particleeffectnum("TR_VORESPIKE");
+               self.traileffect = particleeffectnum(EFFECT_TR_VORESPIKE);
 
        if(self.drawmask)
                Projectile_DrawTrail(self.origin);
@@ -641,6 +642,7 @@ void CSQCModel_Hook_PreDraw(bool isplayer)
        {
                CSQCPlayer_ModelAppearance_Apply(self.entnum == player_localnum + 1);
                CSQCPlayer_LOD_Apply();
+
                if(!isplayer)
                {
                        skeleton_loadinfo(self);
@@ -738,7 +740,7 @@ void CSQCModel_Hook_PreUpdate(bool isnew, bool isplayer, bool islocalplayer)
 void CSQCModel_Hook_PostUpdate(bool isnew, bool isplayer, bool islocalplayer)
 {
        // is it a player model? (shared state)
-       self.isplayermodel = (substring(self.model, 0, 14) == "models/player/" || substring(self.model, 0, 17) == "models/ok_player/");
+       self.isplayermodel = (substring(self.model, 0, 14) == "models/player/" || substring(self.model, 0, 17) == "models/ok_player/" || (substring(self.model, 0, 16) == "models/monsters/" && (self.entnum >= 1 && self.entnum <= maxclients)));
 
        // save values set by server
        if(self.isplayermodel)
index 5eff455c2f2929a429798a1cd4e964b11c10e1b7..32d236fba4db7a23194ec99e26cc08b38e331e65 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
+#include "../common/effects.qh"
 #include "../common/movetypes/movetypes.qh"
 #include "../common/util.qh"
 
@@ -117,7 +118,7 @@ void DamageEffect(vector hitorg, float thedamage, int type, int specnum)
        e.classname = "damage";
        e.owner = self;
        e.cnt = time + life;
-       e.team = particleeffectnum(effectname);
+       e.team = _particleeffectnum(effectname);
        e.think = DamageEffect_Think;
        e.nextthink = time;
        self.total_damages += 1;
@@ -233,33 +234,33 @@ void Ent_DamageInfo(float isNew)
                                string _snd;
                                _snd = W_Sound(strcat("ric", ftos(1 + rint(random() * 2))));
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("spiderbot_minigun_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_SPIDERBOT_MINIGUN_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_SPID_ROCKET:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("spiderbot_rocket_explode"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_SPIDERBOT_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_SPID_DEATH:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
                                break;
 
                        case DEATH_VH_WAKI_GUN:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RACER_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_WAKI_ROCKET:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("wakizashi_rocket_explode"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RACER_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_WAKI_DEATH:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
                                break;
 
                        case DEATH_VH_RAPT_CANNON:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RAPTOR_CANNON_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_FRAGMENT:
                                float i;
@@ -271,19 +272,19 @@ void Ent_DamageInfo(float isNew)
                                        RaptorCBShellfragToss(w_org, vel, ang + '0 0 1' * (120 * i));
                                }
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RAPTOR_BOMB_SPREAD), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_BOMB:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RAPTOR_BOMB_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_DEATH:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_BUMB_GUN:
                                sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("bigplasma_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_BIGPLASMA_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                }
        }
@@ -304,11 +305,11 @@ void Ent_DamageInfo(float isNew)
                {
                         case DEATH_TURRET_EWHEEL:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("laser_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_FLAC:
-                               pointparticles(particleeffectnum("hagar_explode"), w_org, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), w_org, '0 0 0', 1);
                                _snd = W_Sound(strcat("hagexp", ftos(1 + rint(random() * 2))));
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
                                break;
@@ -318,24 +319,24 @@ void Ent_DamageInfo(float isNew)
                         case DEATH_TURRET_WALK_ROCKET:
                         case DEATH_TURRET_HELLION:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("rocket_explode"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_MACHINEGUN:
                         case DEATH_TURRET_WALK_GUN:
                                _snd = W_Sound(strcat("ric", ftos(1 + rint(random() * 2))));
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("machinegun_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_PLASMA:
                                sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_WALK_MELEE:
                                sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("TE_SPARK"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_TE_SPARK), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_PHASER:
index 46872d8173296c7e810e289a94256ade3b3c7cda..80ccc441bcf01cf0188f4be4cf7b0bd9a7d4205e 100644 (file)
@@ -81,11 +81,11 @@ void generator_draw()
                if(random() < 0.9 - self.health / self.max_health)
                if(random() < 0.01)
                {
-                       pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ELECTRO_BALLEXPLODE), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
                        sound(self, CH_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTEN_NORM);
                }
                else
-                       pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_DAMAGED), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
 
                self.move_time = time + 0.1;
 
@@ -102,7 +102,7 @@ void generator_draw()
        if(self.count==40||self.count==20)
        {
                sound(self, CH_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 6);
+               pointparticles(particleeffectnum(EFFECT_ELECTRO_COMBO), self.origin, '0 0 0', 6);
        }
 
        // rays
@@ -115,7 +115,7 @@ void generator_draw()
        for(i=0;i < 10;++i)
        {
                org = self.origin + randompos('-30 -30 -30' * i + '0 0 -20', '30 30 30' * i + '0 0 20');
-               pointparticles(particleeffectnum("onslaught_generator_gib_explode"), org, '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_GIB), org, '0 0 0', 1);
        }
 
        // Short explosion sound + small explosion
@@ -127,14 +127,14 @@ void generator_draw()
 
        // Particles
        org = self.origin + randompos(self.mins + '8 8 8', self.maxs + '-8 -8 -8');
-       pointparticles(particleeffectnum("onslaught_generator_smallexplosion"), org, '0 0 0', 1);
+       pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_EXPLODE), org, '0 0 0', 1);
 
        // Final explosion
        if(self.count==1)
        {
                org = self.origin;
                te_explosion(org);
-               pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_EXPLODE2), org, '0 0 0', 1);
                sound(self, CH_TRIGGER, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
        }
 
index bdde3b698172c1b4ca08a075d3c0b97817f3e559..b59cd4ff3d50c4d4b80a1722e3a02953ec9bb9ee 100644 (file)
@@ -86,7 +86,7 @@ void Gib_Touch()
 
        if(!self.silent)
                sound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
+       pointparticles(_particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
 
        Gib_Delete();
 }
@@ -102,9 +102,9 @@ void Gib_Draw()
 
        if(self.touch == Gib_Touch) // don't do this for the "chunk" thingie...
                // TODO somehow make it spray in a direction dependent on self.angles
-               trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_SLIGHTBLOOD")), oldorg, self.origin);
+               trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_SLIGHTBLOOD.eent_eff_name)), oldorg, self.origin);
        else
-               trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_BLOOD")), oldorg, self.origin);
+               trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_BLOOD.eent_eff_name)), oldorg, self.origin);
 
        self.renderflags = 0;
 
@@ -222,7 +222,7 @@ void Ent_GibSplash(bool isNew)
 
                        if(prandom() < amount)
                                TossGib ("models/gibs/eye.md3", org, org, vel, prandomvec() * 150, specnum, 0, issilent);
-                       new_te_bloodshower(particleeffectnum(strcat(specstr, "bloodshower")), org, 1200, amount);
+                       new_te_bloodshower(_particleeffectnum(strcat(specstr, "bloodshower")), org, 1200, amount);
                        if(prandom() < amount)
                                TossGib ("models/gibs/bloodyskull.md3", org, org + 16 * prandomvec(), vel, prandomvec() * 100, specnum, 0, issilent);
 
@@ -255,17 +255,17 @@ void Ent_GibSplash(bool isNew)
                        }
                        break;
                case 0x02:
-                       pointparticles(particleeffectnum(strcat(specstr, "blood")), org, vel, amount * 16);
+                       pointparticles(_particleeffectnum(strcat(specstr, "blood")), org, vel, amount * 16);
                        break;
                case 0x03:
                        if(prandom() < amount)
                                TossGib ("models/gibs/chunk.mdl", org, org, vel, prandomvec() * (prandom() * 30 + 20), specnum, 1, issilent); // TODO maybe adjust to more randomization?
                        break;
                case 0x81:
-                       pointparticles(particleeffectnum(strcat(gentle_prefix, "damage_dissolve")), org, vel, amount);
+                       pointparticles(_particleeffectnum(strcat(gentle_prefix, "damage_dissolve")), org, vel, amount);
                        break;
                case 0x82:
-                       pointparticles(particleeffectnum(strcat(gentle_prefix, "damage_hit")), org, vel, amount * 16);
+                       pointparticles(_particleeffectnum(strcat(gentle_prefix, "damage_hit")), org, vel, amount * 16);
                        break;
                case 0x83:
                        // no gibs in gentle mode, sorry
index ce6ca92b5f4ec0c1b774c32540aefcf7bc10d4fe..a30ab73c16e357a3972d923c87a43aa5a6623bc4 100644 (file)
@@ -161,7 +161,7 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_HOOK:
                        break;
                case ENT_CLIENT_ARC_BEAM:
-                       pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
+                       pointparticles(particleeffectnum(EFFECT_ARC_LIGHTNING2), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
                        break;
        }
 }
index af423e4915b2b64d419bfa8b312e8b2cc8bc20dd..eb50ebc094090437a069d5a7fcc87ae368b583b0 100644 (file)
@@ -2731,7 +2731,7 @@ void HUD_Vote(void)
                {
                        vote_yescount = 0;
                        vote_nocount = 0;
-                       print(_("^1You must answer before entering hud configure mode\n"));
+                       LOG_INFO(_("^1You must answer before entering hud configure mode\n"));
                        cvar_set("_hud_configure", "0");
                }
                if(vote_called_vote)
@@ -4817,7 +4817,7 @@ void HUD_Main (void)
                        }
                }
                if (warning)
-                       dprint("Automatically fixed wrong/missing panel numbers in _hud_panelorder\n");
+                       LOG_TRACE("Automatically fixed wrong/missing panel numbers in _hud_panelorder\n");
 
                cvar_set("_hud_panelorder", s);
                if(hud_panelorder_prev)
index 72e3fdcc01aac2254abf82663fd9ebc1ff6fac47..0216a43b087b6b0352148f12ac95ba41a8cc1a7d 100644 (file)
@@ -217,11 +217,11 @@ void HUD_Panel_ExportCfg(string cfgname)
                }
                HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated
 
-               printf(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename);
+               LOG_INFOF(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename);
                fclose(fh);
        }
        else
-               printf(_("^1Couldn't write to %s\n"), filename);
+               LOG_INFOF(_("^1Couldn't write to %s\n"), filename);
 }
 
 void HUD_Configure_Exit_Force()
index 7dc9466a04a3c1fb84cead012130ec6d37f6e1ae..a5085e893da413c6db62620736aabb7fef9d6fec 100644 (file)
@@ -90,7 +90,7 @@ void CSQC_Init(void)
        prvm_language = strzone(cvar_string("prvm_language"));
 
 #ifdef WATERMARK
-       dprintf("^4CSQC Build information: ^1%s\n", WATERMARK);
+       LOG_TRACEF("^4CSQC Build information: ^1%s\n", WATERMARK);
 #endif
 
        int i;
@@ -148,7 +148,6 @@ void CSQC_Init(void)
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
        CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
-       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        initialize_minigames();
 
@@ -245,7 +244,7 @@ float SetTeam(entity o, int Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       dprintf("trying to switch to unsupported team %d\n", Team);
+                                       LOG_TRACEF("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -261,7 +260,7 @@ float SetTeam(entity o, int Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       dprintf("trying to switch to unsupported team %d\n", Team);
+                                       LOG_TRACEF("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -460,7 +459,7 @@ void Ent_ReadPlayerScore()
        if(!isNew && n != self.sv_entnum)
        {
                //print("A CSQC entity changed its owner!\n");
-               printf("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", num_for_edict(self), self.classname);
+               LOG_INFOF("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", num_for_edict(self), self.classname);
                isNew = true;
                Ent_Remove();
                self.enttype = ENT_CLIENT_SCORES;
@@ -730,14 +729,14 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
                        {
                                switch(teamnum)
                                {
-                                       case NUM_TEAM_1: self.cnt = particleeffectnum("spawn_point_red"); break;
-                                       case NUM_TEAM_2: self.cnt = particleeffectnum("spawn_point_blue"); break;
-                                       case NUM_TEAM_3: self.cnt = particleeffectnum("spawn_point_yellow"); break;
-                                       case NUM_TEAM_4: self.cnt = particleeffectnum("spawn_point_pink"); break;
-                                       default: self.cnt = particleeffectnum("spawn_point_neutral"); break;
+                                       case NUM_TEAM_1: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_RED); break;
+                                       case NUM_TEAM_2: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_BLUE); break;
+                                       case NUM_TEAM_3: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_YELLOW); break;
+                                       case NUM_TEAM_4: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_PINK); break;
+                                       default: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_NEUTRAL); break;
                                }
                        }
-                       else { self.cnt = particleeffectnum("spawn_point_neutral"); }
+                       else { self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_NEUTRAL); }
 
                        self.draw = Spawn_Draw;
                }
@@ -767,11 +766,11 @@ void Ent_ReadSpawnEvent(float is_new)
                        {
                                switch(teamnum)
                                {
-                                       case NUM_TEAM_1: pointparticles(particleeffectnum("spawn_event_red"), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_2: pointparticles(particleeffectnum("spawn_event_blue"), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_3: pointparticles(particleeffectnum("spawn_event_yellow"), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_4: pointparticles(particleeffectnum("spawn_event_pink"), self.origin, '0 0 0', 1); break;
-                                       default: pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_1: pointparticles(particleeffectnum(EFFECT_SPAWN_RED), self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_2: pointparticles(particleeffectnum(EFFECT_SPAWN_BLUE), self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_3: pointparticles(particleeffectnum(EFFECT_SPAWN_YELLOW), self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_4: pointparticles(particleeffectnum(EFFECT_SPAWN_PINK), self.origin, '0 0 0', 1); break;
+                                       default: pointparticles(particleeffectnum(EFFECT_SPAWN_NEUTRAL), self.origin, '0 0 0', 1); break;
                                }
                        }
                        if(autocvar_cl_spawn_event_sound)
@@ -809,7 +808,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        t = ReadByte();
 
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Ent_Update(%d) with self=%i self.entnum=%d self.enttype=%d t=%d\n", bIsNewEntity, self, self.entnum, self.enttype, t);
+               LOG_INFOF("CSQC_Ent_Update(%d) with self=%i self.entnum=%d self.enttype=%d t=%d\n", bIsNewEntity, self, self.entnum, self.enttype, t);
 
        // set up the "time" global for received entities to be correct for interpolation purposes
        savetime = time;
@@ -830,7 +829,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
                if(t != self.enttype || bIsNewEntity)
                {
                        //print("A CSQC entity changed its type!\n");
-                       printf("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(self), self.entnum, self.enttype, t);
+                       LOG_INFOF("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(self), self.entnum, self.enttype, t);
                        Ent_Remove();
                        clearentity(self);
                        bIsNewEntity = 1;
@@ -840,7 +839,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        {
                if(!bIsNewEntity)
                {
-                       printf("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(self), self.entnum, t);
+                       LOG_INFOF("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(self), self.entnum, t);
                        bIsNewEntity = 1;
                }
        }
@@ -947,11 +946,11 @@ void Ent_Remove()
 void CSQC_Ent_Remove()
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Ent_Remove() with self=%i self.entnum=%d self.enttype=%d\n", self, self.entnum, self.enttype);
+               LOG_INFOF("CSQC_Ent_Remove() with self=%i self.entnum=%d self.enttype=%d\n", self, self.entnum, self.enttype);
 
        if(wasfreed(self))
        {
-               print("WARNING: CSQC_Ent_Remove called for already removed entity. Packet loss?\n");
+               LOG_INFO("WARNING: CSQC_Ent_Remove called for already removed entity. Packet loss?\n");
                return;
        }
        if(self.enttype)
@@ -972,7 +971,7 @@ void Gamemode_Init()
 void CSQC_Parse_StuffCmd(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Parse_StuffCmd(\"%s\")\n", strMessage);
+               LOG_INFOF("CSQC_Parse_StuffCmd(\"%s\")\n", strMessage);
 
        localcmd(strMessage);
 }
@@ -980,16 +979,16 @@ void CSQC_Parse_StuffCmd(string strMessage)
 void CSQC_Parse_Print(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Parse_Print(\"%s\")\n", strMessage);
+               LOG_INFOF("CSQC_Parse_Print(\"%s\")\n", strMessage);
 
-       print(ColorTranslateRGB(strMessage));
+       LOG_INFO(ColorTranslateRGB(strMessage));
 }
 
 // CSQC_Parse_CenterPrint : Provides the centerprint_hud string in the first parameter that the server provided.
 void CSQC_Parse_CenterPrint(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Parse_CenterPrint(\"%s\")\n", strMessage);
+               LOG_INFOF("CSQC_Parse_CenterPrint(\"%s\")\n", strMessage);
 
        centerprint_hud(strMessage);
 }
@@ -1278,7 +1277,7 @@ float CSQC_Parse_TempEntity()
        int nTEID = ReadByte();
 
        if (autocvar_developer_csqcentities)
-               printf("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
+               LOG_INFOF("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
 
        switch (nTEID)
        {
index 037d906fbe09c1ec9f3a2b0f91a77be42c609e4a..3511c743f05b7478a6436c884775742962532b72 100644 (file)
@@ -495,7 +495,7 @@ void Cmd_MapVote_MapDownload(float argc)
 
        if(argc != 2 || !mv_pk3list)
        {
-               print(_("mv_mapdownload: ^3You're not supposed to use this command on your own!\n"));
+               LOG_INFO(_("mv_mapdownload: ^3You're not supposed to use this command on your own!\n"));
                return;
        }
 
@@ -505,7 +505,7 @@ void Cmd_MapVote_MapDownload(float argc)
                        break;
 
        if(!pak || pak.sv_entnum != id) {
-               print(_("^1Error:^7 Couldn't find pak index.\n"));
+               LOG_INFO(_("^1Error:^7 Couldn't find pak index.\n"));
                return;
        }
 
@@ -514,7 +514,7 @@ void Cmd_MapVote_MapDownload(float argc)
                mv_preview[id] = true;
                return;
        } else {
-               print(_("Requesting preview...\n"));
+               LOG_INFO(_("Requesting preview...\n"));
                localcmd(strcat("\ncmd mv_getpicture ", ftos(id), "\n"));
        }
 }
index fbd98da95e53021332869743c5be700f3293b1d8..9bf0a855fa5375e53db412db0f7cae6d89e3efa0 100644 (file)
@@ -107,7 +107,7 @@ void RemoveTeam(entity Team)
 
        if(!tm)
        {
-               print(_("Trying to remove a team which is not in the teamlist!"));
+               LOG_INFO(_("Trying to remove a team which is not in the teamlist!"));
                return;
        }
        parent.sort_next = Team.sort_next;
@@ -566,7 +566,7 @@ void URI_Get_Callback(int id, float status, string data)
        }
        else
        {
-               printf("Received HTTP request data for an invalid id %d.\n", id);
+               LOG_INFOF("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
@@ -591,7 +591,7 @@ void Accuracy_LoadLevels()
                if(acc_levels > MAX_ACCURACY_LEVELS)
                        acc_levels = MAX_ACCURACY_LEVELS;
                if(acc_levels < 2)
-                       print("Warning: accuracy_color_levels must contain at least 2 values\n");
+                       LOG_INFO("Warning: accuracy_color_levels must contain at least 2 values\n");
 
                int i;
                for(i = 0; i < acc_levels; ++i)
index 9516fd25e794788e8da9bc4c792c7a5ad6efd132..fe2e3fd33ffb6f915b06e160b171d88927ffd116 100644 (file)
@@ -112,4 +112,21 @@ MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
 string checkmodel_input, checkmodel_command;
 MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
 
+/** called when a player presses the jump key */
+#define EV_PlayerJump(i, o) \
+    /**/ i(float, player_multijump) \
+    /**/ i(float, player_jumpheight) \
+    /**/ o(float, player_multijump) \
+    /**/ o(float, player_jumpheight) \
+    /**/
+float player_multijump;
+float player_jumpheight;
+MUTATOR_HOOKABLE(PlayerJump, EV_PlayerJump);
+
+/** Called checking if 3rd person mode should be forced on */
+#define EV_WantEventchase(i, o) \
+    /** entity id */ i(entity, self) \
+    /**/
+MUTATOR_HOOKABLE(WantEventchase, EV_WantEventchase);
+
 #endif
index e997d15600f835a1b40de4fac68618374d301886..6d73e24b0bb514f323706a1d75b45610d7fe0a52 100644 (file)
@@ -14,14 +14,14 @@ void Net_ReadVortexBeamParticle()
        endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
        charge = ReadByte() / 255.0;
 
-       pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
+       pointparticles(particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH), shotorg, normalize(endpos - shotorg) * 1000, 1);
 
        //draw either the old v2.3 beam or the new beam
        charge = sqrt(charge); // divide evenly among trail spacing and alpha
        particles_alphamin = particles_alphamax = particles_fade = charge;
 
        if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
-               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
        else
-               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
 }
index 96b91d1c8042d4a7611e47da81b778443c625dbe..00f9543717f39c5f19c5c6e09cd7667d2f99e620 100644 (file)
@@ -48,7 +48,7 @@ void skeleton_loadinfo(entity e)
                }
        }
        else
-               dprint("No model parameters for ", e.model, "\n");
+               LOG_TRACE("No model parameters for ", e.model, "\n");
        //dprint(e.model, " uses ", ftos(e.bone_upperbody), " ", ftos(e.fixbone), "\n");
        get_model_parameters(string_null, 0);
        e.skeleton_info_modelindex = e.modelindex;
index 7b6cff183068749dabc5b8a0570efcb47f1b23b5..da5a7b2a771ab9cdb85a5101be323089fb21d9f7 100644 (file)
@@ -245,68 +245,68 @@ void HUD_UpdateTeamPos(entity Team)
 
 void Cmd_HUD_Help()
 {
-       print(_("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"));
-       print(_("^3|---------------------------------------------------------------|\n"));
-       print(_("Usage:\n"));
-       print(_("^2scoreboard_columns_set default\n"));
-       print(_("^2scoreboard_columns_set ^7field1 field2 ...\n"));
-       print(_("The following field names are recognized (case insensitive):\n"));
-       print(_("You can use a ^3|^7 to start the right-aligned fields.\n\n"));
-
-       print(_("^3name^7 or ^3nick^7             Name of a player\n"));
-       print(_("^3ping^7                     Ping time\n"));
-       print(_("^3pl^7                       Packet loss\n"));
-       print(_("^3kills^7                    Number of kills\n"));
-       print(_("^3deaths^7                   Number of deaths\n"));
-       print(_("^3suicides^7                 Number of suicides\n"));
-       print(_("^3frags^7                    kills - suicides\n"));
-       print(_("^3kd^7                       The kill-death ratio\n"));
-       print(_("^3sum^7                      frags - deaths\n"));
-       print(_("^3caps^7                     How often a flag (CTF) or a key (KeyHunt) was captured\n"));
-       print(_("^3pickups^7                  How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
-       print(_("^3captime^7                  Time of fastest cap (CTF)\n"));
-       print(_("^3fckills^7                  Number of flag carrier kills\n"));
-       print(_("^3returns^7                  Number of flag returns\n"));
-       print(_("^3drops^7                    Number of flag drops\n"));
-       print(_("^3lives^7                    Number of lives (LMS)\n"));
-       print(_("^3rank^7                     Player rank\n"));
-       print(_("^3pushes^7                   Number of players pushed into void\n"));
-       print(_("^3destroyed^7                Number of keys destroyed by pushing them into void\n"));
-       print(_("^3kckills^7                  Number of keys carrier kills\n"));
-       print(_("^3losses^7                   Number of times a key was lost\n"));
-       print(_("^3laps^7                     Number of laps finished (race/cts)\n"));
-       print(_("^3time^7                     Total time raced (race/cts)\n"));
-       print(_("^3fastest^7                  Time of fastest lap (race/cts)\n"));
-       print(_("^3ticks^7                    Number of ticks (DOM)\n"));
-       print(_("^3takes^7                    Number of domination points taken (DOM)\n"));
-       print(_("^3bckills^7                  Number of ball carrier kills\n"));
-       print(_("^3bctime^7                   Total amount of time holding the ball in Keepaway\n"));
-       print(_("^3score^7                    Total score\n\n"));
-
-       print(_("Before a field you can put a + or - sign, then a comma separated list\n"
+       LOG_INFO(_("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"));
+       LOG_INFO(_("^3|---------------------------------------------------------------|\n"));
+       LOG_INFO(_("Usage:\n"));
+       LOG_INFO(_("^2scoreboard_columns_set default\n"));
+       LOG_INFO(_("^2scoreboard_columns_set ^7field1 field2 ...\n"));
+       LOG_INFO(_("The following field names are recognized (case insensitive):\n"));
+       LOG_INFO(_("You can use a ^3|^7 to start the right-aligned fields.\n\n"));
+
+       LOG_INFO(_("^3name^7 or ^3nick^7             Name of a player\n"));
+       LOG_INFO(_("^3ping^7                     Ping time\n"));
+       LOG_INFO(_("^3pl^7                       Packet loss\n"));
+       LOG_INFO(_("^3kills^7                    Number of kills\n"));
+       LOG_INFO(_("^3deaths^7                   Number of deaths\n"));
+       LOG_INFO(_("^3suicides^7                 Number of suicides\n"));
+       LOG_INFO(_("^3frags^7                    kills - suicides\n"));
+       LOG_INFO(_("^3kd^7                       The kill-death ratio\n"));
+       LOG_INFO(_("^3sum^7                      frags - deaths\n"));
+       LOG_INFO(_("^3caps^7                     How often a flag (CTF) or a key (KeyHunt) was captured\n"));
+       LOG_INFO(_("^3pickups^7                  How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
+       LOG_INFO(_("^3captime^7                  Time of fastest cap (CTF)\n"));
+       LOG_INFO(_("^3fckills^7                  Number of flag carrier kills\n"));
+       LOG_INFO(_("^3returns^7                  Number of flag returns\n"));
+       LOG_INFO(_("^3drops^7                    Number of flag drops\n"));
+       LOG_INFO(_("^3lives^7                    Number of lives (LMS)\n"));
+       LOG_INFO(_("^3rank^7                     Player rank\n"));
+       LOG_INFO(_("^3pushes^7                   Number of players pushed into void\n"));
+       LOG_INFO(_("^3destroyed^7                Number of keys destroyed by pushing them into void\n"));
+       LOG_INFO(_("^3kckills^7                  Number of keys carrier kills\n"));
+       LOG_INFO(_("^3losses^7                   Number of times a key was lost\n"));
+       LOG_INFO(_("^3laps^7                     Number of laps finished (race/cts)\n"));
+       LOG_INFO(_("^3time^7                     Total time raced (race/cts)\n"));
+       LOG_INFO(_("^3fastest^7                  Time of fastest lap (race/cts)\n"));
+       LOG_INFO(_("^3ticks^7                    Number of ticks (DOM)\n"));
+       LOG_INFO(_("^3takes^7                    Number of domination points taken (DOM)\n"));
+       LOG_INFO(_("^3bckills^7                  Number of ball carrier kills\n"));
+       LOG_INFO(_("^3bctime^7                   Total amount of time holding the ball in Keepaway\n"));
+       LOG_INFO(_("^3score^7                    Total score\n\n"));
+
+       LOG_INFO(_("Before a field you can put a + or - sign, then a comma separated list\n"
                "of game types, then a slash, to make the field show up only in these\n"
                "or in all but these game types. You can also specify 'all' as a\n"
                "field to show all fields available for the current game mode.\n\n"));
 
-       print(_("The special game type names 'teams' and 'noteams' can be used to\n"
+       LOG_INFO(_("The special game type names 'teams' and 'noteams' can be used to\n"
                "include/exclude ALL teams/noteams game modes.\n\n"));
 
-       print(_("Example: scoreboard_columns_set name ping pl | +ctf/field3 -dm/field4\n"));
-       print(_("will display name, ping and pl aligned to the left, and the fields\n"
+       LOG_INFO(_("Example: scoreboard_columns_set name ping pl | +ctf/field3 -dm/field4\n"));
+       LOG_INFO(_("will display name, ping and pl aligned to the left, and the fields\n"
                "right of the vertical bar aligned to the right.\n"));
-       print(_("'field3' will only be shown in CTF, and 'field4' will be shown in all\n"
+       LOG_INFO(_("'field3' will only be shown in CTF, and 'field4' will be shown in all\n"
                "other gamemodes except DM.\n"));
 }
 
 #define HUD_DefaultColumnLayout() \
 "ping pl name | " \
-"-teams,race,lms/kills +ft,tdm/kills -teams,lms/deaths +ft,tdm/deaths -teams,lms,race,ka/suicides +ft,tdm/suicides -race,dm,tdm,ka,ft/frags " /* tdm already has this in "score" */ \
+"-teams,rc,lms/kills +ft,tdm/kills -teams,lms/deaths +ft,tdm/deaths -teams,lms,rc,ka/suicides +ft,tdm/suicides -rc,dm,tdm,ka,ft/frags " /* tdm already has this in "score" */ \
 "+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns +ons/caps +ons/takes " \
 "+lms/lives +lms/rank " \
 "+kh/caps +kh/pushes +kh/destroyed " \
-"?+race/laps ?+race/time ?+race/fastest " \
+"?+rc/laps ?+rc/time ?+rc/fastest " \
 "+as/objectives +nb/faults +nb/goals +ka/pickups +ka/bckills +ka/bctime +ft/revivals " \
-"-lms,race,nb/score"
+"-lms,rc,nb/score"
 
 void Cmd_HUD_SetFields(float argc)
 {
@@ -386,41 +386,38 @@ void Cmd_HUD_SetFields(float argc)
                hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize);
                str = strtolower(str);
 
-               if(str == "ping") {
-                       hud_field[hud_num_fields] = SP_PING;
-               } else if(str == "pl") {
-                       hud_field[hud_num_fields] = SP_PL;
-               } else if(str == "kd" || str == "kdr" || str == "kdratio" || str == "k/d") {
-                       hud_field[hud_num_fields] = SP_KDRATIO;
-               } else if(str == "sum" || str == "diff" || str == "k-d") {
-                       hud_field[hud_num_fields] = SP_SUM;
-               } else if(str == "name" || str == "nick") {
-                       hud_field[hud_num_fields] = SP_NAME;
-                       have_name = 1;
-               } else if(str == "|") {
-                       hud_field[hud_num_fields] = SP_SEPARATOR;
-                       have_separator = 1;
-               } else {
-                       for(j = 0; j < MAX_SCORE; ++j)
-                               if(str == strtolower(scores_label[j]))
-                                       goto found; // sorry, but otherwise fteqcc -O3 miscompiles this and warns about "unreachable code"
-:notfound
-                       if(str == "frags")
-                       {
-                               j = SP_FRAGS;
-                       }
-                       else
+               switch(str)
+               {
+                       case "ping": hud_field[hud_num_fields] = SP_PING; break;
+                       case "pl": hud_field[hud_num_fields] = SP_PL; break;
+                       case "pl": hud_field[hud_num_fields] = SP_PL; break;
+                       case "kd": case "kdr": case "kdratio": case "k/d": hud_field[hud_num_fields] = SP_KDRATIO; break;
+                       case "sum": case "diff": case "k-d": hud_field[hud_num_fields] = SP_SUM; break;
+                       case "name": case "nick": hud_field[hud_num_fields] = SP_NAME; have_name = true; break;
+                       case "|": hud_field[hud_num_fields] = SP_SEPARATOR; have_separator = true; break;
+                       default:
                        {
-                               if (!nocomplain)
-                                       printf("^1Error:^7 Unknown score field: '%s'\n", str);
-                               continue;
-                       }
+                               for(j = 0; j < MAX_SCORE; ++j)
+                                       if(str == strtolower(scores_label[j]))
+                                               goto found; // sorry, but otherwise fteqcc -O3 miscompiles this and warns about "unreachable code"
+
+:notfound
+                               if(str == "frags")
+                                       j = SP_FRAGS;
+                               else
+                               {
+                                       if(!nocomplain)
+                                               LOG_INFOF("^1Error:^7 Unknown score field: '%s'\n", str);
+                                       continue;
+                               }
 :found
-                       hud_field[hud_num_fields] = j;
-                       if(j == ps_primary)
-                               have_primary = 1;
-                       if(j == ps_secondary)
-                               have_secondary = 1;
+                               hud_field[hud_num_fields] = j;
+                               if(j == ps_primary)
+                                       have_primary = 1;
+                               if(j == ps_secondary)
+                                       have_secondary = 1;
+
+                       }
                }
                ++hud_num_fields;
                if(hud_num_fields >= MAX_HUD_FIELDS)
@@ -449,7 +446,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_title[0] = strzone(TranslateScoresLabel("name"));
                        hud_field[0] = SP_NAME;
                        ++hud_num_fields;
-                       print("fixed missing field 'name'\n");
+                       LOG_INFO("fixed missing field 'name'\n");
 
                        if(!have_separator)
                        {
@@ -464,7 +461,7 @@ void Cmd_HUD_SetFields(float argc)
                                hud_field[1] = SP_SEPARATOR;
                                hud_size[1] = stringwidth("|", false, hud_fontsize);
                                ++hud_num_fields;
-                               print("fixed missing field '|'\n");
+                               LOG_INFO("fixed missing field '|'\n");
                        }
                }
                else if(!have_separator)
@@ -474,7 +471,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth("|", false, hud_fontsize);
                        hud_field[hud_num_fields] = SP_SEPARATOR;
                        ++hud_num_fields;
-                       print("fixed missing field '|'\n");
+                       LOG_INFO("fixed missing field '|'\n");
                }
                if(!have_secondary)
                {
@@ -483,7 +480,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize);
                        hud_field[hud_num_fields] = ps_secondary;
                        ++hud_num_fields;
-                       printf("fixed missing field '%s'\n", scores_label[ps_secondary]);
+                       LOG_INFOF("fixed missing field '%s'\n", scores_label[ps_secondary]);
                }
                if(!have_primary)
                {
@@ -492,7 +489,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize);
                        hud_field[hud_num_fields] = ps_primary;
                        ++hud_num_fields;
-                       printf("fixed missing field '%s'\n", scores_label[ps_primary]);
+                       LOG_INFOF("fixed missing field '%s'\n", scores_label[ps_primary]);
                }
        }
 
index 2b9dcd0a83840e80d9126196abb6185aa7cfb878..b95dd99e324773ab5f437e5ddcc7a5fe446aae48 100644 (file)
@@ -163,7 +163,7 @@ void Tuba_Precache()
        Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
        if (Tuba_PitchStep) {
                if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
-                       print("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
+                       LOG_INFO("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
                        Tuba_PitchStep = 0;
                }
        }
index 5a6b2fe15fb0f9081cb612478d4823bfce8c1880..701eb9f1e7419bb5328bcdd6e0651bd94b86e1c0 100644 (file)
@@ -131,6 +131,7 @@ vector GetCurrentFov(float fov)
 
        zoomdir = button_zoom;
        if(hud == HUD_NORMAL)
+       if(switchweapon == activeweapon)
        if((activeweapon == WEP_VORTEX.m_id && vortex_scope) || (activeweapon == WEP_RIFLE.m_id && rifle_scope)) // do NOT use switchweapon here
                zoomdir += button_attack2;
        if(spectatee_status > 0 || isdemo())
@@ -437,6 +438,8 @@ bool WantEventchase()
        {
                if(hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0))
                        return true;
+               if(MUTATOR_CALLHOOK(WantEventchase, self))
+                       return true;
                if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WepSet_FromWeapon(WEP_PORTO.m_id)))
                        return true;
                if(autocvar_cl_eventchase_death && (getstati(STAT_HEALTH) <= 0))
@@ -455,8 +458,6 @@ bool WantEventchase()
 
 vector damage_blurpostprocess, content_blurpostprocess;
 
-float checkfail[16];
-
 float unaccounted_damage = 0;
 void UpdateDamage()
 {
@@ -471,7 +472,7 @@ void UpdateDamage()
        if (damage_dealt_time != damage_dealt_time_prev)
        {
                unaccounted_damage += unaccounted_damage_new;
-               dprint("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")", "\n");
+               LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")", "\n");
        }
        damage_dealt_time_prev = damage_dealt_time;
 
@@ -511,7 +512,7 @@ void UpdateHitsound()
                                pitch_shift = mirror_value + (mirror_value - pitch_shift);
                        }
 
-                       dprint("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift), "\n");
+                       LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift), "\n");
 
                        // todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary
                        // todo: normalize sound pressure levels? seems unnecessary
@@ -1005,6 +1006,14 @@ void UpdateCrosshair()
        }
 }
 
+bool ov_enabled;
+float oldr_nearclip;
+float oldr_farclip_base;
+float oldr_farclip_world;
+float oldr_novis;
+float oldr_useportalculling;
+float oldr_useinfinitefarclip;
+
 const int BUTTON_3 = 4;
 const int BUTTON_4 = 8;
 float cl_notice_run();
@@ -1047,22 +1056,6 @@ void CSQC_UpdateView(float w, float h)
        button_attack2 = (input_buttons & BUTTON_3);
        button_zoom = (input_buttons & BUTTON_4);
 
-#define CHECKFAIL_ASSERT(flag,func,parm,val) do {                                                                   \
-       float checkfailv = (func)(parm);                                                                                \
-       if (checkfailv != (val)) {                                                                                      \
-               if (!checkfail[(flag)])                                                                                     \
-               localcmd(sprintf("\ncmd checkfail %s %s %d %d\n", #func, parm, val, checkfailv));                           \
-               checkfail[(flag)] = 1;                                                                                      \
-       }                                                                                                               \
-} while(0)
-       CHECKFAIL_ASSERT(0, cvar_type, "\{100}\{105}\{118}\{48}\{95}\{101}\{118}\{97}\{100}\{101}", 0);
-       CHECKFAIL_ASSERT(1, cvar_type, "\{97}\{97}\{95}\{101}\{110}\{97}\{98}\{108}\{101}", 0);
-       CHECKFAIL_ASSERT(2, cvar, "\{114}\{95}\{115}\{104}\{111}\{119}\{100}\{105}\{115}\{97}\{98}\{108}\{101}\{100}\{101}\{112}\{116}\{104}\{116}\{101}\{115}\{116}", 0);
-       CHECKFAIL_ASSERT(3, cvar, "\{114}\{95}\{115}\{104}\{111}\{119}\{111}\{118}\{101}\{114}\{100}\{114}\{97}\{119}", 0);
-       CHECKFAIL_ASSERT(4, cvar, "\{114}\{95}\{115}\{104}\{111}\{119}\{108}\{105}\{103}\{104}\{116}", 0);
-       CHECKFAIL_ASSERT(5, cvar, "\{114}\{95}\{115}\{104}\{111}\{119}\{115}\{104}\{97}\{100}\{111}\{119}\{118}\{111}\{108}\{117}\{109}\{101}\{115}", 0);
-       CHECKFAIL_ASSERT(6, cvar, "\{114}\{95}\{115}\{104}\{111}\{119}\{111}\{118}\{101}\{114}\{100}\{114}\{97}\{119}", 0);
-
        vf_size = getpropertyvec(VF_SIZE);
        vf_min = getpropertyvec(VF_MIN);
        vid_width = vf_size.x;
@@ -1247,6 +1240,16 @@ void CSQC_UpdateView(float w, float h)
                if((dist = vlen(vec3(ov_worldmax.x, ov_worldmin.y, ov_worldmax.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
                if((dist = vlen(vec3(ov_worldmax.x, ov_worldmax.y, ov_worldmax.z) - ov_org)) > ov_furthest) { ov_furthest = dist; }
 
+               if(!ov_enabled)
+               {
+                       oldr_nearclip = cvar("r_nearclip");
+                       oldr_farclip_base = cvar("r_farclip_base");
+                       oldr_farclip_world = cvar("r_farclip_world");
+                       oldr_novis = cvar("r_novis");
+                       oldr_useportalculling = cvar("r_useportalculling");
+                       oldr_useinfinitefarclip = cvar("r_useinfinitefarclip");
+               }
+
                cvar_settemp("r_nearclip", ftos(ov_nearest));
                cvar_settemp("r_farclip_base", ftos(ov_furthest));
                cvar_settemp("r_farclip_world", "0");
@@ -1257,8 +1260,10 @@ void CSQC_UpdateView(float w, float h)
                setproperty(VF_ORIGIN, ov_org);
                setproperty(VF_ANGLES, '90 0 0');
 
+               ov_enabled = true;
+
                #if 0
-               printf("OrthoView: org = %s, angles = %s, distance = %f, nearest = %f, furthest = %f\n",
+               LOG_INFOF("OrthoView: org = %s, angles = %s, distance = %f, nearest = %f, furthest = %f\n",
                        vtos(ov_org),
                        vtos(getpropertyvec(VF_ANGLES)),
                        ov_distance,
@@ -1266,6 +1271,19 @@ void CSQC_UpdateView(float w, float h)
                        ov_furthest);
                #endif
        }
+       else
+       {
+               if(ov_enabled)
+               {
+                       cvar_set("r_nearclip", ftos(oldr_nearclip));
+                       cvar_set("r_farclip_base", ftos(oldr_farclip_base));
+                       cvar_set("r_farclip_world", ftos(oldr_farclip_world));
+                       cvar_set("r_novis", ftos(oldr_novis));
+                       cvar_set("r_useportalculling", ftos(oldr_useportalculling));
+                       cvar_set("r_useinfinitefarclip", ftos(oldr_useinfinitefarclip));
+               }
+               ov_enabled = false;
+       }
 
        // Render the Scene
        view_origin = getpropertyvec(VF_ORIGIN);
index 12f1714bfb6aaedb808c4af86f17ec37bcc72490..7f8a08f00d9d2f53b85608d29dc7339910de6ee9 100644 (file)
@@ -279,43 +279,43 @@ void Ent_Projectile()
                self.traileffect = 0;
                switch(self.cnt)
                {
-                       case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); self.scale = 2; break;
-                       case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-                       case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-                       case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
-                       case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
-                       case PROJECTILE_MINE: setmodel(self, "models/mine.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
-                       case PROJECTILE_BLASTER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_PORTO_RED: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_WIZSPIKE"); self.scale = 4; break;
-                       case PROJECTILE_PORTO_BLUE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_WIZSPIKE"); self.scale = 4; break;
-                       case PROJECTILE_HOOKBOMB: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_KNIGHTSPIKE"); break;
-                       case PROJECTILE_HAGAR: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum("tr_hagar"); self.scale = 0.75; break;
-                       case PROJECTILE_HAGAR_BOUNCING: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum("tr_hagar"); self.scale = 0.75; break;
-                       case PROJECTILE_NAPALM_FOUNTAIN: //self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum("torch_small"); break;
-                       case PROJECTILE_FIREBALL: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum("fireball"); break; // particle effect is good enough
-                       case PROJECTILE_FIREMINE: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum("firemine"); break; // particle effect is good enough
-                       case PROJECTILE_TAG: setmodel(self, "models/laser.mdl"); self.traileffect = particleeffectnum("TR_ROCKET"); break;
-                       case PROJECTILE_FLAC: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; self.traileffect = particleeffectnum("TR_SEEKER"); break;
-                       case PROJECTILE_SEEKER: setmodel(self, "models/tagrocket.md3"); self.traileffect = particleeffectnum("TR_SEEKER"); break;
-
-                       case PROJECTILE_MAGE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum("TR_VORESPIKE"); break;
-                       case PROJECTILE_SHAMBLER_LIGHTNING: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-
-                       case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_RAPTORCANNON:  setmodel(self, "models/plasmatrail.mdl"); self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-
-                       case PROJECTILE_SPIDERROCKET: setmodel(self, "models/vehicles/rocket02.md3"); self.traileffect = particleeffectnum("spiderbot_rocket_thrust"); break;
-                       case PROJECTILE_WAKIROCKET:   setmodel(self, "models/vehicles/rocket01.md3");  self.traileffect = particleeffectnum("wakizashi_rocket_thrust"); break;
-                       case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(""); break;
-
-                       case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-
-                       case PROJECTILE_RPC: setmodel(self, W_Model("ok_rocket"));self.traileffect = particleeffectnum("TR_ROCKET"); break;
+                       case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+                       case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum(EFFECT_TR_ROCKET); self.scale = 2; break;
+                       case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
+                       case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
+                       case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+                       case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
+                       case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
+                       case PROJECTILE_MINE: setmodel(self, "models/mine.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
+                       case PROJECTILE_BLASTER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_PORTO_RED: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE); self.scale = 4; break;
+                       case PROJECTILE_PORTO_BLUE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE); self.scale = 4; break;
+                       case PROJECTILE_HOOKBOMB: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_KNIGHTSPIKE); break;
+                       case PROJECTILE_HAGAR: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum(EFFECT_HAGAR_ROCKET); self.scale = 0.75; break;
+                       case PROJECTILE_HAGAR_BOUNCING: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum(EFFECT_HAGAR_ROCKET); self.scale = 0.75; break;
+                       case PROJECTILE_NAPALM_FOUNTAIN: //self.model = ""; self.modelindex = 0; self.traileffect = _particleeffectnum("torch_small"); break;
+                       case PROJECTILE_FIREBALL: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum(EFFECT_FIREBALL); break; // particle effect is good enough
+                       case PROJECTILE_FIREMINE: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum(EFFECT_FIREMINE); break; // particle effect is good enough
+                       case PROJECTILE_TAG: setmodel(self, "models/laser.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_ROCKET); break;
+                       case PROJECTILE_FLAC: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; self.traileffect = particleeffectnum(EFFECT_FLAC_TRAIL); break;
+                       case PROJECTILE_SEEKER: setmodel(self, "models/tagrocket.md3"); self.traileffect = particleeffectnum(EFFECT_SEEKER_TRAIL); break;
+
+                       case PROJECTILE_MAGE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_VORESPIKE); break;
+                       case PROJECTILE_SHAMBLER_LIGHTNING: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+
+                       case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_RAPTORCANNON:  setmodel(self, "models/plasmatrail.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
+
+                       case PROJECTILE_SPIDERROCKET: setmodel(self, "models/vehicles/rocket02.md3"); self.traileffect = particleeffectnum(EFFECT_SPIDERBOT_ROCKET_TRAIL); break;
+                       case PROJECTILE_WAKIROCKET:   setmodel(self, "models/vehicles/rocket01.md3");  self.traileffect = particleeffectnum(EFFECT_RACER_ROCKET_TRAIL); break;
+                       case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(EFFECT_NULL); break;
+
+                       case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+                       case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+
+                       case PROJECTILE_RPC: setmodel(self, W_Model("ok_rocket"));self.traileffect = particleeffectnum(EFFECT_TR_ROCKET); break;
 
                        default:
                                if(MUTATOR_CALLHOOK(Ent_Projectile, self))
@@ -323,8 +323,8 @@ void Ent_Projectile()
 
                                if (Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
                                {
-                                       setmodel(self, W_Model("v_ok_grenade"));
-                                       self.traileffect = particleeffectnum(Nade_TrailEffect(self.cnt, self.team));
+                                       setmodel(self, W_Model("v_ok_grenade.md3"));
+                                       self.traileffect = _particleeffectnum(Nade_TrailEffect(self.cnt, self.team));
                                        break;
                                }
                                error("Received invalid CSQC projectile, can't work with this!");
@@ -516,8 +516,8 @@ void Projectile_Precache()
        precache_model("models/tracer.mdl");
        precache_model("models/sphere/sphere.md3");
 
-       precache_model(W_Model("v_ok_grenade"));
-       precache_model(W_Model("ok_rocket"));
+       precache_model(W_Model("v_ok_grenade.md3"));
+       precache_model(W_Model("ok_rocket.md3"));
 
        precache_sound(W_Sound("electro_fly"));
        precache_sound(W_Sound("rocket_fly"));
index 0cba5d7f38b4d49b54f5d779e087571fe1bb7399..8a624aa2aa98d2c6dc1e966d9fc088dbaa1e07e7 100644 (file)
     #include "../server/defs.qh"
 #endif
 
-// 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;
-.float animdecide_modelindex;
+bool monsters_animoverride(entity e)
+{
+       int monster_id = 0;
+       for(int i = MON_FIRST; i <= MON_LAST; ++i)
+       {
+               entity mon = get_monsterinfo(i);
+
+               //if(substring(e.model, 0, strlen(mon.model) - 4) == substring(mon.model, 0, strlen(mon.model) - 4))
+               if(e.model == mon.model)
+               {
+                       monster_id = i;
+                       break;
+               }
+       }
+
+       if(!monster_id) { return false; }
+
+       MON_ACTION(monster_id, MR_ANIM);
+
+       vector none = '0 0 0';
+       e.anim_duckwalk = e.anim_walk;
+       e.anim_duckjump = animfixfps(e, '5 1 10', none);
+       e.anim_duckidle = e.anim_idle;
+       e.anim_jump = animfixfps(e, '8 1 10', none);
+       e.anim_taunt = animfixfps(e, '12 1 0.33', none);
+       e.anim_runbackwards = e.anim_run;
+       e.anim_strafeleft = e.anim_run;
+       e.anim_straferight = e.anim_run;
+       e.anim_forwardright = e.anim_run;
+       e.anim_forwardleft = e.anim_run;
+       e.anim_backright = e.anim_run;
+       e.anim_backleft  = e.anim_run;
+       e.anim_duckwalkbackwards = e.anim_walk;
+       e.anim_duckwalkstrafeleft = e.anim_walk;
+       e.anim_duckwalkstraferight = e.anim_walk;
+       e.anim_duckwalkforwardright = e.anim_walk;
+       e.anim_duckwalkforwardleft = e.anim_walk;
+       e.anim_duckwalkbackright = e.anim_walk;
+       e.anim_duckwalkbackleft  = e.anim_walk;
+
+       // these anims ought to stay until stopped explicitly by weaponsystem
+       e.anim_shoot_z = 0.001;
+       e.anim_melee_z = 0.001;
+
+       return true;
+}
 
 void animdecide_load_if_needed(entity e)
 {
@@ -52,6 +63,12 @@ void animdecide_load_if_needed(entity e)
                return;
        e.animdecide_modelindex = e.modelindex;
 
+       if(substring(e.model, 0, 16) == "models/monsters/")
+       {
+               if(monsters_animoverride(e))
+                       return;
+       }
+
        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
index 9dc7cf7dbd0dd6273a655cb938f185e383c7d6e2..f1bdcb7e94838788655c19994311ddd033523041 100644 (file)
@@ -8,6 +8,42 @@ 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);
 
+// 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;
+.float animdecide_modelindex;
+
 // please network this one
 .int anim_state;
 .float anim_time;
index 14bc58947a3660cf9e9d8448421559961766c142..0c8f85816f124f2668255db78a3872a8bb81b033 100644 (file)
@@ -50,7 +50,7 @@ void Curl_URI_Get_Callback(int id, float status, string data)
        string do_cvar = curl_uri_get_cvar[i];
        if(status != 0)
        {
-               dprintf("error: status is %d\n", status);
+               LOG_TRACEF("error: status is %d\n", status);
                if(do_cvar)
                        strunzone(do_cvar);
                return;
@@ -64,7 +64,7 @@ void Curl_URI_Get_Callback(int id, float status, string data)
        }
        if(!do_exec)
                if (!do_cvar)
-                       print(data);
+                       LOG_INFO(data);
 }
 
 
@@ -102,12 +102,12 @@ void GenericCommand_addtolist(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2addtolist^7\n");
+                       LOG_INFO("Incorrect parameters for ^2addtolist^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n"));
-                       print("  Where 'variable' is what to add 'value' to.\n");
-                       print("See also: ^2removefromlist^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n"));
+                       LOG_INFO("  Where 'variable' is what to add 'value' to.\n");
+                       LOG_INFO("See also: ^2removefromlist^7\n");
                        return;
                }
        }
@@ -169,7 +169,7 @@ void GenericCommand_qc_curl(float request, float argc)
                                curl_uri_get_pos = (curl_uri_get_pos + 1) % (URI_GET_CURL_END - URI_GET_CURL + 1);
                        }
                        else
-                               print(_("error creating curl handle\n"));
+                               LOG_INFO(_("error creating curl handle\n"));
 
                        buf_del(buf);
 
@@ -179,7 +179,7 @@ void GenericCommand_qc_curl(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"));
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"));
                        return;
                }
        }
@@ -219,13 +219,13 @@ void GenericCommand_dumpcommands(float request)
                                CMD_Write("\ndump of generic commands:\n");
                                GenericCommand_macro_write_aliases(fh);
 
-                               print("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.\n");
+                               LOG_INFO("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.\n");
 
                                fclose(fh);
                        }
                        else
                        {
-                               print("^1Error: ^7Could not dump to file!\n");
+                               LOG_INFO("^1Error: ^7Could not dump to file!\n");
                        }
                        return;
                }
@@ -233,8 +233,8 @@ void GenericCommand_dumpcommands(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpcommands"));
-                       print("  No arguments required.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpcommands"));
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -253,7 +253,7 @@ void GenericCommand_dumpitems(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       printf("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
+                       LOG_INFOF("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
                        return;
                }
        }
@@ -284,15 +284,15 @@ void GenericCommand_dumpnotifs(float request)
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
-                               printf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename);
+                               LOG_INFOF("Dumping notifications... File located in ^2data/data/%s^7.\n", filename);
                                fclose(fh);
                        }
                        else
                        {
-                               printf("^1Error: ^7Could not open file '%s'!\n", filename);
+                               LOG_INFOF("^1Error: ^7Could not open file '%s'!\n", filename);
                        }
                        #else
-                       print(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
+                       LOG_INFO(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -300,10 +300,10 @@ void GenericCommand_dumpnotifs(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
-                       print("  Where 'filename' is the file to write (default is notifications_dump.cfg),\n");
-                       print("  if supplied with '-' output to console as well as default,\n");
-                       print("  if left blank, it will only write to default.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
+                       LOG_INFO("  Where 'filename' is the file to write (default is notifications_dump.cfg),\n");
+                       LOG_INFO("  if supplied with '-' output to console as well as default,\n");
+                       LOG_INFO("  if left blank, it will only write to default.\n");
                        return;
                }
        }
@@ -335,17 +335,17 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit
                        if(wep_config_file >= 0)
                        {
                                Dump_Weapon_Settings();
-                               print(sprintf("Dumping weapons... File located in ^2data/data/%s^7.\n", filename));
+                               LOG_INFO(sprintf("Dumping weapons... File located in ^2data/data/%s^7.\n", filename));
                                fclose(wep_config_file);
                                wep_config_file = -1;
                                wep_config_alsoprint = -1;
                        }
                        else
                        {
-                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                               LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
                        }
                        #else
-                       print(_("Weapons dump command only works with sv_cmd.\n"));
+                       LOG_INFO(_("Weapons dump command only works with sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -353,10 +353,10 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"));
-                       print("  Where 'filename' is the file to write (default is weapons_dump.cfg),\n");
-                       print("  if supplied with '-' output to console as well as default,\n");
-                       print("  if left blank, it will only write to default.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"));
+                       LOG_INFO("  Where 'filename' is the file to write (default is weapons_dump.cfg),\n");
+                       LOG_INFO("  if supplied with '-' output to console as well as default,\n");
+                       LOG_INFO("  if left blank, it will only write to default.\n");
                        return;
                }
        }
@@ -388,17 +388,17 @@ void GenericCommand_dumpturrets(float request)
                        if(tur_config_file >= 0)
                        {
                                Dump_Turret_Settings();
-                               print(sprintf("Dumping turrets... File located in ^2data/data/%s^7.\n", filename));
+                               LOG_INFO(sprintf("Dumping turrets... File located in ^2data/data/%s^7.\n", filename));
                                fclose(tur_config_file);
                                tur_config_file = -1;
                                tur_config_alsoprint = -1;
                        }
                        else
                        {
-                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                               LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
                        }
                        #else
-                       print(_("Turrets dump command only works with sv_cmd.\n"));
+                       LOG_INFO(_("Turrets dump command only works with sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -406,10 +406,10 @@ void GenericCommand_dumpturrets(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]"));
-                       print("  Where 'filename' is the file to write (default is turrets_dump.cfg),\n");
-                       print("  if supplied with '-' output to console as well as default,\n");
-                       print("  if left blank, it will only write to default.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]"));
+                       LOG_INFO("  Where 'filename' is the file to write (default is turrets_dump.cfg),\n");
+                       LOG_INFO("  if supplied with '-' output to console as well as default,\n");
+                       LOG_INFO("  if left blank, it will only write to default.\n");
                        return;
                }
        }
@@ -432,7 +432,7 @@ void GenericCommand_maplist(float request, float argc)
                                        {
                                                if (!fexists(strcat("maps/", argv(2), ".bsp")))
                                                {
-                                                       print("maplist: ERROR: ", argv(2), " does not exist!\n");
+                                                       LOG_INFO("maplist: ERROR: ", argv(2), " does not exist!\n");
                                                        break;
                                                }
 
@@ -493,13 +493,13 @@ void GenericCommand_maplist(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2maplist^7\n");
+                       LOG_INFO("Incorrect parameters for ^2maplist^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n"));
-                       print("  Where 'action' is the command to complete,\n");
-                       print("  and 'map' is what it acts upon (if required).\n");
-                       print("  Full list of commands here: \"add, cleanup, remove, shuffle.\"\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n"));
+                       LOG_INFO("  Where 'action' is the command to complete,\n");
+                       LOG_INFO("  and 'map' is what it acts upon (if required).\n");
+                       LOG_INFO("  Full list of commands here: \"add, cleanup, remove, shuffle.\"\n");
                        return;
                }
        }
@@ -518,8 +518,8 @@ void GenericCommand_nextframe(float request, float arguments, string command)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n"));
-                       print("  Where command will be executed next frame of this VM\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n"));
+                       LOG_INFO("  Where command will be executed next frame of this VM\n");
                        return;
                }
        }
@@ -553,12 +553,12 @@ void GenericCommand_removefromlist(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2removefromlist^7\n");
+                       LOG_INFO("Incorrect parameters for ^2removefromlist^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n"));
-                       print("  Where 'variable' is what cvar to remove 'value' from.\n");
-                       print("See also: ^2addtolist^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n"));
+                       LOG_INFO("  Where 'variable' is what cvar to remove 'value' from.\n");
+                       LOG_INFO("See also: ^2addtolist^7\n");
                        return;
                }
        }
@@ -571,7 +571,7 @@ void GenericCommand_restartnotifs(float request)
                case CMD_REQUEST_COMMAND:
                {
                        #ifndef MENUQC
-                       printf(
+                       LOG_INFOF(
                                strcat(
                                        "Restart_Notifications(): Restarting %d notifications... ",
                                        "Counts: MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d\n"
@@ -592,7 +592,7 @@ void GenericCommand_restartnotifs(float request)
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else
-                       print(_("Notification restart command only works with cl_cmd and sv_cmd.\n"));
+                       LOG_INFO(_("Notification restart command only works with cl_cmd and sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -600,8 +600,8 @@ void GenericCommand_restartnotifs(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " restartnotifs"));
-                       print("  No arguments required.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " restartnotifs"));
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -617,9 +617,9 @@ void GenericCommand_settemp(float request, float argc)
                        {
                                float f = cvar_settemp(argv(1), argv(2));
                                if(f == 1)
-                                       dprint("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily.\n");
+                                       LOG_TRACE("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily.\n");
                                else if(f == -1)
-                                       dprint("Already had a tracker for ", argv(1), ", updating it to \"", argv(2), "\".\n");
+                                       LOG_TRACE("Already had a tracker for ", argv(1), ", updating it to \"", argv(2), "\".\n");
                                // else cvar_settemp itself errors out
 
                                return;
@@ -627,12 +627,12 @@ void GenericCommand_settemp(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2settemp^7\n");
+                       LOG_INFO("Incorrect parameters for ^2settemp^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\"\n"));
-                       print("  Where 'cvar' is the cvar you want to temporarily set with 'arguments'.\n");
-                       print("See also: ^2settemp_restore^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\"\n"));
+                       LOG_INFO("  Where 'cvar' is the cvar you want to temporarily set with 'arguments'.\n");
+                       LOG_INFO("See also: ^2settemp_restore^7\n");
                        return;
                }
        }
@@ -647,9 +647,9 @@ void GenericCommand_settemp_restore(float request, float argc)
                        float i = cvar_settemp_restore();
 
                        if(i)
-                               dprint("Restored ", ftos(i), " temporary cvar settings to their original values.\n");
+                               LOG_TRACE("Restored ", ftos(i), " temporary cvar settings to their original values.\n");
                        else
-                               dprint("Nothing to restore.\n");
+                               LOG_TRACE("Nothing to restore.\n");
 
                        return;
                }
@@ -657,9 +657,9 @@ void GenericCommand_settemp_restore(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp_restore\n"));
-                       print("  No arguments required.\n");
-                       print("See also: ^2settemp^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp_restore\n"));
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2settemp^7\n");
                        return;
                }
        }
@@ -685,7 +685,7 @@ void GenericCommand_runtest(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " [function to run]"));
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " [function to run]"));
                        return;
                }
        }
@@ -740,7 +740,7 @@ void GenericCommand_(float request)
 void GenericCommand_macro_help()
 {
        #define GENERIC_COMMAND(name,function,description) \
-               { print("  ^2", name, "^7: ", description, "\n"); }
+               { LOG_INFO("  ^2", name, "^7: ", description, "\n"); }
 
        GENERIC_COMMANDS(0, 0, "");
        #undef GENERIC_COMMAND
index c975f98ea988418b5d13501f7cb0b3f109bad3d9..1ca075bbbdf1f614652985039cf575182f13a149 100644 (file)
@@ -13,7 +13,7 @@ string rpn_pop()
                --rpn_sp;
                return rpn_stack[rpn_sp];
        } else {
-               print("rpn: stack underflow\n");
+               LOG_INFO("rpn: stack underflow\n");
                rpn_error = true;
                return "";
        }
@@ -24,7 +24,7 @@ void rpn_push(string s)
                rpn_stack[rpn_sp] = s;
                ++rpn_sp;
        } else {
-               print("rpn: stack overflow\n");
+               LOG_INFO("rpn: stack overflow\n");
                rpn_error = true;
        }
 }
@@ -33,7 +33,7 @@ string rpn_get()
        if(rpn_sp > 0) {
                return rpn_stack[rpn_sp - 1];
        } else {
-               print("rpn: empty stack\n");
+               LOG_INFO("rpn: empty stack\n");
                rpn_error = true;
                return "";
        }
@@ -43,7 +43,7 @@ void rpn_set(string s)
        if(rpn_sp > 0) {
                rpn_stack[rpn_sp - 1] = s;
        } else {
-               print("rpn: empty stack\n");
+               LOG_INFO("rpn: empty stack\n");
                rpn_error = true;
        }
 }
@@ -107,7 +107,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                }
                                                else
                                                {
-                                                       print("rpn: empty cvar name for 'def'\n");
+                                                       LOG_INFO("rpn: empty cvar name for 'def'\n");
                                                        rpn_error = true;
                                                }
                                        } else if(rpncmd == "defs" || rpncmd == "@") {
@@ -132,7 +132,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                }
                                                else
                                                {
-                                                       print("rpn: empty cvar name for 'defs'\n");
+                                                       LOG_INFO("rpn: empty cvar name for 'defs'\n");
                                                        rpn_error = true;
                                                }
                                        } else if(rpncmd == "load") {
@@ -288,7 +288,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                                db_put(rpn_db, "stack.pos", ftos(i-2));
                                                } else {
                                                        rpn_error = 1;
-                                                       print("rpn: database underflow\n");
+                                                       LOG_INFO("rpn: database underflow\n");
                                                }
                                        } else if(rpncmd == "dbget") {
 
@@ -298,7 +298,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        rpn_push(db_get(rpn_db, strcat("stack.", ftos(i-1))));
                                                } else {
                                                        rpn_error = 1;
-                                                       print("rpn: database empty\n");
+                                                       LOG_INFO("rpn: database empty\n");
                                                }
                                        } else if(rpncmd == "dblen") {
                                                rpn_push(db_get(rpn_db, "stack.pointer"));
@@ -347,7 +347,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                if(!j)
                                                {
                                                        rpn_error = true;
-                                                       print("rpn: empty database\n");
+                                                       LOG_INFO("rpn: empty database\n");
                                                } else {
                                                        --j;
                                                        rpn_push(db_get(rpn_db, strcat("stack.", ftos(i))));
@@ -372,7 +372,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        rpn_push(db_get(rpn_db, strcat("stack.", s)));
                                                } else {
                                                        rpn_error = 1;
-                                                       print("rpn: empty database\n");
+                                                       LOG_INFO("rpn: empty database\n");
                                                }
                                        } else if(rpncmd == "dbat") {
                                                rpn_push(db_get(rpn_db, "stack.pos"));
@@ -384,7 +384,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                {
                                                        if(i < 0 || i >= j)
                                                        {
-                                                               print("rpn: database cursor out of bounds\n");
+                                                               LOG_INFO("rpn: database cursor out of bounds\n");
                                                                rpn_error = true;
                                                        }
                                                        if(!rpn_error)
@@ -398,7 +398,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                if(!j)
                                                {
                                                        rpn_error = true;
-                                                       print("rpn: empty database, cannot move cursor\n");
+                                                       LOG_INFO("rpn: empty database, cannot move cursor\n");
                                                }
                                                if(!rpn_error)
                                                {
@@ -412,7 +412,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        j = stof(db_get(rpn_db, "stack.pointer"));
                                                        if(i < 0 || i >= j)
                                                        {
-                                                               print("rpn: database cursor destination out of bounds\n");
+                                                               LOG_INFO("rpn: database cursor destination out of bounds\n");
                                                                rpn_error = true;
                                                        }
                                                        if(!rpn_error)
@@ -514,7 +514,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                {
                                                        if (!fexists(s))
                                                        {
-                                                               print("rpn: ERROR: ", s, " does not exist!\n");
+                                                               LOG_INFO("rpn: ERROR: ", s, " does not exist!\n");
                                                                rpn_error = true;
                                                        }
                                                }
@@ -553,7 +553,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                while(rpn_sp > 0)
                                {
                                        s = rpn_pop();
-                                       print("rpn: still on stack: ", s, "\n");
+                                       LOG_INFO("rpn: still on stack: ", s, "\n");
                                }
                        }
 
@@ -563,42 +563,42 @@ void GenericCommand_rpn(float request, float argc, string command)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION...\n"));
-                       print("    Operator description (x: string, s: set, f: float):\n");
-                       print("    x pop ----------------------------->     : removes the top\n");
-                       print("    x dup -----------------------------> x x : duplicates the top\n");
-                       print("    x x exch --------------------------> x x : swap the top two\n");
-                       print("    /cvarname load --------------------> x   : loads a cvar\n");
-                       print("    /cvarname x def ------------------->     : writes to a cvar\n");
-                       print("    f f add|sub|mul|div|mod|pow -------> f   : adds/... two numbers\n");
-                       print("    f f and|or|xor|bitand|bitor|bitxor > f   : logical and bitwise operations\n");
-                       print("    f f eq|ne|gt|ge|lt|le|max|min -----> f   : compares two numbers\n");
-                       print("    f neg|abs|sgn|rand|floor|ceil------> f   : negates/... a number\n");
-                       print("    f not|bitnot ----------------------> f   : logical and bitwise negation\n");
-                       print("    f exp|log|sin|cos -----------------> f   : exponential function & Co.\n");
-                       print("    f f f bound -----------------------> f   : bounds the middle number\n");
-                       print("    f1 f2 b when ----------------------> f   : f1 if b, f2 otherwise\n");
-                       print("    s s union|intersection|difference -> s   : set operations\n");
-                       print("    s shuffle -------------------------> s   : randomly arrange elements\n");
-                       print("    /key /value put ------------------->     : set a database key\n");
-                       print("    /key get --------------------------> s   : get a database value\n");
-                       print("    x dbpush -------------------------->     : pushes the top onto the database\n");
-                       print("    dbpop|dbget -----------------------> x   : removes/reads DB's top\n");
-                       print("    dblen|dbat ------------------------> f   : gets the DB's size/cursor pos\n");
-                       print("    dbclr ----------------------------->     : clear the DB\n");
-                       print("    s dbsave|dbload-------------------->     : save/load the DB to/from a file\n");
-                       print("    x dbins --------------------------->     : moves the top into the DB\n");
-                       print("    dbext|dbread ----------------------> x   : extract/get from the DB's cursor\n");
-                       print("    f dbmov|dbgoto -------------------->     : move or set the DB's cursor\n");
-                       print("    s localtime -----------------------> s   : formats the current local time\n");
-                       print("    s gmtime --------------------------> s   : formats the current UTC time\n");
-                       print("    time ------------------------------> f   : seconds since VM start\n");
-                       print("    s /MD4 digest ---------------------> s   : MD4 digest\n");
-                       print("    s /SHA256 digest ------------------> s   : SHA256 digest\n");
-                       print("    s /formatstring sprintf1s ---------> s   : sprintf with 1 string (pad, cut)\n");
-                       print("    s eval ---------------------------->     : does something eval\n");
-                       print("    Set operations operate on 'such''strings'.\n");
-                       print("    Unknown tokens insert their cvar value.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION...\n"));
+                       LOG_INFO("    Operator description (x: string, s: set, f: float):\n");
+                       LOG_INFO("    x pop ----------------------------->     : removes the top\n");
+                       LOG_INFO("    x dup -----------------------------> x x : duplicates the top\n");
+                       LOG_INFO("    x x exch --------------------------> x x : swap the top two\n");
+                       LOG_INFO("    /cvarname load --------------------> x   : loads a cvar\n");
+                       LOG_INFO("    /cvarname x def ------------------->     : writes to a cvar\n");
+                       LOG_INFO("    f f add|sub|mul|div|mod|pow -------> f   : adds/... two numbers\n");
+                       LOG_INFO("    f f and|or|xor|bitand|bitor|bitxor > f   : logical and bitwise operations\n");
+                       LOG_INFO("    f f eq|ne|gt|ge|lt|le|max|min -----> f   : compares two numbers\n");
+                       LOG_INFO("    f neg|abs|sgn|rand|floor|ceil------> f   : negates/... a number\n");
+                       LOG_INFO("    f not|bitnot ----------------------> f   : logical and bitwise negation\n");
+                       LOG_INFO("    f exp|log|sin|cos -----------------> f   : exponential function & Co.\n");
+                       LOG_INFO("    f f f bound -----------------------> f   : bounds the middle number\n");
+                       LOG_INFO("    f1 f2 b when ----------------------> f   : f1 if b, f2 otherwise\n");
+                       LOG_INFO("    s s union|intersection|difference -> s   : set operations\n");
+                       LOG_INFO("    s shuffle -------------------------> s   : randomly arrange elements\n");
+                       LOG_INFO("    /key /value put ------------------->     : set a database key\n");
+                       LOG_INFO("    /key get --------------------------> s   : get a database value\n");
+                       LOG_INFO("    x dbpush -------------------------->     : pushes the top onto the database\n");
+                       LOG_INFO("    dbpop|dbget -----------------------> x   : removes/reads DB's top\n");
+                       LOG_INFO("    dblen|dbat ------------------------> f   : gets the DB's size/cursor pos\n");
+                       LOG_INFO("    dbclr ----------------------------->     : clear the DB\n");
+                       LOG_INFO("    s dbsave|dbload-------------------->     : save/load the DB to/from a file\n");
+                       LOG_INFO("    x dbins --------------------------->     : moves the top into the DB\n");
+                       LOG_INFO("    dbext|dbread ----------------------> x   : extract/get from the DB's cursor\n");
+                       LOG_INFO("    f dbmov|dbgoto -------------------->     : move or set the DB's cursor\n");
+                       LOG_INFO("    s localtime -----------------------> s   : formats the current local time\n");
+                       LOG_INFO("    s gmtime --------------------------> s   : formats the current UTC time\n");
+                       LOG_INFO("    time ------------------------------> f   : seconds since VM start\n");
+                       LOG_INFO("    s /MD4 digest ---------------------> s   : MD4 digest\n");
+                       LOG_INFO("    s /SHA256 digest ------------------> s   : SHA256 digest\n");
+                       LOG_INFO("    s /formatstring sprintf1s ---------> s   : sprintf with 1 string (pad, cut)\n");
+                       LOG_INFO("    s eval ---------------------------->     : does something eval\n");
+                       LOG_INFO("    Set operations operate on 'such''strings'.\n");
+                       LOG_INFO("    Unknown tokens insert their cvar value.\n");
                        return;
                }
        }
diff --git a/qcsrc/common/effects.inc b/qcsrc/common/effects.inc
new file mode 100644 (file)
index 0000000..8cd4d49
--- /dev/null
@@ -0,0 +1,189 @@
+// Global list of effects, networked to CSQC by ID to save bandwidth and to use client particle numbers (allows mismatching effectinfos to some degree)
+// Not too concerned about the order of this list, just keep the weapon effects together!
+
+// EFFECT(istrail, EFFECT_NAME,     "effectinfo_string")
+EFFECT(0, EXPLOSION_SMALL,          "explosion_small")
+EFFECT(0, EXPLOSION_MEDIUM,         "explosion_medium")
+EFFECT(0, EXPLOSION_BIG,            "explosion_big")
+
+EFFECT(0, SMOKE_SMALL,              "smoke_small")
+EFFECT(0, SMOKE_LARGE,              "smoke_large")
+
+
+
+EFFECT(0, BLASTER_IMPACT,           "laser_impact")
+EFFECT(0, BLASTER_MUZZLEFLASH,      "laser_muzzleflash")
+
+EFFECT(0, SHOTGUN_IMPACT,           "shotgun_impact")
+EFFECT(0, SHOTGUN_MUZZLEFLASH,      "shotgun_muzzleflash")
+
+EFFECT(0, ARC_BEAM,                 "arc_beam")
+EFFECT(0, ARC_BEAM_HEAL,            "arc_beam_heal")
+EFFECT(0, ARC_BEAM_HEAL_IMPACT,     "arc_beam_healimpact")
+EFFECT(0, ARC_BEAM_HEAL_IMPACT2,    "healray_impact")
+EFFECT(0, ARC_LIGHTNING,            "arc_lightning")
+EFFECT(0, ARC_LIGHTNING2,           "electro_lightning")
+
+EFFECT(0, MACHINEGUN_IMPACT,        "machinegun_impact")
+EFFECT(0, MACHINEGUN_MUZZLEFLASH,   "uzi_muzzleflash")
+
+EFFECT(0, GRENADE_EXPLODE,          "grenade_explode")
+EFFECT(0, GRENADE_MUZZLEFLASH,      "grenadelauncher_muzzleflash")
+
+EFFECT(0, ELECTRO_BALLEXPLODE,      "electro_ballexplode")
+EFFECT(0, ELECTRO_COMBO,            "electro_combo")
+EFFECT(0, ELECTRO_IMPACT,           "electro_impact")
+EFFECT(0, ELECTRO_MUZZLEFLASH,      "electro_muzzleflash")
+
+EFFECT(0, CRYLINK_IMPACT,           "crylink_impactbig")
+EFFECT(0, CRYLINK_IMPACT2,          "crylink_impact")
+EFFECT(0, CRYLINK_JOINEXPLODE,      "crylink_joinexplode")
+EFFECT(0, CRYLINK_MUZZLEFLASH,      "crylink_muzzleflash")
+
+EFFECT(0, VORTEX_BEAM,              "nex_beam")
+EFFECT(0, VORTEX_BEAM_OLD,          "TE_TEI_G3")
+EFFECT(0, VORTEX_IMPACT,            "nex_impact")
+EFFECT(0, VORTEX_MUZZLEFLASH,       "nex_muzzleflash")
+
+EFFECT(1, VAPORIZER_RED,            "TE_TEI_G3RED")
+EFFECT(1, VAPORIZER_RED_HIT,        "TE_TEI_G3RED_HIT")
+EFFECT(1, VAPORIZER_BLUE,           "TE_TEI_G3BLUE")
+EFFECT(1, VAPORIZER_BLUE_HIT,       "TE_TEI_G3BLUE_HIT")
+EFFECT(1, VAPORIZER_YELLOW,         "TE_TEI_G3YELLOW")
+EFFECT(1, VAPORIZER_YELLOW_HIT,     "TE_TEI_G3YELLOW_HIT")
+EFFECT(1, VAPORIZER_PINK,           "TE_TEI_G3PINK")
+EFFECT(1, VAPORIZER_PINK_HIT,       "TE_TEI_G3PINK_HIT")
+EFFECT(1, VAPORIZER_NEUTRAL,        "TE_TEI_G3")
+EFFECT(1, VAPORIZER_NEUTRAL_HIT,    "TE_TEI_G3_HIT")
+
+EFFECT(0, RIFLE_IMPACT,             "machinegun_impact")
+EFFECT(0, RIFLE_MUZZLEFLASH,        "rifle_muzzleflash")
+EFFECT(1, RIFLE,                    "tr_rifle")
+EFFECT(1, RIFLE_WEAK,               "tr_rifle_weak")
+
+EFFECT(0, HAGAR_BOUNCE,             "hagar_bounce")
+EFFECT(0, HAGAR_EXPLODE,            "hagar_explode")
+EFFECT(0, HAGAR_MUZZLEFLASH,        "hagar_muzzleflash")
+EFFECT(1, HAGAR_ROCKET,             "tr_hagar")
+
+EFFECT(0, ROCKET_EXPLODE,           "rocket_explode")
+EFFECT(0, ROCKET_GUIDE,             "rocket_guide")
+EFFECT(0, ROCKET_MUZZLEFLASH,       "rocketlauncher_muzzleflash")
+
+EFFECT(0, HOOK_EXPLODE,             "hookbomb_explode")
+EFFECT(0, HOOK_IMPACT,              "grapple_impact")
+EFFECT(0, HOOK_MUZZLEFLASH,         "grapple_muzzleflash")
+
+EFFECT(0, SEEKER_MUZZLEFLASH,       "seeker_muzzleflash")
+
+EFFECT(0, FLAK_BOUNCE,              "flak_bounce")
+
+EFFECT(1, FIREBALL,                 "fireball")
+EFFECT(0, FIREBALL_BFGDAMAGE,       "fireball_bfgdamage")
+EFFECT(0, FIREBALL_EXPLODE,         "fireball_explode")
+EFFECT(0, FIREBALL_LASER,           "fireball_laser")
+EFFECT(0, FIREBALL_MUZZLEFLASH,     "fireball_muzzleflash")
+EFFECT(0, FIREBALL_PRE_MUZZLEFLASH, "fireball_preattack_muzzleflash")
+
+
+
+EFFECT(0, RAPTOR_CANNON_IMPACT,     "raptor_cannon_impact")
+EFFECT(0, RAPTOR_BOMB_IMPACT,       "raptor_bomb_impact")
+EFFECT(0, RAPTOR_BOMB_SPREAD,       "raptor_bomb_spread")
+EFFECT(0, RAPTOR_MUZZLEFLASH,       "raptor_cannon_muzzleflash")
+
+EFFECT(0, RACER_BOOSTER,            "wakizashi_booster_smoke")
+EFFECT(0, RACER_IMPACT,             "wakizashi_gun_impact")
+EFFECT(0, RACER_MUZZLEFLASH,        "wakizashi_gun_muzzleflash")
+EFFECT(0, RACER_ROCKETLAUNCH,       "wakizashi_rocket_launch")
+EFFECT(0, RACER_ROCKET_EXPLODE,     "wakizashi_rocket_launch")
+EFFECT(1, RACER_ROCKET_TRAIL,       "wakizashi_rocket_thrust")
+
+EFFECT(0, SPIDERBOT_ROCKETLAUNCH,   "spiderbot_rocket_launch")
+EFFECT(1, SPIDERBOT_ROCKET_TRAIL,   "spiderbot_rocket_thrust")
+EFFECT(0, SPIDERBOT_ROCKET_EXPLODE, "spiderbot_rocket_explode")
+EFFECT(0, SPIDERBOT_MINIGUN_IMPACT, "spiderbot_minigun_impact")
+EFFECT(0, SPIDERBOT_MINIGUN_MUZZLEFLASH,    "spiderbot_minigun_muzzleflash")
+
+EFFECT(0, BUMBLEBEE_HEAL_MUZZLEFLASH,   "healray_muzzleflash")
+EFFECT(0, BUMBLEBEE_HEAL_IMPACT,   "healray_impact")
+
+EFFECT(0, BIGPLASMA_IMPACT,         "bigplasma_impact")
+EFFECT(0, BIGPLASMA_MUZZLEFLASH,    "bigplasma_muzzleflash")
+
+EFFECT(0, TELEPORT,                 "teleport")
+
+EFFECT(0, SPAWNPOINT_RED,           "spawn_point_red")
+EFFECT(0, SPAWN_RED,                "spawn_event_red")
+EFFECT(0, SPAWNPOINT_BLUE,          "spawn_point_blue")
+EFFECT(0, SPAWN_BLUE,               "spawn_event_blue")
+EFFECT(0, SPAWNPOINT_YELLOW,        "spawn_point_yellow")
+EFFECT(0, SPAWN_YELLOW,             "spawn_event_yellow")
+EFFECT(0, SPAWNPOINT_PINK,          "spawn_point_pink")
+EFFECT(0, SPAWN_PINK,               "spawn_event_pink")
+EFFECT(0, SPAWNPOINT_NEUTRAL,       "spawn_point_neutral")
+EFFECT(0, SPAWN_NEUTRAL,            "spawn_event_neutral")
+
+EFFECT(0, NADE_RED_EXPLODE,         "nade_red_explode")
+EFFECT(0, NADE_BLUE_EXPLODE,        "nade_blue_explode")
+EFFECT(0, NADE_YELLOW_EXPLODE,      "nade_yellow_explode")
+EFFECT(0, NADE_PINK_EXPLODE,        "nade_pink_explode")
+EFFECT(0, NADE_NEUTRAL_EXPLODE,     "nade_neutral_explode")
+
+EFFECT(0, ICEORGLASS,               "iceorglass")
+EFFECT(0, ICEFIELD,                 "icefield")
+EFFECT(0, FIREFIELD,                "firefield")
+EFFECT(0, HEALING,                  "healing_fx")
+EFFECT(1, LASER_BEAM_FAST,          "nex242_misc_laser_beam_fast")
+EFFECT(0, RESPAWN_GHOST,            "respawn_ghost")
+
+EFFECT(0, FLAG_RED_TOUCH,           "redflag_touch")
+EFFECT(0, FLAG_BLUE_TOUCH,          "blueflag_touch")
+EFFECT(0, FLAG_YELLOW_TOUCH,        "yellowflag_touch")
+EFFECT(0, FLAG_PINK_TOUCH,          "pinkflag_touch")
+EFFECT(0, FLAG_NEUTRAL_TOUCH,       "neutralflag_touch")
+EFFECT(1, RED_PASS,                 "red_pass")
+EFFECT(1, BLUE_PASS,                "blue_pass")
+EFFECT(1, YELLOW_PASS,              "yellow_pass")
+EFFECT(1, PINK_PASS,                "pink_pass")
+EFFECT(1, NEUTRAL_PASS,             "neutral_pass")
+EFFECT(0, RED_CAP,                  "red_cap")
+EFFECT(0, BLUE_CAP,                 "blue_cap")
+EFFECT(0, YELLOW_CAP,               "yellow_cap")
+EFFECT(0, PINK_CAP,                 "pink_cap")
+
+EFFECT(0, ITEM_PICKUP,              "item_pickup")
+EFFECT(0, ITEM_RESPAWN,             "item_respawn")
+
+EFFECT(0, ONS_GENERATOR_DAMAGED,    "torch_small")
+EFFECT(0, ONS_GENERATOR_GIB,        "onslaught_generator_gib_explode")
+EFFECT(0, ONS_GENERATOR_EXPLODE,    "onslaught_generator_smallexplosion")
+EFFECT(0, ONS_GENERATOR_EXPLODE2,   "onslaught_generator_finalexplosion")
+
+
+
+EFFECT(0, LASER_DEADLY,             "laser_deadly")
+EFFECT(1, FLAC_TRAIL,               "TR_SEEKER")
+EFFECT(1, SEEKER_TRAIL,             "TR_SEEKER")
+EFFECT(1, FIREMINE,                 "firemine")
+EFFECT(0, BALL_SPARKS,              "kaball_sparks")
+EFFECT(0, ELECTRIC_SPARKS,          "electricity_sparks")
+EFFECT(0, SPARKS,                   "sparks")
+EFFECT(0, RAGE,                     "rage")
+EFFECT(0, SMOKING,                  "smoking")
+EFFECT(0, SMOKE_RING,               "smoke_ring")
+EFFECT(0, JUMPPAD,                  "jumppad_activate")
+EFFECT(1, BULLET,                   "tr_bullet")
+EFFECT(0, EF_FLAME,                 "EF_FLAME")
+EFFECT(0, EF_STARDUST,              "EF_STARDUST")
+EFFECT(0, TE_EXPLOSION,             "TE_EXPLOSION")
+EFFECT(1, TR_NEXUIZPLASMA,          "TR_NEXUIZPLASMA")
+EFFECT(1, TR_CRYLINKPLASMA,         "TR_CRYLINKPLASMA")
+EFFECT(1, TR_ROCKET,                "TR_ROCKET")
+EFFECT(1, TR_GRENADE,               "TR_GRENADE")
+EFFECT(1, TR_BLOOD,                 "TR_BLOOD")
+EFFECT(1, TR_WIZSPIKE,              "TR_WIZSPIKE")
+EFFECT(1, TR_SLIGHTBLOOD,           "TR_SLIGHTBLOOD")
+EFFECT(1, TR_KNIGHTSPIKE,           "TR_KNIGHTSPIKE")
+EFFECT(1, TR_VORESPIKE,             "TR_VORESPIKE")
+EFFECT(0, TE_SPARK,                 "TE_SPARK")
index 349fdffbfb4b4958238ef5be082c46b797c4a9a1..e1707021ea2f8231f46ad0a3c993b221a04bb9fb 100644 (file)
@@ -1,14 +1,3 @@
-void Create_Effect_Entity(int eff_name, string eff_string, bool eff_trail)
-{
-       entity eff;
-       effects_ent[eff_name - 1] = eff = spawn();
-
-       eff.classname = "effect_entity";
-       eff.eent_net_name = eff_name;
-       eff.eent_eff_name = eff_string;
-       eff.eent_eff_trail = eff_trail;
-}
-
 #ifdef CSQC
 void Read_Effect(bool is_new)
 {
@@ -18,7 +7,7 @@ void Read_Effect(bool is_new)
        int net_name = ReadByte();
 #endif
 
-       entity eff = effects_ent[net_name - 1];
+       entity eff = effects_ent[net_name];
 
        vector v, vel = '0 0 0';
        int eff_cnt = 1;
@@ -41,9 +30,9 @@ void Read_Effect(bool is_new)
        if(is_new)
        {
                if(eff_trail)
-                       WarpZone_TrailParticles(world, particleeffectnum(eff.eent_eff_name), v, vel);
+                       WarpZone_TrailParticles(world, particleeffectnum(eff), v, vel);
                else
-                       pointparticles(particleeffectnum(eff.eent_eff_name), v, vel, eff_cnt);
+                       pointparticles(particleeffectnum(eff), v, vel, eff_cnt);
        }
 }
 #endif
@@ -53,9 +42,9 @@ bool Net_Write_Effect(entity client, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_EFFECT);
 #if EFFECTS_COUNT >= 255
-       WriteShort(MSG_ENTITY, self.eent_net_name);
+       WriteShort(MSG_ENTITY, self.m_id);
 #else
-       WriteByte(MSG_ENTITY, self.eent_net_name);
+       WriteByte(MSG_ENTITY, self.m_id);
 #endif
        WriteCoord(MSG_ENTITY, self.eent_net_location_x);
        WriteCoord(MSG_ENTITY, self.eent_net_location_y);
@@ -75,38 +64,15 @@ bool Net_Write_Effect(entity client, int sf)
        return true;
 }
 
-// problem with this is, we might not have all the available effects for it
-int Effect_NameToID(string eff_name)
-{
-       int i;
-       for(i = EFFECT_FIRST; i < MAX_EFFECTS; ++i)
-       {
-               if((effects_ent[i - 1]).eent_eff_name == eff_name)
-                       return (effects_ent[i - 1]).eent_net_name;
-       }
-
-       return 0;
-}
-
-void Send_Effect(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
+void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
 {
-       int eff_id = Effect_NameToID(eff_name);
-
-       if(!eff_id)
-       {
-               // revert to engine handling?
-               pointparticles(particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
-               return;
-       }
-
-       entity eff = effects_ent[eff_id - 1];
        if(!eff) { return; }
        if(!eff.eent_eff_trail && !eff_cnt) { return; } // effect has no count!
        entity net_eff = spawn();
        net_eff.owner = eff;
        net_eff.classname = "net_effect";
        //net_eff.eent_broadcast = broadcast;
-       net_eff.eent_net_name = eff_id;
+       net_eff.m_id = eff.m_id;
        net_eff.eent_net_velocity = eff_vel;
        net_eff.eent_net_location = eff_loc;
        net_eff.eent_net_count = eff_cnt;
@@ -117,4 +83,15 @@ void Send_Effect(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
 
        Net_LinkEntity(net_eff, false, 0, Net_Write_Effect);
 }
+
+void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
+{
+       // problem with this is, we might not have all the available effects for it
+       FOREACH(effects_ent, it.eent_eff_name == eff_name, LAMBDA(
+               Send_Effect(it, eff_loc, eff_vel, eff_cnt);
+               return;
+       ));
+       // revert to engine handling
+       pointparticles(_particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
+}
 #endif
index 790d8a7db6ce3ebc55f6a9ef0618517051d80cf6..b72eab243dad90a1a4f88e0e7a0b40a59c6a19ae 100644 (file)
 #ifndef P_EFFECTS_H
 #define P_EFFECTS_H
-// Global list of effects, networked to CSQC by ID to save bandwidth and to use client particle numbers (allows mismatching effectinfos to some degree)
-// Not too concerned about the order of this list, just keep the weapon effects together!
-
-//  EFFECT(istrail, EFFECT_NAME,                "effectinfo_string")
-#define EFFECTS \
-    EFFECT(0, EFFECT_EXPLOSION_SMALL,           "explosion_small") \
-    EFFECT(0, EFFECT_EXPLOSION_MEDIUM,          "explosion_medium") \
-    EFFECT(0, EFFECT_EXPLOSION_BIG,             "explosion_big") \
-    EFFECT(1, EFFECT_VAPORIZER_RED,             "TE_TEI_G3RED") \
-    EFFECT(1, EFFECT_VAPORIZER_RED_HIT,         "TE_TEI_G3RED_HIT") \
-    EFFECT(1, EFFECT_VAPORIZER_BLUE,            "TE_TEI_G3BLUE") \
-    EFFECT(1, EFFECT_VAPORIZER_BLUE_HIT,        "TE_TEI_G3BLUE_HIT") \
-    EFFECT(1, EFFECT_VAPORIZER_YELLOW,          "TE_TEI_G3YELLOW") \
-    EFFECT(1, EFFECT_VAPORIZER_YELLOW_HIT,      "TE_TEI_G3YELLOW_HIT") \
-    EFFECT(1, EFFECT_VAPORIZER_PINK,            "TE_TEI_G3PINK") \
-    EFFECT(1, EFFECT_VAPORIZER_PINK_HIT,        "TE_TEI_G3PINK_HIT") \
-    EFFECT(1, EFFECT_VAPORIZER_NEUTRAL,         "TE_TEI_G3NEUTRAL") \
-    EFFECT(1, EFFECT_VAPORIZER_NEUTRAL_HIT,     "TE_TEI_G3NEUTRAL_HIT") \
-    EFFECT(0, EFFECT_ELECTRO_COMBO,             "electro_combo") \
-    EFFECT(0, EFFECT_ELECTRO_IMPACT,            "electro_impact") \
-    EFFECT(0, EFFECT_ELECTRO_MUZZLEFLASH,       "electro_muzzleflash") \
-    EFFECT(0, EFFECT_HAGAR_BOUNCE,              "hagar_bounce") \
-    EFFECT(0, EFFECT_HAGAR_MUZZLEFLASH,         "hagar_muzzleflash") \
-    EFFECT(0, EFFECT_LASER_MUZZLEFLASH,         "laser_muzzleflash") \
-    EFFECT(0, EFFECT_MACHINEGUN_MUZZLEFLASH,    "uzi_muzzleflash") \
-    EFFECT(0, EFFECT_RIFLE_MUZZLEFLASH,         "rifle_muzzleflash") \
-    EFFECT(0, EFFECT_RAPTOR_MUZZLEFLASH,        "raptor_cannon_muzzleflash") \
-    EFFECT(0, EFFECT_RACER_MUZZLEFLASH,         "wakizashi_gun_muzzleflash") \
-    EFFECT(0, EFFECT_RACER_ROCKETLAUNCH,        "wakizashi_rocket_launch") \
-    EFFECT(0, EFFECT_SPIDERBOT_ROCKETLAUNCH,    "spiderbot_rocket_launch") \
-    EFFECT(0, EFFECT_BIGPLASMA_MUZZLEFLASH,     "bigplasma_muzzleflash") \
-    EFFECT(1, EFFECT_RIFLE,                     "tr_rifle") \
-    EFFECT(1, EFFECT_RIFLE_WEAK,                "tr_rifle_weak") \
-    EFFECT(0, EFFECT_SEEKER_MUZZLEFLASH,        "seeker_muzzleflash") \
-    EFFECT(0, EFFECT_SHOTGUN_MUZZLEFLASH,       "shotgun_muzzleflash") \
-    EFFECT(0, EFFECT_GRENADE_MUZZLEFLASH,       "grenadelauncher_muzzleflash") \
-    EFFECT(0, EFFECT_GRENADE_EXPLODE,           "grenade_explode") \
-    EFFECT(0, EFFECT_FLAK_BOUNCE,               "flak_bounce") \
-    EFFECT(0, EFFECT_CRYLINK_JOINEXPLODE,       "crylink_joinexplode") \
-    EFFECT(0, EFFECT_CRYLINK_MUZZLEFLASH,       "crylink_muzzleflash") \
-    EFFECT(0, EFFECT_VORTEX_MUZZLEFLASH,        "nex_muzzleflash") \
-    EFFECT(0, EFFECT_HOOK_MUZZLEFLASH,          "grapple_muzzleflash") \
-    EFFECT(0, EFFECT_HOOK_IMPACT,               "grapple_impact") \
-    EFFECT(0, EFFECT_ROCKET_EXPLODE,            "rocket_explode") \
-    EFFECT(0, EFFECT_ROCKET_GUIDE,              "rocket_guide") \
-    EFFECT(0, EFFECT_ROCKET_MUZZLEFLASH,        "rocketlauncher_muzzleflash") \
-    EFFECT(0, EFFECT_FIREBALL_LASER,            "fireball_laser") \
-    EFFECT(0, EFFECT_FIREBALL_EXPLODE,          "fireball_explode") \
-    EFFECT(0, EFFECT_FIREBALL_BFGDAMAGE,        "fireball_bfgdamage") \
-    EFFECT(0, EFFECT_FIREBALL_MUZZLEFLASH,      "fireball_muzzleflash") \
-    EFFECT(0, EFFECT_FIREBALL_PRE_MUZZLEFLASH,  "fireball_preattack_muzzleflash") \
-    EFFECT(0, EFFECT_TELEPORT,                  "teleport") \
-    EFFECT(0, EFFECT_SPAWN_RED,                 "spawn_event_red") \
-    EFFECT(0, EFFECT_SPAWN_BLUE,                "spawn_event_blue") \
-    EFFECT(0, EFFECT_SPAWN_YELLOW,              "spawn_event_yellow") \
-    EFFECT(0, EFFECT_SPAWN_PINK,                "spawn_event_pink") \
-    EFFECT(0, EFFECT_SPAWN_NEUTRAL,             "spawn_event_neutral") \
-    EFFECT(0, EFFECT_NADE_RED_EXPLODE,          "nade_red_explode") \
-    EFFECT(0, EFFECT_NADE_BLUE_EXPLODE,         "nade_blue_explode") \
-    EFFECT(0, EFFECT_NADE_YELLOW_EXPLODE,       "nade_yellow_explode") \
-    EFFECT(0, EFFECT_NADE_PINK_EXPLODE,         "nade_pink_explode") \
-    EFFECT(0, EFFECT_NADE_NEUTRAL_EXPLODE,      "nade_neutral_explode") \
-    EFFECT(0, EFFECT_ICEORGLASS,                "iceorglass") \
-    EFFECT(0, EFFECT_ICEFIELD,                  "icefield") \
-    EFFECT(0, EFFECT_FIREFIELD,                 "firefield") \
-    EFFECT(0, EFFECT_HEALING,                   "healing_fx") \
-    EFFECT(1, EFFECT_LASER_BEAM_FAST,           "nex242_misc_laser_beam_fast") \
-    EFFECT(0, EFFECT_RESPAWN_GHOST,             "respawn_ghost") \
-    EFFECT(0, EFFECT_FLAG_RED_TOUCH,            "redflag_touch") \
-    EFFECT(0, EFFECT_FLAG_BLUE_TOUCH,           "blueflag_touch") \
-    EFFECT(0, EFFECT_FLAG_YELLOW_TOUCH,         "yellowflag_touch") \
-    EFFECT(0, EFFECT_FLAG_PINK_TOUCH,           "pinkflag_touch") \
-    EFFECT(0, EFFECT_FLAG_NEUTRAL_TOUCH,        "neutralflag_touch") \
-    EFFECT(1, EFFECT_RED_PASS,                  "red_pass") \
-    EFFECT(1, EFFECT_BLUE_PASS,                 "blue_pass") \
-    EFFECT(1, EFFECT_YELLOW_PASS,               "yellow_pass") \
-    EFFECT(1, EFFECT_PINK_PASS,                 "pink_pass") \
-    EFFECT(1, EFFECT_NEUTRAL_PASS,              "neutral_pass") \
-    EFFECT(0, EFFECT_RED_CAP,                   "red_cap") \
-    EFFECT(0, EFFECT_BLUE_CAP,                  "blue_cap") \
-    EFFECT(0, EFFECT_YELLOW_CAP,                "yellow_cap") \
-    EFFECT(0, EFFECT_PINK_CAP,                  "pink_cap") \
-    EFFECT(0, EFFECT_BALL_SPARKS,               "kaball_sparks") \
-    EFFECT(0, EFFECT_ELECTRIC_SPARKS,           "electricity_sparks") \
-    EFFECT(0, EFFECT_SPARKS,                    "sparks") \
-    EFFECT(0, EFFECT_RAGE,                      "rage") \
-    EFFECT(0, EFFECT_SMOKING,                   "smoking") \
-    EFFECT(0, EFFECT_SMOKE_RING,                "smoke_ring") \
-    EFFECT(0, EFFECT_ITEM_PICKUP,               "item_pickup") \
-    EFFECT(0, EFFECT_ITEM_RESPAWN,              "item_respawn") \
-    EFFECT(0, EFFECT_JUMPPAD,                   "jumppad_activate") \
-    EFFECT(1, EFFECT_BULLET,                    "tr_bullet")
-
-
-
-
-// --------------------
-// --------------------------
-// -----------------------------------
-// ------------------------------------------|
-// some stuff you don't need to care about...|
-// ------------------------------------------|
-// -----------------------------------
-// --------------------------
-// --------------------
-
-.int eent_net_name; // id
-.vector eent_net_location;
-.vector eent_net_velocity;
-.int eent_eff_trail;
-.string eent_eff_name;
-.int eent_net_count;
 
 #ifdef CSQC
 void Read_Effect(bool is_new);
 #elif defined(SVQC)
-void Send_Effect(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt);
+void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt);
+void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt);
 #endif
 
-const int EFFECT_FIRST = 1;
-int EFFECT_COUNT;
+#define particleeffectnum(e) _particleeffectnum(e.eent_eff_name)
 
+void RegisterEffects();
 const int MAX_EFFECTS = 512;
-entity effects_ent[MAX_EFFECTS];
+entity effects_ent[MAX_EFFECTS], effects_ent_first, effects_ent_last;
+int EFFECT_COUNT;
+
+#define EFFECT(istrail, name, realname) \
+    REGISTER(RegisterEffects, EFFECT, effects_ent, EFFECT_COUNT, name, m_id, Create_Effect_Entity(realname, istrail));
+REGISTER_REGISTRY(RegisterEffects)
 
-void Create_Effect_Entity(int eff_name, string eff_string, int eff_trail);
+.int m_id;
+.string eent_eff_name;
+.int eent_eff_trail;
 
-#define EFFECT(istrail,name,realname) \
-    int name; \
-    void RegisterEffect_##name() \
-    { \
-        SET_FIELD_COUNT(name, EFFECT_FIRST, EFFECT_COUNT) \
-        CHECK_MAX_COUNT(name, MAX_EFFECTS, EFFECT_COUNT, "EFFECT") \
-        Create_Effect_Entity(name, realname, istrail); \
-    } \
-    ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffect_##name);
+.vector eent_net_location;
+.vector eent_net_velocity;
+.int eent_net_count;
+
+entity Create_Effect_Entity(string eff_name, bool eff_trail)
+{
+       entity this = new(effect_entity);
+       this.eent_eff_name = eff_name;
+       this.eent_eff_trail = eff_trail;
+       return this;
+}
 
 void RegisterEffects_First()
 {
@@ -145,19 +43,19 @@ void RegisterEffects_First()
     #define dedi ""
     #endif
 
-    dprintf("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME);
+    LOG_TRACEF("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME);
     #undef dedi
 }
 
 void RegisterEffects_Done()
 {
-    dprint("Effects initialization successful!\n");
+    LOG_TRACE("Effects initialization successful!\n");
 }
 
 // NOW we actually activate the declarations
 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_First);
-EFFECTS
+EFFECT(0, NULL, string_null)
+#include "effects.inc"
 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_Done);
-#undef EFFECT
 
 #endif
index 8b0d43305d9b243eb8eec33028079ebc4b125745..9b4013405d6740e7db8b23ac5a463a2bcc0e6e51 100644 (file)
@@ -19,7 +19,7 @@ void Inventory_Read(Inventory data)
         .int fld = inv_items[i];
         int prev = data.(fld);
         int next = data.(fld) = ReadByte();
-        dprintf("%s: %.0f -> %.0f\n", ITEMS[i].m_name, prev, next);
+        LOG_TRACEF("%s: %.0f -> %.0f\n", ITEMS[i].m_name, prev, next);
     ));
 }
 #endif
index bddf75b04193361e1b7ae80906397656926dce9c..ceb9a0aa4df1192c904706a711d0922f92d463b5 100644 (file)
@@ -12,7 +12,7 @@ CLASS(GameItem, Object)
     METHOD(GameItem, display, void(entity this, void(string name, string icon) returns)) {
         returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
     }
-    METHOD(GameItem, show, void(entity this)) { print("A game item\n"); }
+    METHOD(GameItem, show, void(entity this)) { LOG_INFO("A game item\n"); }
     void ITEM_HANDLE(Show, entity this) { this.show(this); }
 ENDCLASS(GameItem)
 
index 35aac2bff729080e975238591f69bcda09fae716..ade99c543aeacb710cabd4b9194d5de7bd6fc753 100644 (file)
@@ -4,7 +4,7 @@
 bool ITEM_HANDLE(Pickup, entity this, entity item, entity player) {
     bool b = this.giveTo(this, item, player);
     if (b) {
-        dprintf("entity %i picked up %s\n", player, this.m_name);
+        LOG_TRACEF("entity %i picked up %s\n", player, this.m_name);
         player.inventory.inv_items[this.m_id]++;
         Inventory_update(player);
     }
index 643617068c490eec99fb279fdf43958d9d4c1e49..793230e359f831222ad7c309a7a7b001cbe332a0 100644 (file)
@@ -6,7 +6,7 @@ CLASS(Pickup, GameItem)
     ATTRIB(Pickup, m_sound, string, "misc/itempickup.wav")
     ATTRIB(Pickup, m_name, string, string_null)
     METHOD(Pickup, show, void(entity this));
-    void Pickup_show(entity this) { printf("%s: %s\n", etos(this), this.m_name); }
+    void Pickup_show(entity this) { LOG_INFOF("%s: %s\n", etos(this), this.m_name); }
 #ifdef SVQC
     ATTRIB(Pickup, m_botvalue, int, 0)
     ATTRIB(Pickup, m_itemflags, int, 0)
index 0b851d53b0c5299c7625055d6f470f7925b90564..eff61dbdf713621fdb950acb44f4035408068c99 100644 (file)
@@ -169,7 +169,7 @@ float MapInfo_FilterGametype(int pGametype, int pFeatures, int pFlagsRequired, i
                if(MapInfo_Get_ByName(_MapInfo_GlobItem(i), 1, 0) == 2) // if we generated one... BAIL OUT and let the caller continue in the next frame.
                        if(pAbortOnGenerate)
                        {
-                               dprint("Autogenerated a .mapinfo, doing the rest later.\n");
+                               LOG_TRACE("Autogenerated a .mapinfo, doing the rest later.\n");
                                MapInfo_progress = i / _MapInfo_globcount;
                                return 0;
                        }
@@ -287,7 +287,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        if(fh < 0)
                return 0;
-       print("Analyzing ", fn, " to generate initial mapinfo\n");
+       LOG_INFO("Analyzing ", fn, " to generate initial mapinfo\n");
 
        inWorldspawn = 2;
        MapInfo_Map_flags = 0;
@@ -395,7 +395,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        if(inWorldspawn)
        {
-               print(fn, " ended still in worldspawn, BUG\n");
+               LOG_INFO(fn, " ended still in worldspawn, BUG\n");
                return 0;
        }
        diameter = vlen(mapMaxs - mapMins);
@@ -428,9 +428,9 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
                MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTS;
        }
 
-       dprint("-> diameter ",    ftos(diameter));
-       dprint(";  spawnpoints ", ftos(spawnpoints));
-       dprint(";  modes ",       ftos(MapInfo_Map_supportedGametypes), "\n");
+       LOG_TRACE("-> diameter ",    ftos(diameter));
+       LOG_TRACE(";  spawnpoints ", ftos(spawnpoints));
+       LOG_TRACE(";  modes ",       ftos(MapInfo_Map_supportedGametypes), "\n");
 
        fclose(fh);
 
@@ -650,7 +650,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
                p = strstrofs(sa, "=", 0);
                if(p < 0)
                {
-                       print("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
+                       LOG_INFO("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
                        continue;
                }
                k = substring(sa, 0, p);
@@ -691,7 +691,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
                }
                else
                {
-                       print("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
+                       LOG_INFO("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
                }
        }
 
@@ -711,39 +711,39 @@ float MapInfo_Type_FromString(string t)
 {
        if(t == "nexball")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "nb";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "freezetag")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "ft";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "keepaway")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "ka";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "invasion")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "inv";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "assault")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "as";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "race")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "rc";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "all")
                return MAPINFO_TYPE_ALL;
@@ -811,7 +811,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                {
                        fh = fopen(s, FILE_READ);
                        if(fh < 0)
-                               print("Map ", pFilename, " references not existing config file ", s, "\n");
+                               LOG_INFO("Map ", pFilename, " references not existing config file ", s, "\n");
                        else
                        {
                                for (;;)
@@ -840,23 +840,23 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                        }
                }
                else
-                       print("Map ", pFilename, " uses too many levels of inclusion\n");
+                       LOG_INFO("Map ", pFilename, " uses too many levels of inclusion\n");
        }
        else if(t == "")
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if (!cvar_value_issafe(t))
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if (!cvar_value_issafe(s))
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(MAPINFO_SETTEMP_ACL_SYSTEM, t) <= 0)
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(acl, t) <= 0)
-               print("Map ", pFilename, " contains a denied setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a denied setting, ignored\n");
        else
        {
                if(type == 0) // server set
                {
-                       dprint("Applying temporary setting ", t, " := ", s, "\n");
+                       LOG_TRACE("Applying temporary setting ", t, " := ", s, "\n");
                        if(cvar("g_campaign"))
                                cvar_set(t, s); // this is a wrapper and is always temporary anyway; no need to backup old values then
                        else
@@ -864,7 +864,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                }
                else
                {
-                       dprint("Applying temporary client setting ", t, " := ", s, "\n");
+                       LOG_TRACE("Applying temporary client setting ", t, " := ", s, "\n");
                        MapInfo_Map_clientstuff = strcat(
                                        MapInfo_Map_clientstuff, "cl_cmd settemp \"", t, "\" \"", s, "\"\n"
                                        );
@@ -911,7 +911,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
 
        if(strstrofs(pFilename, "/", 0) >= 0)
        {
-               print("Invalid character in map name, ignored\n");
+               LOG_INFO("Invalid character in map name, ignored\n");
                return 0;
        }
 
@@ -1001,7 +1001,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                                error("... but I just wrote it!");
                }
 
-               print("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
+               LOG_INFO("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
        }
 
        _MapInfo_Map_Reset();
@@ -1040,7 +1040,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
-                               dprint("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
                }
                else if(t == "hidden")
                {
@@ -1062,11 +1062,11 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                {
                        t = car(s); s = cdr(s);
                        f = MapInfo_Type_FromString(t);
-                       dprint("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_TRACE("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
-                               dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
                else if(t == "gametype")
                {
@@ -1075,7 +1075,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        if(f)
                                _MapInfo_Map_ApplyGametypeEx (s, pGametypeToSet, f);
                        else
-                               dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
                else if(t == "size")
                {
@@ -1086,16 +1086,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 == "")
-                               print("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_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");
                        else
                        {
                                t = car(s); s = cdr(s); f = stof(t);
                                if(s != "")
-                                       print("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_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");
                                else
                                {
                                        if(a >= d || b >= e || c >= f)
-                                               print("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
+                                               LOG_INFO("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
                                        else
                                        {
                                                MapInfo_Map_mins.x = a;
@@ -1120,7 +1120,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                        else
                        {
-                               dprint("Map ", pFilename, " has a setting for unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " has a setting for unknown game type ", t, ", ignored\n");
                        }
                }
                else if(t == "clientsettemp_for_type")
@@ -1135,13 +1135,13 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                        else
                        {
-                               dprint("Map ", pFilename, " has a client setting for unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " has a client setting for unknown game type ", t, ", ignored\n");
                        }
                }
                else if(t == "fog")
                {
                        if (!cvar_value_issafe(s))
-                               print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
+                               LOG_INFO("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
                        else
                                MapInfo_Map_fog = s;
                }
@@ -1157,7 +1157,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        if(pGametypeToSet)
                        {
                                if (!cvar_value_issafe(t))
-                                       print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
+                                       LOG_INFO("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
                                else
                                        MapInfo_Map_clientstuff = strcat(
                                                MapInfo_Map_clientstuff, "cd loop \"", t, "\"\n"
@@ -1165,7 +1165,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                }
                else
-                       dprint("Map ", pFilename, " provides unknown info item ", t, ", ignored\n");
+                       LOG_TRACE("Map ", pFilename, " provides unknown info item ", t, ", ignored\n");
        }
        fclose(fh);
 
@@ -1179,7 +1179,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
        MapInfo_Cache_Store();
        if(MapInfo_Map_supportedGametypes != 0)
                return r;
-       dprint("Map ", pFilename, " supports no game types, ignored\n");
+       LOG_TRACE("Map ", pFilename, " supports no game types, ignored\n");
        return 0;
 }
 float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, int pGametypeToSet)
@@ -1371,14 +1371,14 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
        {
                if(cvar("g_mapinfo_allow_unsupported_modes_and_let_stuff_break"))
                {
-                       print("EMERGENCY: can't play the selected map in the given game mode. Working with only the override settings.\n");
+                       LOG_INFO("EMERGENCY: 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)
                {
-                       print("Mapinfo system is not functional at all. Assuming deathmatch.\n");
+                       LOG_INFO("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);
@@ -1393,7 +1393,7 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
                }
 
                // t is now a supported mode!
-               print("EMERGENCY: can't play the selected map in the given game mode. Falling back to a supported mode.\n");
+               LOG_INFO("EMERGENCY: 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 2fefd53227580bb3204bb56623a02a01df4f3272..3a1cc86744c16f9ea93f40c0a3ce22801cd874d6 100644 (file)
@@ -95,7 +95,7 @@ MINIGAME_SIMPLELINKED_ENTITIES
 
 void minigame_autoclean_entity(entity e)
 {
-       dprint("CL Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+       LOG_TRACE("CL Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
        remove(e);
 }
 
@@ -142,7 +142,7 @@ void activate_minigame(entity minigame)
        
        if ( !minigame.descriptor || minigame.classname != "minigame" )
        {
-               dprint("Trying to activate unregistered minigame ",minigame.netname," in client\n");
+               LOG_TRACE("Trying to activate unregistered minigame ",minigame.netname," in client\n");
                return;
        }
        
@@ -197,7 +197,7 @@ void minigame_read_owner()
                self.owner = find(self.owner,netname,owner_name);
        while ( self.owner && self.owner.classname != "minigame" );
        if ( !self.owner )
-               dprint("Got a minigame entity without a minigame!\n");
+               LOG_TRACE("Got a minigame entity without a minigame!\n");
 }
 void ent_read_minigame()
 {
@@ -219,7 +219,7 @@ void ent_read_minigame()
                        self.entremove = minigame_entremove;
                        self.descriptor = minigame_get_descriptor(ReadString_Raw());
                        if ( !self.descriptor )
-                               dprint("Got a minigame without a client-side descriptor!\n");
+                               LOG_TRACE("Got a minigame without a client-side descriptor!\n");
                        else
                                self.minigame_event = self.descriptor.minigame_event;
                }
@@ -235,7 +235,7 @@ void ent_read_minigame()
                        minigame_read_owner();
                        float ent = ReadLong();
                        self.minigame_playerslot = ent;
-                       dprint("Player: ",GetPlayerName(ent-1),"\n");
+                       LOG_TRACE("Player: ",GetPlayerName(ent-1),"\n");
                        
                        activate = (ent == player_localnum+1 && self.owner && self.owner != active_minigame);
                        
@@ -258,9 +258,9 @@ void ent_read_minigame()
 
        if ( sf & MINIG_SF_CREATE )
        {
-               dprint("CL Reading entity: ",ftos(num_for_edict(self)),
+               LOG_TRACE("CL Reading entity: ",ftos(num_for_edict(self)),
                        " classname:",self.classname," enttype:",ftos(self.enttype) );
-               dprint(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
+               LOG_TRACE(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
        }
 }
 #undef ReadString
index fc5df6bc5f481d2db9734e18f67b0a97f47eecd6..b7ad467b8c2728ec128d8835c23157007540121f 100644 (file)
@@ -368,7 +368,7 @@ int nmm_server_event(entity minigame, string event, ...)
                                minigame.SendFlags |= MINIG_SF_UPDATE;
                        }
                        else
-                               dprint("Invalid move: ",...(2,string),"\n");
+                               LOG_TRACE("Invalid move: ",...(2,string),"\n");
                        return 1;
                }
        }
index 644bd8ec6660df141d143cbf45ae531884b60020..18a64e4264b39fd4317a8a64f3482f0e7d0aa160 100644 (file)
@@ -419,7 +419,7 @@ int ttt_ai_random(int piecemask)
                f <<= 1;
        }
        
-       dprint(sprintf("TTT AI: selected %x from %x\n",
+       LOG_TRACE(sprintf("TTT AI: selected %x from %x\n",
                        RandomSelection_chosen_float, piecemask) );
        return RandomSelection_chosen_float;
 }
@@ -437,7 +437,7 @@ int ttt_ai_block3 ( int piecemask, int piecemask_free )
        r |= ttt_ai_1of3(piecemask,TTT_AI_POSFLAG_A3,TTT_AI_POSFLAG_B3,TTT_AI_POSFLAG_C3);
        r |= ttt_ai_1of3(piecemask,TTT_AI_POSFLAG_A1,TTT_AI_POSFLAG_B2,TTT_AI_POSFLAG_C3);
        r |= ttt_ai_1of3(piecemask,TTT_AI_POSFLAG_A3,TTT_AI_POSFLAG_B2,TTT_AI_POSFLAG_C1);
-       dprint(sprintf("TTT AI: possible 3 in a rows in %x: %x (%x)\n",piecemask,r, r&piecemask_free));
+       LOG_TRACE(sprintf("TTT AI: possible 3 in a rows in %x: %x (%x)\n",piecemask,r, r&piecemask_free));
        r &= piecemask_free;
        return ttt_ai_random(r);
 }
@@ -450,15 +450,15 @@ string ttt_ai_choose_simple(int piecemask_self, int piecemask_opponent, int piec
 {
        int move = 0;
        
-       dprint("TTT AI: checking winning move\n");
+       LOG_TRACE("TTT AI: checking winning move\n");
        if (( move = ttt_ai_block3(piecemask_self,piecemask_free) ))
                return ttt_ai_piece_flag2pos(move); // place winning move
                
-       dprint("TTT AI: checking opponent's winning move\n");
+       LOG_TRACE("TTT AI: checking opponent's winning move\n");
        if (( move = ttt_ai_block3(piecemask_opponent,piecemask_free) ))
                return ttt_ai_piece_flag2pos(move); // block opponent
                
-       dprint("TTT AI: random move\n");
+       LOG_TRACE("TTT AI: random move\n");
        return ttt_ai_piece_flag2pos(ttt_ai_random(piecemask_free));
 }
 
@@ -508,12 +508,12 @@ void ttt_aimove(entity minigame)
                }
                        
                // TODO multiple AI difficulties
-               dprint(sprintf("TTT AI: self: %x opponent: %x free: %x\n",
+               LOG_TRACE(sprintf("TTT AI: self: %x opponent: %x free: %x\n",
                                piecemask_self, piecemask_opponent, piecemask_free));
                pos = ttt_ai_choose_simple(piecemask_self, piecemask_opponent, piecemask_free);
-               dprint("TTT AI: chosen move: ",pos,"\n\n");
+               LOG_TRACE("TTT AI: chosen move: ",pos,"\n\n");
                if ( !pos )
-                       dprint("Tic Tac Toe AI has derped!\n");
+                       LOG_TRACE("Tic Tac Toe AI has derped!\n");
                else
                        ttt_move(minigame,aiplayer,pos);
        }
@@ -688,4 +688,4 @@ int ttt_client_event(entity minigame, string event, ...)
        return false;
 }
 
-#endif
\ No newline at end of file
+#endif
index 157471cbd54f26be4def2d61b932580b5e132686..feb4b02944874bc692c0672b90881d6dee8094b9 100644 (file)
@@ -183,7 +183,7 @@ entity start_minigame(entity player, string minigame )
                GameLogEcho(strcat(":minigame:start:",minig.netname));
                if ( ! minigame_addplayer(minig,player) )
                {
-                       dprint("Minigame ",minig.netname," rejected the first player join!\n");
+                       LOG_TRACE("Minigame ",minig.netname," rejected the first player join!\n");
                        end_minigame(minig);
                        return world;
                }
@@ -242,7 +242,7 @@ void end_minigame(entity minigame_session)
        while( (e = findentity(e, owner, minigame_session)) )
                if ( e.minigame_autoclean )
                {
-                       dprint("SV Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+                       LOG_TRACE("SV Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
                        remove(e);
                }
        
@@ -427,4 +427,4 @@ void ClientCommand_minigame(int request, int argc, string command)
        sprint(self, "  Leave the current minigame\n");
        sprint(self, "Usage:^3 cmd minigame invite <player>\n");
        sprint(self, "  Invite the given player to join you in a minigame\n");
-}
\ No newline at end of file
+}
index 201b9a5a24f915479f0d7ea0442aeae770128e57..f44cabc5da6e0e8c96cb13952c15be37ced0993a 100644 (file)
@@ -1,3 +1,8 @@
+#ifndef MENUQC
+#include "../animdecide.qh"
+vector animfixfps(entity e, vector a, vector b);
+#endif
+
 #include "monster/mage.qc"
 #include "monster/shambler.qc"
 #include "monster/spider.qc"
index 4158b15379ece265758b361b7563940791326371..20a2103785f0bffb5b6a14cfe347eac076cc1b6a 100644 (file)
@@ -31,6 +31,8 @@ const int MR_SETUP = 1; // (SERVER) setup monster data
 const int MR_THINK = 2; // (SERVER) logic to run every frame
 const int MR_DEATH = 3; // (SERVER) called when monster dies
 const int MR_PRECACHE = 4; // (BOTH) precaches models/sounds used by this monster
+const int MR_PAIN = 5; // (SERVER) called when monster is damaged
+const int MR_ANIM = 6; // (BOTH?) sets animations for monster
 
 // special spawn flags
 const int MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
@@ -40,6 +42,8 @@ const int MONSTER_SIZE_BROKEN = 128; // TODO: remove when bad models are replace
 const int MON_FLAG_SUPERMONSTER = 256; // incredibly powerful monster
 const int MON_FLAG_RANGED = 512; // monster shoots projectiles
 const int MON_FLAG_MELEE = 1024;
+const int MON_FLAG_CRUSH = 2048; // monster can be stomped in special modes
+const int MON_FLAG_RIDE = 4096; // monster can be ridden in special modes
 
 // entity properties of monsterinfo:
 .string netname; // short name
@@ -47,9 +51,21 @@ const int MON_FLAG_MELEE = 1024;
 .string model; // full name of model
 .int spawnflags;
 .vector mins, maxs; // monster hitbox size
+.bool(int) monster_attackfunc;
+
+// animations
+.vector anim_blockend;
+.vector anim_blockstart;
+.vector anim_melee1;
+.vector anim_melee2;
+.vector anim_melee3;
+.vector anim_pain3;
+.vector anim_pain4;
+.vector anim_pain5;
+.vector anim_walk;
+.vector anim_spawn;
 
 // other useful macros
 #define MON_ACTION(monstertype,mrequest) (get_monsterinfo(monstertype)).monster_func(mrequest)
-#define M_NAME(monstertype) (get_monsterinfo(monstertype)).monster_name
 
 #endif
index e2258dbd4956c42e52529a862b238e249584c85e..8f92d693a6e614fbf2422f36722a8484b84d9b06 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef MENUQC
-bool m_mage(int);
+bool M_Mage(int);
 #endif
 REGISTER_MONSTER_SIMPLE(
 /* MON_##id   */ MAGE,
@@ -10,12 +10,14 @@ REGISTER_MONSTER_SIMPLE(
 /* fullname   */ _("Mage")
 ) {
 #ifndef MENUQC
-    this.monster_func = m_mage;
+    this.monster_func = M_Mage;
+    this.monster_func(MR_PRECACHE);
 #endif
 }
 
 #ifdef SVQC
 float autocvar_g_monster_mage_health;
+float autocvar_g_monster_mage_damageforcescale = 0.5;
 float autocvar_g_monster_mage_attack_spike_damage;
 float autocvar_g_monster_mage_attack_spike_radius;
 float autocvar_g_monster_mage_attack_spike_delay;
@@ -43,26 +45,29 @@ float autocvar_g_monster_mage_speed_stop;
 float autocvar_g_monster_mage_speed_run;
 float autocvar_g_monster_mage_speed_walk;
 
+/*
 const float mage_anim_idle             = 0;
 const float mage_anim_walk             = 1;
 const float mage_anim_attack   = 2;
 const float mage_anim_pain             = 3;
 const float mage_anim_death            = 4;
 const float mage_anim_run              = 5;
+*/
 
-void() mage_heal;
-void() mage_shield;
+void() M_Mage_Defend_Heal;
+void() M_Mage_Defend_Shield;
 
 .entity mage_spike;
-.float shield_ltime;
+.float mage_shield_delay;
+.float mage_shield_time;
 
-float friend_needshelp(entity e)
+float M_Mage_Defend_Heal_Check(entity e)
 {
        if(e == world)
                return false;
        if(e.health <= 0)
                return false;
-       if(DIFF_TEAM(e, self) && e != self.monster_owner)
+       if(DIFF_TEAM(e, self) && e != self.monster_follow)
                return false;
        if(e.frozen)
                return false;
@@ -82,7 +87,7 @@ float friend_needshelp(entity e)
        return false;
 }
 
-void mage_spike_explode()
+void M_Mage_Attack_Spike_Explode()
 {
        self.event_damage = func_null;
 
@@ -90,21 +95,21 @@ void mage_spike_explode()
 
        self.realowner.mage_spike = world;
 
-       Send_Effect("explosion_small", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, self.origin, '0 0 0', 1);
        RadiusDamage (self, self.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE, other);
 
        remove (self);
 }
 
-void mage_spike_touch()
+void M_Mage_Attack_Spike_Touch()
 {
        PROJECTILE_TOUCH;
 
-       mage_spike_explode();
+       M_Mage_Attack_Spike_Explode();
 }
 
 // copied from W_Seeker_Think
-void mage_spike_think()
+void M_Mage_Attack_Spike_Think()
 {
        entity e;
        vector desireddir, olddir, newdir, eorg;
@@ -115,7 +120,7 @@ void mage_spike_think()
        if (time > self.ltime || self.enemy.health <= 0 || self.owner.health <= 0)
        {
                self.projectiledeathtype |= HITTYPE_SPLASH;
-               mage_spike_explode();
+               M_Mage_Attack_Spike_Explode();
        }
 
        spd = vlen(self.velocity);
@@ -167,7 +172,7 @@ void mage_spike_think()
        UpdateCSQCProjectile(self);
 }
 
-void mage_attack_spike()
+void M_Mage_Attack_Spike()
 {
        entity missile;
        vector dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
@@ -176,7 +181,7 @@ void mage_attack_spike()
 
        missile = spawn ();
        missile.owner = missile.realowner = self;
-       missile.think = mage_spike_think;
+       missile.think = M_Mage_Attack_Spike_Think;
        missile.ltime = time + 7;
        missile.nextthink = time;
        missile.solid = SOLID_BBOX;
@@ -187,19 +192,19 @@ void mage_attack_spike()
        missile.velocity = dir * 400;
        missile.avelocity = '300 300 300';
        missile.enemy = self.enemy;
-       missile.touch = mage_spike_touch;
+       missile.touch = M_Mage_Attack_Spike_Touch;
 
        self.mage_spike = missile;
 
        CSQCProjectile(missile, true, PROJECTILE_MAGE_SPIKE, true);
 }
 
-void mage_heal()
+void M_Mage_Defend_Heal()
 {
        entity head;
        float washealed = false;
 
-       for(head = findradius(self.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain) if(friend_needshelp(head))
+       for(head = findradius(self.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain) if(M_Mage_Defend_Heal_Check(head))
        {
                washealed = true;
                string fx = "";
@@ -209,7 +214,7 @@ void mage_heal()
                        {
                                case 0:
                                        if(head.health < autocvar_g_balance_health_regenstable) head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_health_regenstable);
-                                       fx = "healing_fx";
+                                       fx = EFFECT_HEALING.eent_eff_name;
                                        break;
                                case 1:
                                        if(head.ammo_cells) head.ammo_cells = bound(head.ammo_cells, head.ammo_cells + 1, g_pickup_cells_max);
@@ -228,39 +233,40 @@ void mage_heal()
                                        break;
                                case 3:
                                        head.health = bound(0, head.health - ((head == self)  ? (autocvar_g_monster_mage_heal_self) : (autocvar_g_monster_mage_heal_allies)), autocvar_g_balance_health_regenstable);
-                                       fx = "rage";
+                                       fx = EFFECT_RAGE.eent_eff_name;
                                        break;
                        }
 
-                       Send_Effect(fx, head.origin, '0 0 0', 1);
+                       Send_Effect_(fx, head.origin, '0 0 0', 1);
                }
                else
                {
-                       Send_Effect("healing_fx", head.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_HEALING, head.origin, '0 0 0', 1);
                        head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), head.max_health);
-                       if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE))
+                       if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE) && head.sprite)
                                WaypointSprite_UpdateHealth(head.sprite, head.health);
                }
        }
 
        if(washealed)
        {
-               self.frame = mage_anim_attack;
+               setanim(self, self.anim_shoot, true, true, true);
                self.attack_finished_single = time + (autocvar_g_monster_mage_heal_delay);
+               self.anim_finished = time + 1.5;
        }
 }
 
-void mage_push()
+void M_Mage_Attack_Push()
 {
        sound(self, CH_SHOTS, W_Sound("tagexp1"), 1, ATTEN_NORM);
        RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE, self.enemy);
-       Send_Effect("TE_EXPLOSION", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_TE_EXPLOSION, self.origin, '0 0 0', 1);
 
-       self.frame = mage_anim_attack;
+       setanim(self, self.anim_shoot, true, true, true);
        self.attack_finished_single = time + (autocvar_g_monster_mage_attack_push_delay);
 }
 
-void mage_teleport()
+void M_Mage_Attack_Teleport()
 {
        if(vlen(self.enemy.origin - self.origin) >= 500)
                return;
@@ -271,31 +277,30 @@ void mage_teleport()
        if(trace_fraction < 1)
                return;
 
-       Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1);
        setorigin(self, self.enemy.origin + ((v_forward * -1) * 200));
 
        self.attack_finished_single = time + 0.2;
 }
 
-void mage_shield_remove()
+void M_Mage_Defend_Shield_Remove()
 {
        self.effects &= ~(EF_ADDITIVE | EF_BLUE);
-       self.armorvalue = 0;
-       self.m_armor_blockpercent = autocvar_g_monsters_armor_blockpercent;
+       self.armorvalue = autocvar_g_monsters_armor_blockpercent;
 }
 
-void mage_shield()
+void M_Mage_Defend_Shield()
 {
        self.effects |= (EF_ADDITIVE | EF_BLUE);
-       self.lastshielded = time + (autocvar_g_monster_mage_shield_delay);
-       self.m_armor_blockpercent = (autocvar_g_monster_mage_shield_blockpercent);
-       self.armorvalue = self.health;
-       self.shield_ltime = time + (autocvar_g_monster_mage_shield_time);
-       self.frame = mage_anim_attack;
+       self.mage_shield_delay = time + (autocvar_g_monster_mage_shield_delay);
+       self.armorvalue = (autocvar_g_monster_mage_shield_blockpercent);
+       self.mage_shield_time = time + (autocvar_g_monster_mage_shield_time);
+       setanim(self, self.anim_shoot, true, true, true);
        self.attack_finished_single = time + 1;
+       self.anim_finished = time + 1;
 }
 
-float mage_attack(float attack_type)
+float M_Mage_Attack(float attack_type)
 {
        switch(attack_type)
        {
@@ -303,7 +308,7 @@ float mage_attack(float attack_type)
                {
                        if(random() <= 0.7)
                        {
-                               mage_push();
+                               M_Mage_Attack_Push();
                                return true;
                        }
 
@@ -315,14 +320,15 @@ float mage_attack(float attack_type)
                        {
                                if(random() <= 0.4)
                                {
-                                       mage_teleport();
+                                       M_Mage_Attack_Teleport();
                                        return true;
                                }
                                else
                                {
-                                       self.frame = mage_anim_attack;
+                                       setanim(self, self.anim_shoot, true, true, true);
                                        self.attack_finished_single = time + (autocvar_g_monster_mage_attack_spike_delay);
-                                       defer(0.2, mage_attack_spike);
+                                       self.anim_finished = time + 1;
+                                       Monster_Delay(1, 0, 0.2, M_Mage_Attack_Spike);
                                        return true;
                                }
                        }
@@ -337,28 +343,24 @@ float mage_attack(float attack_type)
        return false;
 }
 
-void spawnfunc_monster_mage()
-{
-       self.classname = "monster_mage";
-
-       if(!monster_initialize(MON_MAGE.monsterid)) { remove(self); return; }
-}
+void spawnfunc_monster_mage() { Monster_Spawn(MON_MAGE.monsterid); }
 
-// compatibility with old spawns
-void spawnfunc_monster_shalrath() { spawnfunc_monster_mage(); }
+#endif // SVQC
 
-float m_mage(float req)
+bool M_Mage(int req)
 {
        switch(req)
        {
+               #ifdef SVQC
                case MR_THINK:
                {
                        entity head;
-                       float need_help = false;
+                       bool need_help = false;
 
-                       for(head = findradius(self.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain)
+                       for(head = world; (head = findfloat(head, iscreature, true)); )
                        if(head != self)
-                       if(friend_needshelp(head))
+                       if(vlen(head.origin - self.origin) <= (autocvar_g_monster_mage_heal_range))
+                       if(M_Mage_Defend_Heal_Check(head))
                        {
                                need_help = true;
                                break;
@@ -367,32 +369,54 @@ float m_mage(float req)
                        if(self.health < (autocvar_g_monster_mage_heal_minhealth) || need_help)
                        if(time >= self.attack_finished_single)
                        if(random() < 0.5)
-                               mage_heal();
+                               M_Mage_Defend_Heal();
 
-                       if(time >= self.shield_ltime && self.armorvalue)
-                               mage_shield_remove();
+                       if(time >= self.mage_shield_time && self.armorvalue)
+                               M_Mage_Defend_Shield_Remove();
 
                        if(self.enemy)
                        if(self.health < self.max_health)
-                       if(time >= self.lastshielded)
+                       if(time >= self.mage_shield_delay)
                        if(random() < 0.5)
-                               mage_shield();
+                               M_Mage_Defend_Shield();
 
-                       monster_move((autocvar_g_monster_mage_speed_run), (autocvar_g_monster_mage_speed_walk), (autocvar_g_monster_mage_speed_stop), mage_anim_walk, mage_anim_run, mage_anim_idle);
+                       return true;
+               }
+               case MR_PAIN:
+               {
                        return true;
                }
                case MR_DEATH:
                {
-                       self.frame = mage_anim_death;
+                       setanim(self, self.anim_die1, false, true, true);
                        return true;
                }
+               #endif
+               #ifndef MENUQC
+               case MR_ANIM:
+               {
+                       vector none = '0 0 0';
+                       self.anim_die1 = animfixfps(self, '4 1 0.5', none); // 2 seconds
+                       self.anim_walk = animfixfps(self, '1 1 1', none);
+                       self.anim_idle = animfixfps(self, '0 1 1', none);
+                       self.anim_pain1 = animfixfps(self, '3 1 2', none); // 0.5 seconds
+                       self.anim_shoot = animfixfps(self, '2 1 5', none); // analyze models and set framerate
+                       self.anim_run = animfixfps(self, '5 1 1', none);
+
+                       return true;
+               }
+               #endif
+               #ifdef SVQC
                case MR_SETUP:
                {
                        if(!self.health) self.health = (autocvar_g_monster_mage_health);
+                       if(!self.speed) { self.speed = (autocvar_g_monster_mage_speed_walk); }
+                       if(!self.speed2) { self.speed2 = (autocvar_g_monster_mage_speed_run); }
+                       if(!self.stopspeed) { self.stopspeed = (autocvar_g_monster_mage_speed_stop); }
+                       if(!self.damageforcescale) { self.damageforcescale = (autocvar_g_monster_mage_damageforcescale); }
 
                        self.monster_loot = spawnfunc_item_health_large;
-                       self.monster_attackfunc = mage_attack;
-                       self.frame = mage_anim_walk;
+                       self.monster_attackfunc = M_Mage_Attack;
 
                        return true;
                }
@@ -403,24 +427,8 @@ float m_mage(float req)
                        precache_sound (W_Sound("tagexp1"));
                        return true;
                }
+               #endif
        }
 
        return true;
 }
-
-#endif // SVQC
-#ifdef CSQC
-float m_mage(float req)
-{
-       switch(req)
-       {
-               case MR_PRECACHE:
-               {
-                       return true;
-               }
-       }
-
-       return true;
-}
-
-#endif // CSQC
index 47e371a978980daf59d020caaca3813a1152ef49..4640fe945bcf33f6e9ea8744bdf0d79303334d2f 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef MENUQC
-bool m_shambler(int);
+bool M_Shambler(int);
 #endif
 REGISTER_MONSTER_SIMPLE(
 /* MON_##id   */ SHAMBLER,
@@ -10,15 +10,19 @@ REGISTER_MONSTER_SIMPLE(
 /* fullname   */ _("Shambler")
 ) {
 #ifndef MENUQC
-       this.monster_func = m_shambler;
+       this.monster_func = M_Shambler;
+       this.monster_func(MR_PRECACHE);
 #endif
 }
 
 #ifdef SVQC
 float autocvar_g_monster_shambler_health;
+float autocvar_g_monster_shambler_damageforcescale = 0.1;
 float autocvar_g_monster_shambler_attack_smash_damage;
+float autocvar_g_monster_shambler_attack_smash_range;
 float autocvar_g_monster_shambler_attack_claw_damage;
 float autocvar_g_monster_shambler_attack_lightning_damage;
+float autocvar_g_monster_shambler_attack_lightning_damage_zap = 15;
 float autocvar_g_monster_shambler_attack_lightning_force;
 float autocvar_g_monster_shambler_attack_lightning_radius;
 float autocvar_g_monster_shambler_attack_lightning_radius_zap;
@@ -28,6 +32,7 @@ float autocvar_g_monster_shambler_speed_stop;
 float autocvar_g_monster_shambler_speed_run;
 float autocvar_g_monster_shambler_speed_walk;
 
+/*
 const float shambler_anim_stand                = 0;
 const float shambler_anim_walk         = 1;
 const float shambler_anim_run          = 2;
@@ -37,38 +42,41 @@ const float shambler_anim_swingl    = 5;
 const float shambler_anim_magic                = 6;
 const float shambler_anim_pain         = 7;
 const float shambler_anim_death                = 8;
+*/
 
 .float shambler_lastattack; // delay attacks separately
 
-void shambler_smash()
+void M_Shambler_Attack_Smash()
 {
        makevectors(self.angles);
-       Send_Effect("explosion_medium", (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_MEDIUM, (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
 
-       tracebox(self.origin + v_forward * 50, self.mins * 0.5, self.maxs * 0.5, self.origin + v_forward * 500, MOVE_NORMAL, self);
+       // RadiusDamage does NOT support custom starting location, which means we must use this hack...
+
+       tracebox(self.origin + v_forward * 50, self.mins * 0.5, self.maxs * 0.5, self.origin + v_forward * autocvar_g_monster_shambler_attack_smash_range, MOVE_NORMAL, self);
 
        if(trace_ent.takedamage)
-               Damage(trace_ent, self, self, (autocvar_g_monster_shambler_attack_smash_damage) * Monster_SkillModifier(), DEATH_MONSTER_SHAMBLER_SMASH, trace_ent.origin, normalize(trace_ent.origin - self.origin));
+               Damage(trace_ent, self, self, (autocvar_g_monster_shambler_attack_smash_damage) * MONSTER_SKILLMOD(self), DEATH_MONSTER_SHAMBLER_SMASH, trace_ent.origin, normalize(trace_ent.origin - self.origin));
 }
 
-void shambler_swing()
+void M_Shambler_Attack_Swing()
 {
        float r = (random() < 0.5);
-       monster_melee(self.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((r) ? shambler_anim_swingr : shambler_anim_swingl), self.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW, true);
-       if(r)
+       if(r && Monster_Attack_Melee(self.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((r) ? self.anim_melee2 : self.anim_melee3), self.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW, true))
        {
-               defer(0.5, shambler_swing);
+               Monster_Delay(1, 0, 0.5, M_Shambler_Attack_Swing);
                self.attack_finished_single += 0.5;
+               self.anim_finished = self.attack_finished_single;
        }
 }
 
-void shambler_lightning_explode()
+void M_Shambler_Attack_Lightning_Explode()
 {
        entity head;
 
        sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("electro_impact", '0 0 0', '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_IMPACT, '0 0 0', '0 0 0', 1);
 
        self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
@@ -83,14 +91,14 @@ void shambler_lightning_explode()
        for(head = findradius(self.origin, (autocvar_g_monster_shambler_attack_lightning_radius_zap)); head; head = head.chain) if(head != self.realowner) if(head.takedamage)
        {
                te_csqc_lightningarc(self.origin, head.origin);
-               Damage(head, self, self.realowner, (autocvar_g_monster_shambler_attack_lightning_damage) * Monster_SkillModifier(), DEATH_MONSTER_SHAMBLER_ZAP, head.origin, '0 0 0');
+               Damage(head, self, self.realowner, (autocvar_g_monster_shambler_attack_lightning_damage_zap) * MONSTER_SKILLMOD(self), DEATH_MONSTER_SHAMBLER_ZAP, head.origin, '0 0 0');
        }
 
        self.think = SUB_Remove;
        self.nextthink = time + 0.2;
 }
 
-void shambler_lightning_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void M_Shambler_Attack_Lightning_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if (self.health <= 0)
                return;
@@ -104,25 +112,25 @@ void shambler_lightning_damage(entity inflictor, entity attacker, float damage,
                W_PrepareExplosionByDamage(attacker, self.use);
 }
 
-void shambler_lightning_touch()
+void M_Shambler_Attack_Lightning_Touch()
 {
        PROJECTILE_TOUCH;
 
        self.use ();
 }
 
-void shambler_lightning_think()
+void M_Shambler_Attack_Lightning_Think()
 {
        self.nextthink = time;
        if (time > self.cnt)
        {
                other = world;
-               shambler_lightning_explode();
+               M_Shambler_Attack_Lightning_Explode();
                return;
        }
 }
 
-void shambler_lightning()
+void M_Shambler_Attack_Lightning()
 {
        entity gren;
 
@@ -142,14 +150,14 @@ void shambler_lightning()
 
        gren.cnt = time + 5;
        gren.nextthink = time;
-       gren.think = shambler_lightning_think;
-       gren.use = shambler_lightning_explode;
-       gren.touch = shambler_lightning_touch;
+       gren.think = M_Shambler_Attack_Lightning_Think;
+       gren.use = M_Shambler_Attack_Lightning_Explode;
+       gren.touch = M_Shambler_Attack_Lightning_Touch;
 
        gren.takedamage = DAMAGE_YES;
        gren.health = 50;
        gren.damageforcescale = 0;
-       gren.event_damage = shambler_lightning_damage;
+       gren.event_damage = M_Shambler_Attack_Lightning_Damage;
        gren.damagedbycontents = true;
        gren.missile_flags = MIF_SPLASH | MIF_ARC;
        W_SetupProjVelocity_Explicit(gren, v_forward, v_up, (autocvar_g_monster_shambler_attack_lightning_speed), (autocvar_g_monster_shambler_attack_lightning_speed_up), 0, 0, false);
@@ -160,33 +168,39 @@ void shambler_lightning()
        CSQCProjectile(gren, true, PROJECTILE_SHAMBLER_LIGHTNING, true);
 }
 
-float shambler_attack(float attack_type)
+float M_Shambler_Attack(float attack_type)
 {
        switch(attack_type)
        {
                case MONSTER_ATTACK_MELEE:
                {
-                       shambler_swing();
+                       M_Shambler_Attack_Swing();
                        return true;
                }
                case MONSTER_ATTACK_RANGED:
                {
+                       float randomness = random(), enemy_len = vlen(self.enemy.origin - self.origin);
+
                        if(time >= self.shambler_lastattack) // shambler doesn't attack much
                        if(self.flags & FL_ONGROUND)
-                       if(random() <= 0.5 && vlen(self.enemy.origin - self.origin) <= 500)
+                       if(randomness <= 0.5 && enemy_len <= autocvar_g_monster_shambler_attack_smash_range)
                        {
-                               self.frame = shambler_anim_smash;
-                               defer(0.7, shambler_smash);
+                               setanim(self, self.anim_melee2, true, true, false);
+                               Monster_Delay(1, 0, 0.7, M_Shambler_Attack_Smash);
                                self.attack_finished_single = time + 1.1;
-                               self.shambler_lastattack = time + 3;
+                               self.anim_finished = time + 1.1;
+                               self.state = MONSTER_ATTACK_MELEE; // kinda a melee attack
+                               self.shambler_lastattack = time + 3 + random() * 1.5;
                                return true;
                        }
-                       else if(random() <= 0.1) // small chance, don't want this spammed
+                       else if(randomness <= 0.1 && enemy_len >= autocvar_g_monster_shambler_attack_smash_range * 1.5) // small chance, don't want this spammed
                        {
-                               self.frame = shambler_anim_magic;
+                               setanim(self, self.anim_shoot, true, true, false);
+                               self.state = MONSTER_ATTACK_MELEE; // maybe we should rename this to something more general
                                self.attack_finished_single = time + 1.1;
-                               self.shambler_lastattack = time + 3;
-                               defer(0.6, shambler_lightning);
+                               self.anim_finished = 1.1;
+                               self.shambler_lastattack = time + 3 + random() * 1.5;
+                               Monster_Delay(1, 0, 0.6, M_Shambler_Attack_Lightning);
                                return true;
                        }
 
@@ -197,36 +211,64 @@ float shambler_attack(float attack_type)
        return false;
 }
 
-void spawnfunc_monster_shambler()
-{
-       self.classname = "monster_shambler";
-
-       if(!monster_initialize(MON_SHAMBLER.monsterid)) { remove(self); return; }
-}
+void spawnfunc_monster_shambler() { Monster_Spawn(MON_SHAMBLER.monsterid); }
+#endif // SVQC
 
-float m_shambler(float req)
+bool M_Shambler(int req)
 {
        switch(req)
        {
+               #ifdef SVQC
                case MR_THINK:
                {
-                       monster_move((autocvar_g_monster_shambler_speed_run), (autocvar_g_monster_shambler_speed_walk), (autocvar_g_monster_shambler_speed_stop), shambler_anim_run, shambler_anim_walk, shambler_anim_stand);
+                       return true;
+               }
+               case MR_PAIN:
+               {
+                       self.pain_finished = time + 0.5;
+                       setanim(self, self.anim_pain1, true, true, false);
                        return true;
                }
                case MR_DEATH:
                {
-                       self.frame = shambler_anim_death;
+                       setanim(self, self.anim_die1, false, true, true);
                        return true;
                }
+               #endif
+               #ifndef MENUQC
+               case MR_ANIM:
+               {
+                       vector none = '0 0 0';
+                       self.anim_die1 = animfixfps(self, '8 1 0.5', none); // 2 seconds
+                       self.anim_walk = animfixfps(self, '1 1 1', none);
+                       self.anim_idle = animfixfps(self, '0 1 1', none);
+                       self.anim_pain1 = animfixfps(self, '7 1 2', none); // 0.5 seconds
+                       self.anim_melee1 = animfixfps(self, '3 1 5', none); // analyze models and set framerate
+                       self.anim_melee2 = animfixfps(self, '4 1 5', none); // analyze models and set framerate
+                       self.anim_melee3 = animfixfps(self, '5 1 5', none); // analyze models and set framerate
+                       self.anim_shoot = animfixfps(self, '6 1 5', none); // analyze models and set framerate
+                       self.anim_run = animfixfps(self, '2 1 1', none);
+
+                       return true;
+               }
+               #endif
+               #ifdef SVQC
                case MR_SETUP:
                {
                        if(!self.health) self.health = (autocvar_g_monster_shambler_health);
                        if(!self.attack_range) self.attack_range = 150;
+                       if(!self.speed) { self.speed = (autocvar_g_monster_shambler_speed_walk); }
+                       if(!self.speed2) { self.speed2 = (autocvar_g_monster_shambler_speed_run); }
+                       if(!self.stopspeed) { self.stopspeed = (autocvar_g_monster_shambler_speed_stop); }
+                       if(!self.damageforcescale) { self.damageforcescale = (autocvar_g_monster_shambler_damageforcescale); }
 
                        self.monster_loot = spawnfunc_item_health_mega;
-                       self.monster_attackfunc = shambler_attack;
-                       self.frame = shambler_anim_stand;
-                       self.weapon = WEP_VORTEX.m_id;
+                       self.weapon = WEP_ELECTRO.m_id; // matches attacks better than WEP_VORTEX
+
+                       setanim(self, self.anim_shoot, false, true, true);
+                       self.spawn_time = self.animstate_endtime;
+                       self.spawnshieldtime = self.spawn_time;
+                       self.monster_attackfunc = M_Shambler_Attack;
 
                        return true;
                }
@@ -235,24 +277,8 @@ float m_shambler(float req)
                        precache_model("models/monsters/shambler.mdl");
                        return true;
                }
+               #endif
        }
 
        return true;
 }
-
-#endif // SVQC
-#ifdef CSQC
-float m_shambler(float req)
-{
-       switch(req)
-       {
-               case MR_PRECACHE:
-               {
-                       return true;
-               }
-       }
-
-       return true;
-}
-
-#endif // CSQC
index de5f2c4593d7aa1b241c2949e3df62d596def3b3..0179c66b9add72b73c2a165e64fbd0f4e9fd996d 100644 (file)
@@ -1,21 +1,23 @@
 #ifndef MENUQC
-bool m_spider(int);
+bool M_Spider(int);
 #endif
 REGISTER_MONSTER_SIMPLE(
 /* MON_##id   */ SPIDER,
-/* spawnflags */ MON_FLAG_MELEE | MON_FLAG_RANGED,
+/* spawnflags */ MON_FLAG_MELEE | MON_FLAG_RANGED | MON_FLAG_RIDE,
 /* mins,maxs  */ '-18 -18 -25', '18 18 30',
 /* model      */ "spider.dpm",
 /* netname    */ "spider",
 /* fullname   */ _("Spider")
 ) {
 #ifndef MENUQC
-       this.monster_func = m_spider;
+       this.monster_func = M_Spider;
+       this.monster_func(MR_PRECACHE);
 #endif
 }
 
 #ifdef SVQC
 float autocvar_g_monster_spider_health;
+float autocvar_g_monster_spider_damageforcescale = 0.6;
 float autocvar_g_monster_spider_attack_bite_damage;
 float autocvar_g_monster_spider_attack_bite_delay;
 float autocvar_g_monster_spider_attack_web_damagetime;
@@ -26,19 +28,21 @@ float autocvar_g_monster_spider_speed_stop;
 float autocvar_g_monster_spider_speed_run;
 float autocvar_g_monster_spider_speed_walk;
 
+/*
 const float spider_anim_idle           = 0;
 const float spider_anim_walk           = 1;
 const float spider_anim_attack         = 2;
 const float spider_anim_attack2                = 3;
+*/
 
 .float spider_web_delay;
 
-void spider_web_explode()
+void M_Spider_Attack_Web_Explode()
 {
        entity e;
        if(self)
        {
-               Send_Effect("electro_impact", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_ELECTRO_IMPACT, self.origin, '0 0 0', 1);
                RadiusDamage(self, self.realowner, 0, 0, 25, world, world, 25, self.projectiledeathtype, world);
 
                for(e = findradius(self.origin, 25); e; e = e.chain) if(e != self) if(e.takedamage && e.deadflag == DEAD_NO) if(e.health > 0) if(e.monsterid != MON_SPIDER.monsterid)
@@ -48,14 +52,14 @@ void spider_web_explode()
        }
 }
 
-void spider_web_touch()
+void M_Spider_Attack_Web_Touch()
 {
        PROJECTILE_TOUCH;
 
-       spider_web_explode();
+       M_Spider_Attack_Web_Explode();
 }
 
-void spider_shootweb()
+void M_Spider_Attack_Web()
 {
        monster_makevectors(self.enemy);
 
@@ -64,7 +68,7 @@ void spider_shootweb()
        entity proj = spawn ();
        proj.classname = "plasma";
        proj.owner = proj.realowner = self;
-       proj.use = spider_web_touch;
+       proj.use = M_Spider_Attack_Web_Explode;
        proj.think = adaptor_think2use_hittype_splash;
        proj.bot_dodge = true;
        proj.bot_dodgerating = 0;
@@ -77,7 +81,7 @@ void spider_shootweb()
        //proj.glow_color = 45;
        proj.movetype = MOVETYPE_BOUNCE;
        W_SetupProjVelocity_Explicit(proj, v_forward, v_up, (autocvar_g_monster_spider_attack_web_speed), (autocvar_g_monster_spider_attack_web_speed_up), 0, 0, false);
-       proj.touch = spider_web_touch;
+       proj.touch = M_Spider_Attack_Web_Touch;
        setsize(proj, '-4 -4 -4', '4 4 4');
        proj.takedamage = DAMAGE_NO;
        proj.damageforcescale = 0;
@@ -93,21 +97,22 @@ void spider_shootweb()
        CSQCProjectile(proj, true, PROJECTILE_ELECTRO, true);
 }
 
-float spider_attack(float attack_type)
+bool M_Spider_Attack(int attack_type)
 {
        switch(attack_type)
        {
                case MONSTER_ATTACK_MELEE:
                {
-                       return monster_melee(self.enemy, (autocvar_g_monster_spider_attack_bite_damage), ((random() > 0.5) ? spider_anim_attack : spider_anim_attack2), self.attack_range, (autocvar_g_monster_spider_attack_bite_delay), DEATH_MONSTER_SPIDER, true);
+                       return Monster_Attack_Melee(self.enemy, (autocvar_g_monster_spider_attack_bite_damage), ((random() > 0.5) ? self.anim_melee : self.anim_shoot), self.attack_range, (autocvar_g_monster_spider_attack_bite_delay), DEATH_MONSTER_SPIDER, true);
                }
                case MONSTER_ATTACK_RANGED:
                {
                        if(time >= self.spider_web_delay)
                        {
-                               self.frame = spider_anim_attack2;
+                               setanim(self, self.anim_shoot, true, true, true);
                                self.attack_finished_single = time + (autocvar_g_monster_spider_attack_web_delay);
-                               spider_shootweb();
+                               self.anim_finished = time + 1;
+                               M_Spider_Attack_Web();
                                self.spider_web_delay = time + 3;
                                return true;
                        }
@@ -119,35 +124,53 @@ float spider_attack(float attack_type)
        return false;
 }
 
-void spawnfunc_monster_spider()
-{
-       self.classname = "monster_spider";
-
-       if(!monster_initialize(MON_SPIDER.monsterid)) { remove(self); return; }
-}
+void spawnfunc_monster_spider() { Monster_Spawn(MON_SPIDER.monsterid); }
+#endif // SVQC
 
-float m_spider(float req)
+bool M_Spider(int req)
 {
        switch(req)
        {
+               #ifdef SVQC
                case MR_THINK:
                {
-                       monster_move((autocvar_g_monster_spider_speed_run), (autocvar_g_monster_spider_speed_walk), (autocvar_g_monster_spider_speed_stop), spider_anim_walk, spider_anim_walk, spider_anim_idle);
+                       return true;
+               }
+               case MR_PAIN:
+               {
                        return true;
                }
                case MR_DEATH:
                {
-                       self.frame = spider_anim_attack;
+                       setanim(self, self.anim_melee, false, true, true);
                        self.angles_x = 180;
                        return true;
                }
+               #endif
+               #ifndef MENUQC
+               case MR_ANIM:
+               {
+                       vector none = '0 0 0';
+                       self.anim_walk = animfixfps(self, '1 1 1', none);
+                       self.anim_idle = animfixfps(self, '0 1 1', none);
+                       self.anim_melee = animfixfps(self, '2 1 5', none); // analyze models and set framerate
+                       self.anim_shoot = animfixfps(self, '3 1 5', none); // analyze models and set framerate
+                       self.anim_run = animfixfps(self, '1 1 1', none);
+
+                       return true;
+               }
+               #endif
+               #ifdef SVQC
                case MR_SETUP:
                {
                        if(!self.health) self.health = (autocvar_g_monster_spider_health);
+                       if(!self.speed) { self.speed = (autocvar_g_monster_spider_speed_walk); }
+                       if(!self.speed2) { self.speed2 = (autocvar_g_monster_spider_speed_run); }
+                       if(!self.stopspeed) { self.stopspeed = (autocvar_g_monster_spider_speed_stop); }
+                       if(!self.damageforcescale) { self.damageforcescale = (autocvar_g_monster_spider_damageforcescale); }
 
                        self.monster_loot = spawnfunc_item_health_medium;
-                       self.monster_attackfunc = spider_attack;
-                       self.frame = spider_anim_idle;
+                       self.monster_attackfunc = M_Spider_Attack;
 
                        return true;
                }
@@ -157,24 +180,8 @@ float m_spider(float req)
                        precache_sound (W_Sound("electro_fire2"));
                        return true;
                }
+               #endif
        }
 
        return true;
 }
-
-#endif // SVQC
-#ifdef CSQC
-float m_spider(float req)
-{
-       switch(req)
-       {
-               case MR_PRECACHE:
-               {
-                       return true;
-               }
-       }
-
-       return true;
-}
-
-#endif // CSQC
index 849abc36c395dd9ed4bec60788fd64027176b9eb..9bdc4c63afa57ed7bd000df7894ace290844d187 100644 (file)
@@ -1,21 +1,23 @@
 #ifndef MENUQC
-bool m_wyvern(int);
+bool M_Wyvern(int);
 #endif
 REGISTER_MONSTER_SIMPLE(
 /* MON_##id   */ WYVERN,
-/* spawnflags */ MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED,
+/* spawnflags */ MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED | MON_FLAG_RIDE,
 /* mins,maxs  */ '-20 -20 -58', '20 20 20',
 /* model      */ "wizard.mdl",
 /* netname    */ "wyvern",
 /* fullname   */ _("Wyvern")
 ) {
 #ifndef MENUQC
-       this.monster_func = m_wyvern;
+       this.monster_func = M_Wyvern;
+       this.monster_func(MR_PRECACHE);
 #endif
 }
 
 #ifdef SVQC
 float autocvar_g_monster_wyvern_health;
+float autocvar_g_monster_wyvern_damageforcescale = 0.6;
 float autocvar_g_monster_wyvern_attack_fireball_damage;
 float autocvar_g_monster_wyvern_attack_fireball_edgedamage;
 float autocvar_g_monster_wyvern_attack_fireball_damagetime;
@@ -26,36 +28,38 @@ float autocvar_g_monster_wyvern_speed_stop;
 float autocvar_g_monster_wyvern_speed_run;
 float autocvar_g_monster_wyvern_speed_walk;
 
+/*
 const float wyvern_anim_hover  = 0;
 const float wyvern_anim_fly            = 1;
 const float wyvern_anim_magic  = 2;
 const float wyvern_anim_pain   = 3;
 const float wyvern_anim_death  = 4;
+*/
 
-void wyvern_fireball_explode()
+void M_Wyvern_Attack_Fireball_Explode()
 {
        entity e;
        if(self)
        {
-               Send_Effect("fireball_explode", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_FIREBALL_EXPLODE, self.origin, '0 0 0', 1);
 
                RadiusDamage(self, self.realowner, (autocvar_g_monster_wyvern_attack_fireball_damage), (autocvar_g_monster_wyvern_attack_fireball_edgedamage), (autocvar_g_monster_wyvern_attack_fireball_force), world, world, (autocvar_g_monster_wyvern_attack_fireball_radius), self.projectiledeathtype, world);
 
                for(e = world; (e = findfloat(e, takedamage, DAMAGE_AIM)); ) if(vlen(e.origin - self.origin) <= (autocvar_g_monster_wyvern_attack_fireball_radius))
-                       Fire_AddDamage(e, self, 5 * Monster_SkillModifier(), (autocvar_g_monster_wyvern_attack_fireball_damagetime), self.projectiledeathtype);
+                       Fire_AddDamage(e, self, 5 * MONSTER_SKILLMOD(self), (autocvar_g_monster_wyvern_attack_fireball_damagetime), self.projectiledeathtype);
 
                remove(self);
        }
 }
 
-void wyvern_fireball_touch()
+void M_Wyvern_Attack_Fireball_Touch()
 {
        PROJECTILE_TOUCH;
 
-       wyvern_fireball_explode();
+       M_Wyvern_Attack_Fireball_Explode();
 }
 
-void wyvern_fireball()
+void M_Wyvern_Attack_Fireball()
 {
        entity missile = spawn();
        vector dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
@@ -72,13 +76,13 @@ void wyvern_fireball()
        missile.velocity = dir * (autocvar_g_monster_wyvern_attack_fireball_speed);
        missile.avelocity = '300 300 300';
        missile.nextthink = time + 5;
-       missile.think = wyvern_fireball_explode;
+       missile.think = M_Wyvern_Attack_Fireball_Explode;
        missile.enemy = self.enemy;
-       missile.touch = wyvern_fireball_touch;
+       missile.touch = M_Wyvern_Attack_Fireball_Touch;
        CSQCProjectile(missile, true, PROJECTILE_FIREMINE, true);
 }
 
-float wyvern_attack(float attack_type)
+float M_Wyvern_Attack(float attack_type)
 {
        switch(attack_type)
        {
@@ -86,8 +90,9 @@ float wyvern_attack(float attack_type)
                case MONSTER_ATTACK_RANGED:
                {
                        self.attack_finished_single = time + 1.2;
+                       self.anim_finished = time + 1.2;
 
-                       wyvern_fireball();
+                       M_Wyvern_Attack_Fireball();
 
                        return true;
                }
@@ -96,40 +101,58 @@ float wyvern_attack(float attack_type)
        return false;
 }
 
-void spawnfunc_monster_wyvern()
-{
-       self.classname = "monster_wyvern";
-
-       if(!monster_initialize(MON_WYVERN.monsterid)) { remove(self); return; }
-}
-
-// compatibility with old spawns
-void spawnfunc_monster_wizard() { spawnfunc_monster_wyvern(); }
+void spawnfunc_monster_wyvern() { Monster_Spawn(MON_WYVERN.monsterid); }
+#endif // SVQC
 
-float m_wyvern(float req)
+bool M_Wyvern(int req)
 {
        switch(req)
        {
+               #ifdef SVQC
                case MR_THINK:
                {
-                       monster_move((autocvar_g_monster_wyvern_speed_run), (autocvar_g_monster_wyvern_speed_walk), (autocvar_g_monster_wyvern_speed_stop), wyvern_anim_fly, wyvern_anim_hover, wyvern_anim_hover);
+                       return true;
+               }
+               case MR_PAIN:
+               {
+                       self.pain_finished = time + 0.5;
+                       setanim(self, self.anim_pain1, true, true, false);
                        return true;
                }
                case MR_DEATH:
                {
-                       self.frame = wyvern_anim_death;
+                       setanim(self, self.anim_die1, false, true, true);
                        self.velocity_x = -200 + 400 * random();
                        self.velocity_y = -200 + 400 * random();
                        self.velocity_z = 100 + 100 * random();
                        return true;
                }
+               #endif
+               #ifndef MENUQC
+               case MR_ANIM:
+               {
+                       vector none = '0 0 0';
+                       self.anim_die1 = animfixfps(self, '4 1 0.5', none); // 2 seconds
+                       self.anim_walk = animfixfps(self, '1 1 1', none);
+                       self.anim_idle = animfixfps(self, '0 1 1', none);
+                       self.anim_pain1 = animfixfps(self, '3 1 2', none); // 0.5 seconds
+                       self.anim_shoot = animfixfps(self, '2 1 5', none); // analyze models and set framerate
+                       self.anim_run = animfixfps(self, '1 1 1', none);
+
+                       return true;
+               }
+               #endif
+               #ifdef SVQC
                case MR_SETUP:
                {
                        if(!self.health) self.health = (autocvar_g_monster_wyvern_health);
+                       if(!self.speed) { self.speed = (autocvar_g_monster_wyvern_speed_walk); }
+                       if(!self.speed2) { self.speed2 = (autocvar_g_monster_wyvern_speed_run); }
+                       if(!self.stopspeed) { self.stopspeed = (autocvar_g_monster_wyvern_speed_stop); }
+                       if(!self.damageforcescale) { self.damageforcescale = (autocvar_g_monster_wyvern_damageforcescale); }
 
                        self.monster_loot = spawnfunc_item_cells;
-                       self.monster_attackfunc = wyvern_attack;
-                       self.frame = wyvern_anim_hover;
+                       self.monster_attackfunc = M_Wyvern_Attack;
 
                        return true;
                }
@@ -138,24 +161,8 @@ float m_wyvern(float req)
                        precache_model("models/monsters/wizard.mdl");
                        return true;
                }
+               #endif
        }
 
        return true;
 }
-
-#endif // SVQC
-#ifdef CSQC
-float m_wyvern(float req)
-{
-       switch(req)
-       {
-               case MR_PRECACHE:
-               {
-                       return true;
-               }
-       }
-
-       return true;
-}
-
-#endif // CSQC
index 0f20daceda3d1027265ea0183b4e2718405acec3..780cf74b381dadb7fc5db70ee4f45bef5fa63e11 100644 (file)
@@ -1,21 +1,23 @@
 #ifndef MENUQC
-bool m_zombie(int);
+bool M_Zombie(int);
 #endif
 REGISTER_MONSTER_SIMPLE(
 /* MON_##id   */ ZOMBIE,
-/* spawnflags */ MON_FLAG_MELEE,
+/* spawnflags */ MON_FLAG_MELEE | MON_FLAG_RIDE,
 /* mins,maxs  */ '-18 -18 -25', '18 18 47',
 /* model      */ "zombie.dpm",
 /* netname    */ "zombie",
 /* fullname   */ _("Zombie")
 ) {
 #ifndef MENUQC
-       this.monster_func = m_zombie;
+       this.monster_func = M_Zombie;
+       this.monster_func(MR_PRECACHE);
 #endif
 }
 
 #ifdef SVQC
 float autocvar_g_monster_zombie_health;
+float autocvar_g_monster_zombie_damageforcescale = 0.55;
 float autocvar_g_monster_zombie_attack_melee_damage;
 float autocvar_g_monster_zombie_attack_melee_delay;
 float autocvar_g_monster_zombie_attack_leap_damage;
@@ -26,6 +28,7 @@ float autocvar_g_monster_zombie_speed_stop;
 float autocvar_g_monster_zombie_speed_run;
 float autocvar_g_monster_zombie_speed_walk;
 
+/*
 const float zombie_anim_attackleap                     = 0;
 const float zombie_anim_attackrun1                     = 1;
 const float zombie_anim_attackrun2                     = 2;
@@ -57,8 +60,9 @@ const float zombie_anim_runforward                    = 27;
 const float zombie_anim_runforwardleft         = 28;
 const float zombie_anim_runforwardright                = 29;
 const float zombie_anim_spawn                          = 30;
+*/
 
-void zombie_attack_leap_touch()
+void M_Zombie_Attack_Leap_Touch()
 {
        if (self.health <= 0)
                return;
@@ -69,93 +73,128 @@ void zombie_attack_leap_touch()
        {
                angles_face = vectoangles(self.moveto - self.origin);
                angles_face = normalize(angles_face) * (autocvar_g_monster_zombie_attack_leap_force);
-               Damage(other, self, self, (autocvar_g_monster_zombie_attack_leap_damage) * Monster_SkillModifier(), DEATH_MONSTER_ZOMBIE_JUMP, other.origin, angles_face);
-               self.touch = MonsterTouch; // instantly turn it off to stop damage spam
+               Damage(other, self, self, (autocvar_g_monster_zombie_attack_leap_damage) * MONSTER_SKILLMOD(self), DEATH_MONSTER_ZOMBIE_JUMP, other.origin, angles_face);
+               self.touch = Monster_Touch; // instantly turn it off to stop damage spam
+               self.state = 0;
        }
 
        if (trace_dphitcontents)
-               self.touch = MonsterTouch;
+       {
+               self.state = 0;
+               self.touch = Monster_Touch;
+       }
 }
 
-void zombie_blockend()
+void M_Zombie_Defend_Block_End()
 {
        if(self.health <= 0)
                return;
 
-       self.frame = zombie_anim_blockend;
-       self.armorvalue = 0;
-       self.m_armor_blockpercent = autocvar_g_monsters_armor_blockpercent;
+       setanim(self, self.anim_blockend, false, true, true);
+       self.armorvalue = autocvar_g_monsters_armor_blockpercent;
 }
 
-float zombie_block()
+float M_Zombie_Defend_Block()
 {
-       self.frame = zombie_anim_blockstart;
-       self.armorvalue = 100;
-       self.m_armor_blockpercent = 0.9;
-       self.state = MONSTER_STATE_ATTACK_MELEE; // freeze monster
+       self.armorvalue = 0.9;
+       self.state = MONSTER_ATTACK_MELEE; // freeze monster
        self.attack_finished_single = time + 2.1;
+       self.anim_finished = self.attack_finished_single;
+       setanim(self, self.anim_blockstart, false, true, true);
 
-       defer(2, zombie_blockend);
+       Monster_Delay(1, 0, 2, M_Zombie_Defend_Block_End);
 
        return true;
 }
 
-float zombie_attack(float attack_type)
+float M_Zombie_Attack(float attack_type)
 {
        switch(attack_type)
        {
                case MONSTER_ATTACK_MELEE:
                {
-                       float rand = random(), chosen_anim;
+                       if(random() < 0.3 && self.health < 75 && self.enemy.health > 10)
+                               return M_Zombie_Defend_Block();
+
+                       float rand = random();
+                       vector chosen_anim;
 
                        if(rand < 0.33)
-                               chosen_anim = zombie_anim_attackstanding1;
+                               chosen_anim = self.anim_melee1;
                        else if(rand < 0.66)
-                               chosen_anim = zombie_anim_attackstanding2;
+                               chosen_anim = self.anim_melee2;
                        else
-                               chosen_anim = zombie_anim_attackstanding3;
+                               chosen_anim = self.anim_melee3;
 
-                       if(random() < 0.3 && self.health < 75 && self.enemy.health > 10)
-                               return zombie_block();
-
-                       return monster_melee(self.enemy, (autocvar_g_monster_zombie_attack_melee_damage), chosen_anim, self.attack_range, (autocvar_g_monster_zombie_attack_melee_delay), DEATH_MONSTER_ZOMBIE_MELEE, true);
+                       return Monster_Attack_Melee(self.enemy, (autocvar_g_monster_zombie_attack_melee_damage), chosen_anim, self.attack_range, (autocvar_g_monster_zombie_attack_melee_delay), DEATH_MONSTER_ZOMBIE_MELEE, true);
                }
                case MONSTER_ATTACK_RANGED:
                {
                        makevectors(self.angles);
-                       return monster_leap(zombie_anim_attackleap, zombie_attack_leap_touch, v_forward * (autocvar_g_monster_zombie_attack_leap_speed) + '0 0 200', (autocvar_g_monster_zombie_attack_leap_delay));
+                       return Monster_Attack_Leap(self.anim_shoot, M_Zombie_Attack_Leap_Touch, v_forward * (autocvar_g_monster_zombie_attack_leap_speed) + '0 0 200', (autocvar_g_monster_zombie_attack_leap_delay));
                }
        }
 
        return false;
 }
 
-void spawnfunc_monster_zombie()
-{
-       self.classname = "monster_zombie";
-
-       if(!monster_initialize(MON_ZOMBIE.monsterid)) { remove(self); return; }
-}
+void spawnfunc_monster_zombie() { Monster_Spawn(MON_ZOMBIE.monsterid); }
+#endif // SVQC
 
-float m_zombie(float req)
+bool M_Zombie(int req)
 {
        switch(req)
        {
+               #ifdef SVQC
                case MR_THINK:
                {
-                       monster_move((autocvar_g_monster_zombie_speed_run), (autocvar_g_monster_zombie_speed_walk), (autocvar_g_monster_zombie_speed_stop), zombie_anim_runforward, zombie_anim_runforward, zombie_anim_idle);
+                       if(time >= self.spawn_time)
+                               self.damageforcescale = autocvar_g_monster_zombie_damageforcescale;
+                       return true;
+               }
+               case MR_PAIN:
+               {
+                       self.pain_finished = time + 0.34;
+                       setanim(self, ((random() > 0.5) ? self.anim_pain1 : self.anim_pain2), true, true, false);
                        return true;
                }
                case MR_DEATH:
                {
-                       self.armorvalue = 0;
-                       self.m_armor_blockpercent = autocvar_g_monsters_armor_blockpercent;
-                       self.frame = ((random() > 0.5) ? zombie_anim_deathback1 : zombie_anim_deathfront1);
+                       self.armorvalue = autocvar_g_monsters_armor_blockpercent;
+
+                       setanim(self, ((random() > 0.5) ? self.anim_die1 : self.anim_die2), false, true, true);
                        return true;
                }
+               #endif
+               #ifndef MENUQC
+               case MR_ANIM:
+               {
+                       vector none = '0 0 0';
+                       self.anim_die1 = animfixfps(self, '9 1 0.5', none); // 2 seconds
+                       self.anim_die2 = animfixfps(self, '12 1 0.5', none); // 2 seconds
+                       self.anim_spawn = animfixfps(self, '30 1 3', none);
+                       self.anim_walk = animfixfps(self, '27 1 1', none);
+                       self.anim_idle = animfixfps(self, '19 1 1', none);
+                       self.anim_pain1 = animfixfps(self, '20 1 2', none); // 0.5 seconds
+                       self.anim_pain2 = animfixfps(self, '22 1 2', none); // 0.5 seconds
+                       self.anim_melee1 = animfixfps(self, '4 1 5', none); // analyze models and set framerate
+                       self.anim_melee2 = animfixfps(self, '4 1 5', none); // analyze models and set framerate
+                       self.anim_melee3 = animfixfps(self, '4 1 5', none); // analyze models and set framerate
+                       self.anim_shoot = animfixfps(self, '0 1 5', none); // analyze models and set framerate
+                       self.anim_run = animfixfps(self, '27 1 1', none);
+                       self.anim_blockstart = animfixfps(self, '8 1 1', none);
+                       self.anim_blockend = animfixfps(self, '7 1 1', none);
+
+                       return true;
+               }
+               #endif
+               #ifdef SVQC
                case MR_SETUP:
                {
                        if(!self.health) self.health = (autocvar_g_monster_zombie_health);
+                       if(!self.speed) { self.speed = (autocvar_g_monster_zombie_speed_walk); }
+                       if(!self.speed2) { self.speed2 = (autocvar_g_monster_zombie_speed_run); }
+                       if(!self.stopspeed) { self.stopspeed = (autocvar_g_monster_zombie_speed_stop); }
 
                        if(self.spawnflags & MONSTERFLAG_NORESPAWN)
                                self.spawnflags &= ~MONSTERFLAG_NORESPAWN; // zombies always respawn
@@ -163,11 +202,13 @@ float m_zombie(float req)
                        self.spawnflags |= MONSTER_RESPAWN_DEATHPOINT;
 
                        self.monster_loot = spawnfunc_item_health_medium;
-                       self.monster_attackfunc = zombie_attack;
-                       self.frame = zombie_anim_spawn;
-                       self.spawn_time = time + 2.1;
+                       self.monster_attackfunc = M_Zombie_Attack;
                        self.spawnshieldtime = self.spawn_time;
                        self.respawntime = 0.2;
+                       self.damageforcescale = 0.0001; // no push while spawning
+
+                       setanim(self, self.anim_spawn, false, true, true);
+                       self.spawn_time = self.animstate_endtime;
 
                        return true;
                }
@@ -176,24 +217,8 @@ float m_zombie(float req)
                        precache_model("models/monsters/zombie.dpm");
                        return true;
                }
+               #endif
        }
 
        return true;
 }
-
-#endif // SVQC
-#ifdef CSQC
-float m_zombie(float req)
-{
-       switch(req)
-       {
-               case MR_PRECACHE:
-               {
-                       return true;
-               }
-       }
-
-       return true;
-}
-
-#endif // CSQC
index 5bfef1b8f574ab407250f1ba0433df9346488658..4a84f943584499708acab79e9a387ab8909f7dc5 100644 (file)
 #endif
 entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag)
 {
-       // ensure spawnfunc database is initialized
-       //initialize_field_db();
-
+       float i;
        entity e = spawn();
-       float i;
 
        e.spawnflags = MONSTERFLAG_SPAWNED;
 
-       if(!respwn)
-               e.spawnflags |= MONSTERFLAG_NORESPAWN;
-
-       if(invincible)
-               e.spawnflags |= MONSTERFLAG_INVINCIBLE;
+       if(!respwn) { e.spawnflags |= MONSTERFLAG_NORESPAWN; }
+       if(invincible) { e.spawnflags |= MONSTERFLAG_INVINCIBLE; }
 
        setorigin(e, orig);
 
@@ -31,12 +25,11 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity
        {
                RandomSelection_Init();
                for(i = MON_FIRST; i <= MON_LAST; ++i)
-                       RandomSelection_Add(world, 0, (get_monsterinfo(i)).netname, 1, 1);
+                       RandomSelection_Add(world, i, string_null, 1, 1);
 
-               monster = RandomSelection_chosen_string;
+           monster_id = RandomSelection_chosen_float;
        }
-
-       if(monster != "")
+       else if(monster != "")
        {
                float found = 0;
                entity mon;
@@ -51,13 +44,9 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity
                        }
                }
                if(!found)
-                       monster = (get_monsterinfo(MON_FIRST)).netname;
+                       monster_id = ((monster_id > 0) ? monster_id : MON_FIRST);
        }
 
-       if(monster == "")
-       if(monster_id)
-               monster = (get_monsterinfo(monster_id)).netname;
-
        e.realowner = spawnedby;
 
        if(moveflag)
@@ -69,19 +58,16 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity
                        e.team = spawnedby.team; // colors handled in spawn code
 
                if(autocvar_g_monsters_owners)
-                       e.monster_owner = own; // using .owner makes the monster non-solid for its master
+                       e.monster_follow = own; // using .owner makes the monster non-solid for its master
 
-               e.angles = spawnedby.angles;
+               e.angles_y = spawnedby.angles_y;
        }
-
-       //monster = strcat("$ spawnfunc_monster_", monster);
-
+       
+       // Monster_Spawn checks if monster is valid
        entity oldself = self;
        self = e;
-       monster_initialize(monster_id);
+       Monster_Spawn(monster_id);
        self = oldself;
 
-       //target_spawn_edit_entity(e, monster, world, world, world, world, world);
-
        return e;
 }
index 6a3553b1cc3b141f97811f7a537312a2eac289a8..e7ea9f8c48520182793b32e30a25a6457e6e1774 100644 (file)
     #include "../../server/round_handler.qh"
 #endif
 
-// =========================
-//     SVQC Monster Properties
-// =========================
-
+void monsters_setstatus()
+{
+       self.stat_monsters_total = monsters_total;
+       self.stat_monsters_killed = monsters_killed;
+}
 
 void monster_dropitem()
 {
@@ -61,109 +62,87 @@ void monster_dropitem()
        }
 }
 
-float Monster_SkillModifier()
-{
-       float t = 0.5+self.monster_skill*((1.2-0.3)/10);
-
-       return t;
-}
-
-float monster_isvalidtarget (entity targ, entity ent)
+void monster_makevectors(entity e)
 {
-       if(!targ || !ent)
-               return false; // someone doesn't exist
-
-       if(targ == ent)
-               return false; // don't attack ourselves
-
-       //traceline(ent.origin, targ.origin, MOVE_NORMAL, ent);
-
-       //if(trace_ent != targ)
-               //return false;
-
-       if(IS_VEHICLE(targ))
-       if(!((get_monsterinfo(ent.monsterid)).spawnflags & MON_FLAG_RANGED))
-               return false; // melee attacks are useless against vehicles
-
-       if(time < game_starttime)
-               return false; // monsters do nothing before the match has started
-
-       if(targ.takedamage == DAMAGE_NO)
-               return false; // enemy can't be damaged
-
-       if(targ.items & IT_INVISIBILITY)
-               return false; // enemy is invisible
-
-       if(substring(targ.classname, 0, 10) == "onslaught_")
-               return false; // don't attack onslaught targets
-
-       if(IS_SPEC(targ) || IS_OBSERVER(targ))
-               return false; // enemy is a spectator
-
-       if(!IS_VEHICLE(targ))
-       if(targ.deadflag != DEAD_NO || ent.deadflag != DEAD_NO || targ.health <= 0 || ent.health <= 0)
-               return false; // enemy/self is dead
+       if(IS_MONSTER(self))
+       {
+               vector v;
 
-       if(ent.monster_owner == targ)
-               return false; // don't attack our master
+               v = e.origin + (e.mins + e.maxs) * 0.5;
+               self.v_angle = vectoangles(v - (self.origin + self.view_ofs));
+               self.v_angle_x = -self.v_angle_x;
+       }
 
-       if(targ.monster_owner == ent)
-               return false; // don't attack our pet
+       makevectors(self.v_angle);
+}
 
-       if(!IS_VEHICLE(targ))
-       if(targ.flags & FL_NOTARGET)
-               return false; // enemy can't be targeted
+// ===============
+// Target handling
+// ===============
 
-       if(!autocvar_g_monsters_typefrag)
-       if(targ.BUTTON_CHAT)
-               return false; // no typefragging!
+bool Monster_ValidTarget(entity mon, entity player)
+{
+       // ensure we're not checking nonexistent monster/target
+       if(!mon || !player) { return false; }
+
+       if((player == mon)
+       || (autocvar_g_monsters_lineofsight && !checkpvs(mon.origin + mon.view_ofs, player)) // enemy cannot be seen
+       || (IS_VEHICLE(player) && !((get_monsterinfo(mon.monsterid)).spawnflags & MON_FLAG_RANGED)) // melee vs vehicle is useless
+       || (time < game_starttime) // monsters do nothing before match has started
+       || (player.takedamage == DAMAGE_NO)
+       || (player.items & IT_INVISIBILITY)
+       || (IS_SPEC(player) || IS_OBSERVER(player)) // don't attack spectators
+       || (!IS_VEHICLE(player) && (player.deadflag != DEAD_NO || mon.deadflag != DEAD_NO || player.health <= 0 || mon.health <= 0))
+       || (mon.monster_follow == player || player.monster_follow == mon)
+       || (!IS_VEHICLE(player) && (player.flags & FL_NOTARGET))
+       || (!autocvar_g_monsters_typefrag && player.BUTTON_CHAT)
+       || (SAME_TEAM(player, mon))
+       || (player.frozen)
+       || (player.alpha != 0 && player.alpha < 0.5)
+       )
+       {
+               // if any of the above checks fail, target is not valid
+               return false;
+       }
 
-       if(SAME_TEAM(targ, ent))
-               return false; // enemy is on our team
+       traceline(mon.origin + self.view_ofs, player.origin, 0, mon);
 
-       if (targ.frozen)
-               return false; // ignore frozen
+       if((trace_fraction < 1) && (trace_ent != player))
+               return false;
 
-       if(autocvar_g_monsters_target_infront || (ent.spawnflags & MONSTERFLAG_INFRONT))
-       if(ent.enemy != targ)
+       if(autocvar_g_monsters_target_infront || (mon.spawnflags & MONSTERFLAG_INFRONT))
+       if(mon.enemy != player)
        {
                float dot;
 
-               makevectors (ent.angles);
-               dot = normalize (targ.origin - ent.origin) * v_forward;
+               makevectors (mon.angles);
+               dot = normalize (player.origin - mon.origin) * v_forward;
 
-               if(dot <= 0.3)
-                       return false;
+               if(dot <= 0.3) { return false; }
        }
 
-       return true;
+       return true; // this target is valid!
 }
 
-entity FindTarget (entity ent)
+entity Monster_FindTarget(entity mon)
 {
-       if(MUTATOR_CALLHOOK(MonsterFindTarget)) { return ent.enemy; } // Handled by a mutator
+       if(MUTATOR_CALLHOOK(MonsterFindTarget)) { return mon.enemy; } // Handled by a mutator
 
        entity head, closest_target = world;
-       head = findradius(ent.origin, ent.target_range);
-       //head = WarpZone_FindRadius(ent.origin, ent.target_range, true);
+       head = findradius(mon.origin, mon.target_range);
 
        while(head) // find the closest acceptable target to pass to
        {
                if(head.monster_attack)
-               if(monster_isvalidtarget(head, ent))
+               if(Monster_ValidTarget(mon, head))
                {
                        // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc)
                        vector head_center = CENTER_OR_VIEWOFS(head);
-                       //vector head_center = WarpZone_UnTransformOrigin(head, CENTER_OR_VIEWOFS(head));
-                       vector ent_center = CENTER_OR_VIEWOFS(ent);
+                       vector ent_center = CENTER_OR_VIEWOFS(mon);
 
-                       traceline(ent_center, head_center, MOVE_NORMAL, ent);
-
-                       if(trace_ent == head)
                        if(closest_target)
                        {
                                vector closest_target_center = CENTER_OR_VIEWOFS(closest_target);
-                               //vector closest_target_center = WarpZone_UnTransformOrigin(closest_target, CENTER_OR_VIEWOFS(closest_target));
                                if(vlen(ent_center - head_center) < vlen(ent_center - closest_target_center))
                                        { closest_target = head; }
                        }
@@ -176,17 +155,84 @@ entity FindTarget (entity ent)
        return closest_target;
 }
 
-void MonsterTouch ()
+void monster_setupcolors(entity mon)
 {
-       if(other == world)
-               return;
+       if(IS_PLAYER(mon.realowner))
+               mon.colormap = mon.realowner.colormap;
+       else if(teamplay && mon.team)
+               mon.colormap = 1024 + (mon.team - 1) * 17;
+       else
+       {
+               if(mon.monster_skill <= MONSTER_SKILL_EASY)
+                       mon.colormap = 1029;
+               else if(mon.monster_skill <= MONSTER_SKILL_MEDIUM)
+                       mon.colormap = 1027;
+               else if(mon.monster_skill <= MONSTER_SKILL_HARD)
+                       mon.colormap = 1038;
+               else if(mon.monster_skill <= MONSTER_SKILL_INSANE)
+                       mon.colormap = 1028;
+               else if(mon.monster_skill <= MONSTER_SKILL_NIGHTMARE)
+                       mon.colormap = 1032;
+               else
+                       mon.colormap = 1024;
+       }
+}
 
-       if(self.enemy != other)
-       if(!IS_MONSTER(other))
-       if(monster_isvalidtarget(other, self))
-               self.enemy = other;
+void monster_changeteam(entity ent, float newteam)
+{
+       if(!teamplay) { return; }
+       
+       ent.team = newteam;
+       ent.monster_attack = true; // new team, activate attacking
+       monster_setupcolors(ent);
+       
+       if(ent.sprite)
+       {
+               WaypointSprite_UpdateTeamRadar(ent.sprite, RADARICON_DANGER, ((newteam) ? Team_ColorRGB(newteam) : '1 0 0'));
+
+               ent.sprite.team = newteam;
+               ent.sprite.SendFlags |= 1;
+       }
+}
+
+void Monster_Delay_Action()
+{
+       entity oldself = self;
+       self = self.owner;
+       if(Monster_ValidTarget(self, self.enemy)) { oldself.use(); }
+
+       if(oldself.cnt > 0)
+       {
+               oldself.cnt -= 1;
+               oldself.think = Monster_Delay_Action;
+               oldself.nextthink = time + oldself.respawn_time;
+       }
+       else
+       {
+               oldself.think = SUB_Remove;
+               oldself.nextthink = time;
+       }
 }
 
+void Monster_Delay(float repeat_count, float repeat_defer, float defer_amnt, void() func)
+{
+       // deferred attacking, checks if monster is still alive and target is still valid before attacking
+       entity e = spawn();
+
+       e.think = Monster_Delay_Action;
+       e.nextthink = time + defer_amnt;
+       e.count = defer_amnt;
+       e.owner = self;
+       e.use = func;
+       e.cnt = repeat_count;
+       e.respawn_time = repeat_defer;
+}
+
+
+// ==============
+// Monster sounds
+// ==============
+
 string get_monster_model_datafilename(string m, float sk, string fil)
 {
        if(m)
@@ -200,7 +246,7 @@ string get_monster_model_datafilename(string m, float sk, string fil)
        return strcat(m, ".", fil);
 }
 
-void PrecacheMonsterSounds(string f)
+void Monster_Sound_Precache(string f)
 {
        float fh;
        string s;
@@ -211,7 +257,7 @@ void PrecacheMonsterSounds(string f)
        {
                if(tokenize_console(s) != 3)
                {
-                       dprint("Invalid sound info line: ", s, "\n");
+                       LOG_TRACE("Invalid sound info line: ", s, "\n");
                        continue;
                }
                PrecacheGlobalSound(strcat(argv(1), " ", argv(2)));
@@ -219,7 +265,7 @@ void PrecacheMonsterSounds(string f)
        fclose(fh);
 }
 
-void precache_monstersounds()
+void Monster_Sounds_Precache()
 {
        string m = (get_monsterinfo(self.monsterid)).model;
        float globhandle, n, i;
@@ -233,19 +279,19 @@ void precache_monstersounds()
        {
                //print(search_getfilename(globhandle, i), "\n");
                f = search_getfilename(globhandle, i);
-               PrecacheMonsterSounds(f);
+               Monster_Sound_Precache(f);
        }
        search_end(globhandle);
 }
 
-void ClearMonsterSounds()
+void Monster_Sounds_Clear()
 {
 #define _MSOUND(m) if(self.monstersound_##m) { strunzone(self.monstersound_##m); self.monstersound_##m = string_null; }
        ALLMONSTERSOUNDS
 #undef _MSOUND
 }
 
-.string GetMonsterSoundSampleField(string type)
+.string Monster_Sound_SampleField(string type)
 {
        GetMonsterSoundSampleField_notFound = 0;
        switch(type)
@@ -258,7 +304,7 @@ void ClearMonsterSounds()
        return string_null;
 }
 
-float LoadMonsterSounds(string f, float first)
+bool Monster_Sounds_Load(string f, int first)
 {
        float fh;
        string s;
@@ -266,14 +312,14 @@ float LoadMonsterSounds(string f, float first)
        fh = fopen(f, FILE_READ);
        if(fh < 0)
        {
-               dprint("Monster sound file not found: ", f, "\n");
-               return 0;
+               LOG_TRACE("Monster sound file not found: ", f, "\n");
+               return false;
        }
        while((s = fgets(fh)))
        {
                if(tokenize_console(s) != 3)
                        continue;
-               field = GetMonsterSoundSampleField(argv(0));
+               field = Monster_Sound_SampleField(argv(0));
                if(GetMonsterSoundSampleField_notFound)
                        continue;
                if (self.(field))
@@ -281,25 +327,21 @@ float LoadMonsterSounds(string f, float first)
                self.(field) = strzone(strcat(argv(1), " ", argv(2)));
        }
        fclose(fh);
-       return 1;
+       return true;
 }
 
 .int skin_for_monstersound;
-void UpdateMonsterSounds()
+void Monster_Sounds_Update()
 {
-       entity mon = get_monsterinfo(self.monsterid);
+       if(self.skin == self.skin_for_monstersound) { return; }
 
-       if(self.skin == self.skin_for_monstersound)
-               return;
        self.skin_for_monstersound = self.skin;
-       ClearMonsterSounds();
-       //LoadMonsterSounds("sound/monsters/default.sounds", 1);
-       if(!autocvar_g_debug_defaultsounds)
-       if(!LoadMonsterSounds(get_monster_model_datafilename(mon.model, self.skin, "sounds"), 0))
-               LoadMonsterSounds(get_monster_model_datafilename(mon.model, 0, "sounds"), 0);
+       Monster_Sounds_Clear();
+       if(!Monster_Sounds_Load(get_monster_model_datafilename(self.model, self.skin, "sounds"), 0))
+               Monster_Sounds_Load(get_monster_model_datafilename(self.model, 0, "sounds"), 0);
 }
 
-void MonsterSound(.string samplefield, float sound_delay, float delaytoo, float chan)
+void Monster_Sound(.string samplefield, float sound_delay, float delaytoo, float chan)
 {
        if(!autocvar_g_monsters_sounds) { return; }
 
@@ -311,45 +353,139 @@ void MonsterSound(.string samplefield, float sound_delay, float delaytoo, float
        self.msound_delay = time + sound_delay;
 }
 
-void monster_makevectors(entity e)
+
+// =======================
+// Monster attack handlers
+// =======================
+
+float Monster_Attack_Melee(entity targ, float damg, vector anim, float er, float animtime, int deathtype, float dostop)
 {
-       vector v;
+       if(dostop && (self.flags & FL_MONSTER)) { self.state = MONSTER_ATTACK_MELEE; }
 
-       v = e.origin + (e.mins + e.maxs) * 0.5;
-       self.v_angle = vectoangles(v - (self.origin + self.view_ofs));
-       self.v_angle_x = -self.v_angle.x;
+       setanim(self, anim, false, true, false);
 
-       makevectors(self.v_angle);
+       if(self.animstate_endtime > time && (self.flags & FL_MONSTER))
+               self.attack_finished_single = self.anim_finished = self.animstate_endtime;
+       else
+               self.attack_finished_single = self.anim_finished = time + animtime;
+
+       monster_makevectors(targ);
+
+       traceline(self.origin + self.view_ofs, self.origin + v_forward * er, 0, self);
+
+       if(trace_ent.takedamage)
+               Damage(trace_ent, self, self, damg * MONSTER_SKILLMOD(self), deathtype, trace_ent.origin, normalize(trace_ent.origin - self.origin));
+
+       return true;
 }
 
-float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop)
+float Monster_Attack_Leap_Check(vector vel)
 {
-       if (self.health <= 0)
-               return false; // attacking while dead?!
+       if(self.state && (self.flags & FL_MONSTER))
+               return false; // already attacking
+       if(!(self.flags & FL_ONGROUND))
+               return false; // not on the ground
+       if(self.health <= 0)
+               return false; // called when dead?
+       if(time < self.attack_finished_single)
+               return false; // still attacking
+
+       vector old = self.velocity;
+
+       self.velocity = vel;
+       tracetoss(self, self);
+       self.velocity = old;
+       if (trace_ent != self.enemy)
+               return false;
+
+       return true;
+}
+
+bool Monster_Attack_Leap(vector anm, void() touchfunc, vector vel, float animtime)
+{
+       if(!Monster_Attack_Leap_Check(vel))
+               return false;
+
+       setanim(self, anm, false, true, false);
+
+       if(self.animstate_endtime > time && (self.flags & FL_MONSTER))
+               self.attack_finished_single = self.anim_finished = self.animstate_endtime;
+       else
+               self.attack_finished_single = self.anim_finished = time + animtime;
 
-       if(dostop)
+       if(self.flags & FL_MONSTER)
+               self.state = MONSTER_ATTACK_RANGED;
+       self.touch = touchfunc;
+       self.origin_z += 1;
+       self.velocity = vel;
+       self.flags &= ~FL_ONGROUND;
+
+       return true;
+}
+
+void Monster_Attack_Check(entity e, entity targ)
+{
+       if((e == world || targ == world)
+       || (!e.monster_attackfunc)
+       || (time < e.attack_finished_single)
+       ) { return; }
+
+       float targ_vlen = vlen(targ.origin - e.origin);
+
+       if(targ_vlen <= e.attack_range)
        {
-               self.velocity_x = 0;
-               self.velocity_y = 0;
-               self.state = MONSTER_STATE_ATTACK_MELEE;
+               float attack_success = e.monster_attackfunc(MONSTER_ATTACK_MELEE);
+               if(attack_success == 1)
+                       Monster_Sound(monstersound_melee, 0, false, CH_VOICE);
+               else if(attack_success > 0)
+                       return;
        }
 
-       self.frame = anim;
+       if(targ_vlen > e.attack_range)
+       {
+               float attack_success = e.monster_attackfunc(MONSTER_ATTACK_RANGED);
+               if(attack_success == 1)
+                       Monster_Sound(monstersound_melee, 0, false, CH_VOICE);
+               else if(attack_success > 0)
+                       return;
+       }
+}
 
-       if(anim_finished != 0)
-               self.attack_finished_single = time + anim_finished;
 
-       monster_makevectors(targ);
+// ======================
+// Main monster functions
+// ======================
 
-       traceline(self.origin + self.view_ofs, self.origin + v_forward * er, 0, self);
+void Monster_UpdateModel()
+{
+       // assume some defaults
+       /*self.anim_idle   = animfixfps(self, '0 1 0.01', '0 0 0');
+       self.anim_walk   = animfixfps(self, '1 1 0.01', '0 0 0');
+       self.anim_run    = animfixfps(self, '2 1 0.01', '0 0 0');
+       self.anim_fire1  = animfixfps(self, '3 1 0.01', '0 0 0');
+       self.anim_fire2  = animfixfps(self, '4 1 0.01', '0 0 0');
+       self.anim_melee  = animfixfps(self, '5 1 0.01', '0 0 0');
+       self.anim_pain1  = animfixfps(self, '6 1 0.01', '0 0 0');
+       self.anim_pain2  = animfixfps(self, '7 1 0.01', '0 0 0');
+       self.anim_die1   = animfixfps(self, '8 1 0.01', '0 0 0');
+       self.anim_die2   = animfixfps(self, '9 1 0.01', '0 0 0');*/
+
+       // then get the real values
+       MON_ACTION(self.monsterid, MR_ANIM);
+}
 
-       if(trace_ent.takedamage)
-               Damage(trace_ent, self, self, damg * Monster_SkillModifier(), deathtype, trace_ent.origin, normalize(trace_ent.origin - self.origin));
+void Monster_Touch()
+{
+       if(other == world) { return; }
 
-       return true;
+       if(other.monster_attack)
+       if(self.enemy != other)
+       if(!IS_MONSTER(other))
+       if(Monster_ValidTarget(self, other))
+               self.enemy = other;
 }
 
-void Monster_CheckMinibossFlag ()
+void Monster_Miniboss_Check()
 {
        if(MUTATOR_CALLHOOK(MonsterCheckBossFlag))
                return;
@@ -366,14 +502,13 @@ void Monster_CheckMinibossFlag ()
        }
 }
 
-float Monster_CanRespawn(entity ent)
+bool Monster_Respawn_Check()
 {
-       other = ent;
-       if(ent.deadflag == DEAD_DEAD) // don't call when monster isn't dead
-       if(MUTATOR_CALLHOOK(MonsterRespawn, ent))
+       if(self.deadflag == DEAD_DEAD) // don't call when monster isn't dead
+       if(MUTATOR_CALLHOOK(MonsterRespawn, self))
                return true; // enabled by a mutator
 
-       if(ent.spawnflags & MONSTERFLAG_NORESPAWN)
+       if(self.spawnflags & MONSTERFLAG_NORESPAWN)
                return false;
 
        if(!autocvar_g_monsters_respawn)
@@ -382,18 +517,14 @@ float Monster_CanRespawn(entity ent)
        return true;
 }
 
-void monster_respawn()
-{
-       // is this function really needed?
-       monster_initialize(self.monsterid);
-}
+void Monster_Respawn() { Monster_Spawn(self.monsterid); }
 
-void Monster_Fade ()
+void Monster_Dead_Fade()
 {
-       if(Monster_CanRespawn(self))
+       if(Monster_Respawn_Check())
        {
                self.spawnflags |= MONSTERFLAG_RESPAWNED;
-               self.think = monster_respawn;
+               self.think = Monster_Respawn;
                self.nextthink = time + self.respawntime;
                self.monster_lifetime = 0;
                self.deadflag = DEAD_RESPAWNING;
@@ -418,84 +549,12 @@ void Monster_Fade ()
        }
 }
 
-float Monster_CanJump (vector vel)
+void Monster_Use()
 {
-       if(self.state)
-               return false; // already attacking
-       if(!(self.flags & FL_ONGROUND))
-               return false; // not on the ground
-       if(self.health <= 0)
-               return false; // called when dead?
-       if(time < self.attack_finished_single)
-               return false; // still attacking
-
-       vector old = self.velocity;
-
-       self.velocity = vel;
-       tracetoss(self, self);
-       self.velocity = old;
-       if (trace_ent != self.enemy)
-               return false;
-
-       return true;
+       if(Monster_ValidTarget(self, activator)) { self.enemy = activator; }
 }
 
-float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished)
-{
-       if(!Monster_CanJump(vel))
-               return false;
-
-       self.frame = anm;
-       self.state = MONSTER_STATE_ATTACK_LEAP;
-       self.touch = touchfunc;
-       self.origin_z += 1;
-       self.velocity = vel;
-       self.flags &= ~FL_ONGROUND;
-
-       self.attack_finished_single = time + anim_finished;
-
-       return true;
-}
-
-void monster_checkattack(entity e, entity targ)
-{
-       if(e == world)
-               return;
-       if(targ == world)
-               return;
-
-       if(!e.monster_attackfunc)
-               return;
-
-       if(time < e.attack_finished_single)
-               return;
-
-       if(vlen(targ.origin - e.origin) <= e.attack_range)
-       if(e.monster_attackfunc(MONSTER_ATTACK_MELEE))
-       {
-               MonsterSound(monstersound_melee, 0, false, CH_VOICE);
-               return;
-       }
-
-       if(vlen(targ.origin - e.origin) > e.attack_range)
-       if(e.monster_attackfunc(MONSTER_ATTACK_RANGED))
-       {
-               MonsterSound(monstersound_ranged, 0, false, CH_VOICE);
-               return;
-       }
-}
-
-void monster_use ()
-{
-       if(!self.enemy)
-       if(self.health > 0)
-       if(monster_isvalidtarget(activator, self))
-               self.enemy = activator;
-}
-
-.float last_trace;
-.float last_enemycheck; // for checking enemy
-vector monster_pickmovetarget(entity targ)
+vector Monster_Move_Target(entity targ)
 {
        // enemy is always preferred target
        if(self.enemy)
@@ -508,7 +567,7 @@ vector monster_pickmovetarget(entity targ)
                        || (self.enemy.deadflag != DEAD_NO || self.enemy.health < 1)
                        || (self.enemy.frozen)
                        || (self.enemy.flags & FL_NOTARGET)
-                       || (self.enemy.alpha < 0.5)
+                       || (self.enemy.alpha < 0.5 && self.enemy.alpha != 0)
                        || (self.enemy.takedamage == DAMAGE_NO)
                        || (vlen(self.origin - targ_origin) > self.target_range)
                        || ((trace_fraction < 1) && (trace_ent != self.enemy)))
@@ -520,14 +579,17 @@ vector monster_pickmovetarget(entity targ)
 
                if(self.enemy)
                {
-                       /*WarpZone_TrailParticles(world, particleeffectnum("red_pass"), self.origin, targ_origin);
+                       /*WarpZone_TrailParticles(world, particleeffectnum(EFFECT_RED_PASS), self.origin, targ_origin);
                        print("Trace origin: ", vtos(targ_origin), "\n");
                        print("Target origin: ", vtos(self.enemy.origin), "\n");
                        print("My origin: ", vtos(self.origin), "\n"); */
 
                        self.monster_movestate = MONSTER_MOVE_ENEMY;
                        self.last_trace = time + 1.2;
-                       return targ_origin;
+                       if(self.monster_moveto)
+                               return self.monster_moveto; // assumes code is properly setting this when monster has an enemy
+                       else
+                               return targ_origin;
                }
 
                /*makevectors(self.angles);
@@ -538,11 +600,11 @@ vector monster_pickmovetarget(entity targ)
 
        switch(self.monster_moveflags)
        {
-               case MONSTER_MOVE_OWNER:
+               case MONSTER_MOVE_FOLLOW:
                {
-                       self.monster_movestate = MONSTER_MOVE_OWNER;
+                       self.monster_movestate = MONSTER_MOVE_FOLLOW;
                        self.last_trace = time + 0.3;
-                       return (self.monster_owner) ? self.monster_owner.origin : self.origin;
+                       return (self.monster_follow) ? self.monster_follow.origin : self.origin;
                }
                case MONSTER_MOVE_SPAWNLOC:
                {
@@ -552,8 +614,16 @@ vector monster_pickmovetarget(entity targ)
                }
                case MONSTER_MOVE_NOMOVE:
                {
-                       self.monster_movestate = MONSTER_MOVE_NOMOVE;
-                       self.last_trace = time + 2;
+                       if(self.monster_moveto)
+                       {
+                               self.last_trace = time + 0.5;
+                               return self.monster_moveto;
+                       }
+                       else
+                       {
+                               self.monster_movestate = MONSTER_MOVE_NOMOVE;
+                               self.last_trace = time + 2;
+                       }
                        return self.origin;
                }
                default:
@@ -562,7 +632,12 @@ vector monster_pickmovetarget(entity targ)
                        vector pos;
                        self.monster_movestate = MONSTER_MOVE_WANDER;
 
-                       if(targ)
+                       if(self.monster_moveto)
+                       {
+                               self.last_trace = time + 0.5;
+                               pos = self.monster_moveto;
+                       }
+                       else if(targ)
                        {
                                self.last_trace = time + 0.5;
                                pos = targ.origin;
@@ -588,11 +663,11 @@ vector monster_pickmovetarget(entity targ)
        }
 }
 
-void monster_CalculateVelocity(entity mon, vector to, vector from, float turnrate, float movespeed)
+void Monster_CalculateVelocity(entity mon, vector to, vector from, float turnrate, float movespeed)
 {
        float current_distance = vlen((('1 0 0' * to.x) + ('0 1 0' * to.y)) - (('1 0 0' * from.x) + ('0 1 0' * from.y))); // for the sake of this check, exclude Z axis
        float initial_height = 0; //min(50, (targ_distance * tanh(20)));
-       float current_height = (initial_height * min(1, self.pass_distance ? (current_distance / self.pass_distance) : 0));
+       float current_height = (initial_height * min(1, (self.pass_distance) ? (current_distance / self.pass_distance) : current_distance));
        //print("current_height = ", ftos(current_height), ", initial_height = ", ftos(initial_height), ".\n");
 
        vector targpos;
@@ -622,12 +697,9 @@ void monster_CalculateVelocity(entity mon, vector to, vector from, float turnrat
        //mon.angles = vectoangles(mon.velocity);
 }
 
-void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_run, float manim_walk, float manim_idle)
+void Monster_Move(float runspeed, float walkspeed, float stpspeed)
 {
-       //fixedmakevectors(self.angles);
-
-       if(self.target2)
-               self.goalentity = find(world, targetname, self.target2);
+       if(self.target2) { self.goalentity = find(world, targetname, self.target2); }
 
        entity targ;
 
@@ -637,10 +709,11 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                self.health = max(1, self.revive_progress * self.max_health);
                self.iceblock.alpha = bound(0.2, 1 - self.revive_progress, 1);
 
-               WaypointSprite_UpdateHealth(self.sprite, self.health);
+               if(!(self.spawnflags & MONSTERFLAG_INVINCIBLE) && self.sprite)
+                       WaypointSprite_UpdateHealth(self.sprite, self.health);
 
-               movelib_beak_simple(stopspeed);
-               self.frame = manim_idle;
+               movelib_beak_simple(stpspeed);
+               setanim(self, self.anim_idle, true, false, false);
 
                self.enemy = world;
                self.nextthink = time + self.ticrate;
@@ -655,10 +728,11 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                self.revive_progress = bound(0, self.revive_progress - self.ticrate * self.revive_speed, 1);
                self.health = max(0, autocvar_g_nades_ice_health + (self.max_health-autocvar_g_nades_ice_health) * self.revive_progress );
 
-               WaypointSprite_UpdateHealth(self.sprite, self.health);
+               if(!(self.spawnflags & MONSTERFLAG_INVINCIBLE) && self.sprite)
+                       WaypointSprite_UpdateHealth(self.sprite, self.health);
 
-               movelib_beak_simple(stopspeed);
-               self.frame = manim_idle;
+               movelib_beak_simple(stpspeed);
+               setanim(self, self.anim_idle, true, false, false);
 
                self.enemy = world;
                self.nextthink = time + self.ticrate;
@@ -667,7 +741,8 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                {
                        Unfreeze(self);
                        self.health = 0;
-                       self.event_damage(self, self.frozen_by, 1, DEATH_NADE_ICE_FREEZE, self.origin, '0 0 0');
+                       if(self.event_damage)
+                               self.event_damage(self, self.frozen_by, 1, DEATH_NADE_ICE_FREEZE, self.origin, '0 0 0');
                }
 
                else if ( self.revive_progress <= 0 )
@@ -682,7 +757,6 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                {
                        if(time >= self.last_trace)
                        {
-                               self.fish_wasdrowning = true;
                                self.last_trace = time + 0.4;
 
                                Damage (self, world, world, 2, DEATH_DROWN, self.origin, '0 0 0');
@@ -706,9 +780,8 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
 
                        return;
                }
-               else if(self.fish_wasdrowning)
+               else if(self.movetype == MOVETYPE_BOUNCE)
                {
-                       self.fish_wasdrowning = false;
                        self.angles_x = 0;
                        self.movetype = MOVETYPE_WALK;
                }
@@ -726,13 +799,14 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
        {
                runspeed = walkspeed = 0;
                if(time >= self.spawn_time)
-                       self.frame = manim_idle;
-               movelib_beak_simple(stopspeed);
+                       setanim(self, self.anim_idle, true, false, false);
+               movelib_beak_simple(stpspeed);
                return;
        }
 
-       runspeed = bound(0, monster_speed_run * Monster_SkillModifier(), runspeed * 2); // limit maxspeed to prevent craziness
-       walkspeed = bound(0, monster_speed_walk * Monster_SkillModifier(), walkspeed * 2); // limit maxspeed to prevent craziness
+       targ = monster_target;
+       runspeed = bound(0, monster_speed_run * MONSTER_SKILLMOD(self), runspeed * 2.5); // limit maxspeed to prevent craziness
+       walkspeed = bound(0, monster_speed_walk * MONSTER_SKILLMOD(self), walkspeed * 2.5); // limit maxspeed to prevent craziness
 
        if(time < self.spider_slowness)
        {
@@ -742,71 +816,68 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
 
        if(teamplay)
        if(autocvar_g_monsters_teams)
-       if(DIFF_TEAM(self.monster_owner, self))
-               self.monster_owner = world;
+       if(DIFF_TEAM(self.monster_follow, self))
+               self.monster_follow = world;
 
        if(time >= self.last_enemycheck)
        {
                if(!self.enemy)
                {
-                       self.enemy = FindTarget(self);
+                       self.enemy = Monster_FindTarget(self);
                        if(self.enemy)
                        {
                                WarpZone_RefSys_Copy(self.enemy, self);
                                WarpZone_RefSys_AddInverse(self.enemy, self); // wz1^-1 ... wzn^-1 receiver
                                self.moveto = WarpZone_RefSys_TransformOrigin(self.enemy, self, (0.5 * (self.enemy.absmin + self.enemy.absmax)));
-
-                               self.pass_distance = vlen((('1 0 0' * self.enemy.origin.x) + ('0 1 0' * self.enemy.origin.y)) - (('1 0 0' *  self.origin.x) + ('0 1 0' *  self.origin.y)));
-                               MonsterSound(monstersound_sight, 0, false, CH_VOICE);
+                               self.monster_moveto = '0 0 0';
+                               self.monster_face = '0 0 0';
+                               
+                               self.pass_distance = vlen((('1 0 0' * self.enemy.origin_x) + ('0 1 0' * self.enemy.origin_y)) - (('1 0 0' *  self.origin_x) + ('0 1 0' *  self.origin_y)));
+                               Monster_Sound(monstersound_sight, 0, false, CH_VOICE);
                        }
                }
 
                self.last_enemycheck = time + 1; // check for enemies every second
        }
 
-       if(self.state == MONSTER_STATE_ATTACK_MELEE && time >= self.attack_finished_single)
+       if(self.state == MONSTER_ATTACK_RANGED && (self.flags & FL_ONGROUND))
+       {
                self.state = 0;
+               self.touch = Monster_Touch;
+       }
 
-       if(self.state != MONSTER_STATE_ATTACK_MELEE) // don't move if set
-       if(time >= self.last_trace || self.enemy) // update enemy instantly
-               self.moveto = monster_pickmovetarget(targ);
+       if(self.state && time >= self.attack_finished_single)
+               self.state = 0; // attack is over
 
-       if(!self.enemy)
-               MonsterSound(monstersound_idle, 7, true, CH_VOICE);
+       if(self.state != MONSTER_ATTACK_MELEE) // don't move if set
+       if(time >= self.last_trace || self.enemy) // update enemy or rider instantly
+               self.moveto = Monster_Move_Target(targ);
 
-       if(self.state == MONSTER_STATE_ATTACK_LEAP && (self.flags & FL_ONGROUND))
-       {
-               self.state = 0;
-               self.touch = MonsterTouch;
-       }
+       if(!self.enemy)
+               Monster_Sound(monstersound_idle, 7, true, CH_VOICE);
 
-       if(self.state == MONSTER_STATE_ATTACK_MELEE)
+       if(self.state == MONSTER_ATTACK_MELEE)
                self.moveto = self.origin;
 
        if(self.enemy && self.enemy.vehicle)
                runspeed = 0;
 
-       if(!(((self.flags & FL_FLY) && (self.spawnflags & MONSTERFLAG_FLY_VERTICAL)) || (self.flags & FL_SWIM)))
-               //v_forward = normalize(self.moveto - self.origin);
-       //else
-               self.moveto_z = self.origin.z;
+       if(!(self.spawnflags & MONSTERFLAG_FLY_VERTICAL) && !(self.flags & FL_SWIM))
+               self.moveto_z = self.origin_z;
 
-       if(vlen(self.origin - self.moveto) > 64)
+       if(vlen(self.origin - self.moveto) > 100)
        {
+               float do_run = !!(self.enemy);
                if((self.flags & FL_ONGROUND) || ((self.flags & FL_FLY) || (self.flags & FL_SWIM)))
-                       monster_CalculateVelocity(self, self.moveto, self.origin, true, ((self.enemy) ? runspeed : walkspeed));
-
-               /*&if(self.flags & FL_FLY || self.flags & FL_SWIM)
-                       movelib_move_simple(v_forward, ((self.enemy) ? runspeed : walkspeed), 0.6);
-               else
-                       movelib_move_simple_gravity(v_forward, ((self.enemy) ? runspeed : walkspeed), 0.6); */
+                       Monster_CalculateVelocity(self, self.moveto, self.origin, true, ((do_run) ? runspeed : walkspeed));
 
-               if(time > self.pain_finished)
-               if(time > self.attack_finished_single)
+               if(time > self.pain_finished) // TODO: use anim_finished instead!
+               if(!self.state)
+               if(time > self.anim_finished)
                if(vlen(self.velocity) > 10)
-                       self.frame = ((self.enemy) ? manim_run : manim_walk);
+                       setanim(self, ((do_run) ? self.anim_run : self.anim_walk), true, false, false);
                else
-                       self.frame = manim_idle;
+                       setanim(self, self.anim_idle, true, false, false);
        }
        else
        {
@@ -816,18 +887,19 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                else if(e.target)
                        self.target2 = e.target;
 
-               movelib_beak_simple(stopspeed);
-               if(time > self.attack_finished_single)
+               movelib_beak_simple(stpspeed);
+               if(time > self.anim_finished)
                if(time > self.pain_finished)
-               if (vlen(self.velocity) <= 30)
-                       self.frame = manim_idle;
+               if(!self.state)
+               if(vlen(self.velocity) <= 30)
+                       setanim(self, self.anim_idle, true, false, false);
        }
 
-       self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95);
+       self.steerto = steerlib_attract2(((self.monster_face) ? self.monster_face : self.moveto), 0.5, 500, 0.95);
 
        vector real_angle = vectoangles(self.steerto) - self.angles;
        float turny = 25;
-       if(self.state == MONSTER_STATE_ATTACK_MELEE)
+       if(self.state == MONSTER_ATTACK_MELEE)
                turny = 0;
        if(turny)
        {
@@ -835,55 +907,42 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                self.angles_y += turny;
        }
 
-       monster_checkattack(self, self.enemy);
+       Monster_Attack_Check(self, self.enemy);
 }
 
-void monster_remove(entity mon)
+void Monster_Remove(entity mon)
 {
-       if(!mon)
-               return; // nothing to remove
-
-       Send_Effect("item_pickup", mon.origin, '0 0 0', 1);
+       if(!mon) { return; }
 
-       if(mon.weaponentity)
-               remove(mon.weaponentity);
-
-       if(mon.iceblock)
-               remove(mon.iceblock);
+       if(!MUTATOR_CALLHOOK(MonsterRemove, mon))
+               Send_Effect(EFFECT_ITEM_PICKUP, mon.origin, '0 0 0', 1);
 
+       if(mon.weaponentity) { remove(mon.weaponentity); }
+       if(mon.iceblock) { remove(mon.iceblock); }
        WaypointSprite_Kill(mon.sprite);
-
        remove(mon);
 }
 
-void monster_dead_think()
+void Monster_Dead_Think()
 {
        self.nextthink = time + self.ticrate;
 
-       CSQCMODEL_AUTOUPDATE();
-
        if(self.monster_lifetime != 0)
        if(time >= self.monster_lifetime)
        {
-               Monster_Fade();
+               Monster_Dead_Fade();
                return;
        }
 }
 
-void monsters_setstatus()
-{
-       self.stat_monsters_total = monsters_total;
-       self.stat_monsters_killed = monsters_killed;
-}
-
 void Monster_Appear()
 {
        self.enemy = activator;
        self.spawnflags &= ~MONSTERFLAG_APPEAR; // otherwise, we get an endless loop
-       monster_initialize(self.monsterid);
+       Monster_Spawn(self.monsterid);
 }
 
-float Monster_CheckAppearFlags(entity ent, float monster_id)
+float Monster_Appear_Check(entity ent, float monster_id)
 {
        if(!(ent.spawnflags & MONSTERFLAG_APPEAR))
                return false;
@@ -897,7 +956,7 @@ float Monster_CheckAppearFlags(entity ent, float monster_id)
        return true;
 }
 
-void monsters_reset()
+void Monster_Reset()
 {
        setorigin(self, self.pos1);
        self.angles = self.pos2;
@@ -912,7 +971,7 @@ void monsters_reset()
        self.moveto = self.origin;
 }
 
-void monsters_corpse_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Monster_Dead_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        self.health -= damage;
 
@@ -931,9 +990,9 @@ void monsters_corpse_damage (entity inflictor, entity attacker, float damage, in
        }
 }
 
-void monster_die(entity attacker, float gibbed)
+void Monster_Dead(entity attacker, float gibbed)
 {
-       self.think = monster_dead_think;
+       self.think = Monster_Dead_Think;
        self.nextthink = time;
        self.monster_lifetime = time + 5;
 
@@ -945,7 +1004,7 @@ void monster_die(entity attacker, float gibbed)
 
        monster_dropitem();
 
-       MonsterSound(monstersound_death, 0, false, CH_VOICE);
+       Monster_Sound(monstersound_death, 0, false, CH_VOICE);
 
        if(!(self.spawnflags & MONSTERFLAG_SPAWNED) && !(self.spawnflags & MONSTERFLAG_RESPAWNED))
                monsters_killed += 1;
@@ -960,38 +1019,41 @@ void monster_die(entity attacker, float gibbed)
                totalspawned -= 1;
        }
 
-       if(self.candrop && self.weapon)
-               W_ThrowNewWeapon(self, self.weapon, 0, self.origin, randomvec() * 150 + '0 0 325');
-
-       self.event_damage       = ((gibbed) ? func_null : monsters_corpse_damage);
+       self.event_damage       = ((gibbed) ? func_null : Monster_Dead_Damage);
        self.solid                      = SOLID_CORPSE;
        self.takedamage         = DAMAGE_AIM;
        self.deadflag           = DEAD_DEAD;
        self.enemy                      = world;
        self.movetype           = MOVETYPE_TOSS;
        self.moveto                     = self.origin;
-       self.touch                      = MonsterTouch; // reset incase monster was pouncing
+       self.touch                      = Monster_Touch; // reset incase monster was pouncing
        self.reset                      = func_null;
        self.state                      = 0;
        self.attack_finished_single = 0;
+       self.effects = 0;
 
        if(!((self.flags & FL_FLY) || (self.flags & FL_SWIM)))
                self.velocity = '0 0 0';
 
+       CSQCModel_UnlinkEntity();
+
        MON_ACTION(self.monsterid, MR_DEATH);
+
+       if(self.candrop && self.weapon)
+               W_ThrowNewWeapon(self, self.weapon, 0, self.origin, randomvec() * 150 + '0 0 325');
 }
 
-void monsters_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Monster_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
-       if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE)
-               return;
-
        if((self.spawnflags & MONSTERFLAG_INVINCIBLE) && deathtype != DEATH_KILL)
                return;
 
-       if(time < self.pain_finished && deathtype != DEATH_KILL)
+       if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE)
                return;
 
+       //if(time < self.pain_finished && deathtype != DEATH_KILL)
+               //return;
+
        if(time < self.spawnshieldtime && deathtype != DEATH_KILL)
                return;
 
@@ -1001,13 +1063,24 @@ void monsters_damage (entity inflictor, entity attacker, float damage, int death
        vector v;
        float take, save;
 
-       v = healtharmor_applydamage(self.armorvalue, self.m_armor_blockpercent, deathtype, damage);
-       take = v.x;
-       save = v.y;
+       v = healtharmor_applydamage(100, self.armorvalue / 100, deathtype, damage);
+       take = v_x;
+       save = v_y;
 
-       self.health -= take;
+       damage_take = take;
+       frag_attacker = attacker;
+       frag_deathtype = deathtype;
+       MON_ACTION(self.monsterid, MR_PAIN);
+       take = damage_take;
 
-       WaypointSprite_UpdateHealth(self.sprite, self.health);
+       if(take)
+       {
+               self.health -= take;
+               Monster_Sound(monstersound_pain, 1.2, true, CH_PAIN);
+       }
+
+       if(self.sprite)
+               WaypointSprite_UpdateHealth(self.sprite, self.health);
 
        self.dmg_time = time;
 
@@ -1016,7 +1089,7 @@ void monsters_damage (entity inflictor, entity attacker, float damage, int death
 
        self.velocity += force * self.damageforcescale;
 
-       if(deathtype != DEATH_DROWN)
+       if(deathtype != DEATH_DROWN && take)
        {
                Violence_GibSplash_At(hitloc, force, 2, bound(0, take, 200) / 16, self, attacker);
                if (take > 50)
@@ -1036,7 +1109,7 @@ void monsters_damage (entity inflictor, entity attacker, float damage, int death
                SUB_UseTargets();
                self.target2 = self.oldtarget2; // reset to original target on death, incase we respawn
 
-               monster_die(attacker, (self.health <= -100 || deathtype == DEATH_KILL));
+               Monster_Dead(attacker, (self.health <= -100 || deathtype == DEATH_KILL));
 
                WaypointSprite_Kill(self.sprite);
 
@@ -1053,49 +1126,102 @@ void monsters_damage (entity inflictor, entity attacker, float damage, int death
        }
 }
 
-void monster_setupcolors(entity mon)
+// don't check for enemies, just keep walking in a straight line
+void Monster_Move_2D(float mspeed, float allow_jumpoff)
 {
-       if(IS_PLAYER(mon.monster_owner))
-               mon.colormap = mon.monster_owner.colormap;
-       else if(teamplay && mon.team)
-               mon.colormap = 1024 + (mon.team - 1) * 17;
-       else
+       if(gameover || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || self.draggedby != world || time < game_starttime || (autocvar_g_campaign && !campaign_bots_may_start) || time < self.spawn_time)
        {
-               if(mon.monster_skill <= MONSTER_SKILL_EASY)
-                       mon.colormap = 1029;
-               else if(mon.monster_skill <= MONSTER_SKILL_MEDIUM)
-                       mon.colormap = 1027;
-               else if(mon.monster_skill <= MONSTER_SKILL_HARD)
-                       mon.colormap = 1038;
-               else if(mon.monster_skill <= MONSTER_SKILL_INSANE)
-                       mon.colormap = 1028;
-               else if(mon.monster_skill <= MONSTER_SKILL_NIGHTMARE)
-                       mon.colormap = 1032;
-               else
-                       mon.colormap = 1024;
+               mspeed = 0;
+               if(time >= self.spawn_time)
+                       setanim(self, self.anim_idle, true, false, false);
+               movelib_beak_simple(0.6);
+               return;
        }
-}
 
-void monster_changeteam(entity ent, float newteam)
-{
-       if(!teamplay) { return; }
+       float reverse = FALSE;
+       vector a, b;
+       
+       makevectors(self.angles);
+       a = self.origin + '0 0 16';
+       b = self.origin + '0 0 16' + v_forward * 32;
+       
+       traceline(a, b, MOVE_NORMAL, self);
+       
+       if(trace_fraction != 1.0)
+       {
+               reverse = TRUE;
+               
+               if(trace_ent)
+               if(IS_PLAYER(trace_ent) && !(trace_ent.items & IT_STRENGTH))
+                       reverse = FALSE;
+       }
+       
+       // TODO: fix this... tracing is broken if the floor is thin
+       /*
+       if(!allow_jumpoff)
+       {
+               a = b - '0 0 32';
+               traceline(b, a, MOVE_WORLDONLY, self);
+               if(trace_fraction == 1.0)
+                       reverse = TRUE;
+       } */
+       
+       if(reverse)
+       {
+               self.angles_y = anglemods(self.angles_y - 180);
+               makevectors(self.angles);
+       }
+       
+       movelib_move_simple_gravity(v_forward, mspeed, 1);
 
-       ent.team = newteam;
-       ent.monster_attack = true; // new team, activate attacking
-       monster_setupcolors(ent);
+       if(time > self.pain_finished)
+       if(time > self.attack_finished_single)
+       if(vlen(self.velocity) > 10)
+               setanim(self, self.anim_walk, true, false, false);
+       else
+               setanim(self, self.anim_idle, true, false, false);
+}
 
-       if(ent.sprite)
+void Monster_Anim()
+{
+       int deadbits = (self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
+       if(self.deadflag)
        {
-               WaypointSprite_UpdateTeamRadar(ent.sprite, RADARICON_DANGER, ((newteam) ? Team_ColorRGB(newteam) : '1 0 0'));
-
-               ent.sprite.team = newteam;
-               ent.sprite.SendFlags |= 1;
+               if (!deadbits)
+               {
+                       // Decide on which death animation to use.
+                       if(random() < 0.5)
+                               deadbits = ANIMSTATE_DEAD1;
+                       else
+                               deadbits = ANIMSTATE_DEAD2;
+               }
+       }
+       else
+       {
+               // Clear a previous death animation.
+               deadbits = 0;
+       }
+       int animbits = deadbits;
+       if(self.frozen)
+               animbits |= ANIMSTATE_FROZEN;
+       if(self.crouch)
+               animbits |= ANIMSTATE_DUCK; // not that monsters can crouch currently...
+       animdecide_setstate(self, animbits, false);
+       animdecide_setimplicitstate(self, (self.flags & FL_ONGROUND));
+
+       /* // weapon entities for monsters?
+       if (self.weaponentity)
+       {
+               updateanim(self.weaponentity);
+               if (!self.weaponentity.animstate_override)
+                       setanim(self.weaponentity, self.weaponentity.anim_idle, true, false, false);
        }
+       */
 }
 
-void monster_think()
+void Monster_Think()
 {
-       self.think = monster_think;
+       self.think = Monster_Think;
        self.nextthink = self.ticrate;
 
        if(self.monster_lifetime)
@@ -1105,55 +1231,66 @@ void monster_think()
                return;
        }
 
-       MON_ACTION(self.monsterid, MR_THINK);
+       if(MON_ACTION(self.monsterid, MR_THINK))
+               Monster_Move(self.speed2, self.speed, self.stopspeed);
+
+       Monster_Anim();
 
        CSQCMODEL_AUTOUPDATE();
 }
 
-float monster_spawn()
+float Monster_Spawn_Setup()
 {
        MON_ACTION(self.monsterid, MR_SETUP);
 
+       // ensure some basic needs are met
+       if(!self.health) { self.health = 100; }
+       if(!self.armorvalue) { self.armorvalue = bound(0.2, 0.5 * MONSTER_SKILLMOD(self), 0.9); }
+       if(!self.target_range) { self.target_range = autocvar_g_monsters_target_range; }
+       if(!self.respawntime) { self.respawntime = autocvar_g_monsters_respawn_delay; }
+       if(!self.monster_moveflags) { self.monster_moveflags = MONSTER_MOVE_WANDER; }
+       if(!self.attack_range) { self.attack_range = autocvar_g_monsters_attack_range; }
+       if(!self.damageforcescale) { self.damageforcescale = autocvar_g_monsters_damageforcescale; }
+
        if(!(self.spawnflags & MONSTERFLAG_RESPAWNED))
        {
-               Monster_CheckMinibossFlag();
-               self.health *= Monster_SkillModifier();
+               Monster_Miniboss_Check();
+               self.health *= MONSTER_SKILLMOD(self);
+
+               if(!self.skin)
+                       self.skin = rint(random() * 4);
        }
 
        self.max_health = self.health;
        self.pain_finished = self.nextthink;
 
-       if(IS_PLAYER(self.monster_owner))
+       if(IS_PLAYER(self.monster_follow))
                self.effects |= EF_DIMLIGHT;
 
-       if(!(self.spawnflags & MONSTERFLAG_RESPAWNED))
-       if(!self.skin)
-               self.skin = rint(random() * 4);
-
-       if(!self.attack_range)
-               self.attack_range = autocvar_g_monsters_attack_range;
-
        if(!self.wander_delay) { self.wander_delay = 2; }
        if(!self.wander_distance) { self.wander_distance = 600; }
 
-       precache_monstersounds();
-       UpdateMonsterSounds();
+       Monster_Sounds_Precache();
+       Monster_Sounds_Update();
 
        if(teamplay)
                self.monster_attack = true; // we can have monster enemies in team games
 
-       MonsterSound(monstersound_spawn, 0, false, CH_VOICE);
+       Monster_Sound(monstersound_spawn, 0, false, CH_VOICE);
 
-       entity wp = WaypointSprite_Spawn(WP_Monster, 0, 1024, self, '0 0 1' * (self.maxs.z + 15), world, self.team, self, sprite, true, RADARICON_DANGER);
-       wp.wp_extra = self.monsterid;
-       wp.colormod = ((self.team) ? Team_ColorRGB(self.team) : '1 0 0');
-       if(!(self.spawnflags & MONSTERFLAG_INVINCIBLE))
+       if(autocvar_g_monsters_healthbars)
        {
-               WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
-               WaypointSprite_UpdateHealth(self.sprite, self.health);
+               entity wp = WaypointSprite_Spawn(WP_Monster, 0, 1024, self, '0 0 1' * (self.maxs.z + 15), world, self.team, self, sprite, true, RADARICON_DANGER);
+               wp.wp_extra = self.monsterid;
+               wp.colormod = ((self.team) ? Team_ColorRGB(self.team) : '1 0 0');
+               if(!(self.spawnflags & MONSTERFLAG_INVINCIBLE))
+               {
+                       WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
+                       WaypointSprite_UpdateHealth(self.sprite, self.health);
+               }
        }
 
-       self.think = monster_think;
+       self.think = Monster_Think;
        self.nextthink = time + self.ticrate;
 
        if(MUTATOR_CALLHOOK(MonsterSpawn))
@@ -1162,21 +1299,24 @@ float monster_spawn()
        return true;
 }
 
-float monster_initialize(float mon_id)
+bool Monster_Spawn(int mon_id)
 {
-       if(!autocvar_g_monsters) { return false; }
-       if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) { MON_ACTION(mon_id, MR_PRECACHE); }
-       if(Monster_CheckAppearFlags(self, mon_id)) { return true; } // return true so the monster isn't removed
-
+       // setup the basic required properties for a monster
        entity mon = get_monsterinfo(mon_id);
+       if(!mon.monsterid) { return false; } // invalid monster
+
+       if(!autocvar_g_monsters) { Monster_Remove(self); return false; }
+
+       self.mdl = mon.model;
+       if(Monster_Appear_Check(self, mon_id)) { return true; } // return true so the monster isn't removed
 
        if(!self.monster_skill)
                self.monster_skill = cvar("g_monsters_skill");
 
        // support for quake style removing monsters based on skill
-       if(self.monster_skill == MONSTER_SKILL_EASY) if(self.spawnflags & MONSTERSKILL_NOTEASY) { return false; }
-       if(self.monster_skill == MONSTER_SKILL_MEDIUM) if(self.spawnflags & MONSTERSKILL_NOTMEDIUM) { return false; }
-       if(self.monster_skill == MONSTER_SKILL_HARD) if(self.spawnflags & MONSTERSKILL_NOTHARD) { return false; }
+       if(self.monster_skill == MONSTER_SKILL_EASY) if(self.spawnflags & MONSTERSKILL_NOTEASY) { Monster_Remove(self); return false; }
+       if(self.monster_skill == MONSTER_SKILL_MEDIUM) if(self.spawnflags & MONSTERSKILL_NOTMEDIUM) { Monster_Remove(self); return false; }
+       if(self.monster_skill == MONSTER_SKILL_HARD) if(self.spawnflags & MONSTERSKILL_NOTHARD) { Monster_Remove(self); return false; }
 
        if(self.team && !teamplay)
                self.team = 0;
@@ -1185,19 +1325,18 @@ float monster_initialize(float mon_id)
        if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) // don't count re-spawning monsters either
                monsters_total += 1;
 
-       setmodel(self, mon.model);
-       //setsize(self, mon.mins, mon.maxs);
+       setmodel(self, self.mdl);
        self.flags                              = FL_MONSTER;
+       self.classname                  = "monster";
        self.takedamage                 = DAMAGE_AIM;
        self.bot_attack                 = true;
        self.iscreature                 = true;
        self.teleportable               = true;
        self.damagedbycontents  = true;
        self.monsterid                  = mon_id;
-       self.damageforcescale   = 0;
-       self.event_damage               = monsters_damage;
-       self.touch                              = MonsterTouch;
-       self.use                                = monster_use;
+       self.event_damage               = Monster_Damage;
+       self.touch                              = Monster_Touch;
+       self.use                                = Monster_Use;
        self.solid                              = SOLID_BBOX;
        self.movetype                   = MOVETYPE_WALK;
        self.spawnshieldtime    = time + autocvar_g_monsters_spawnshieldtime;
@@ -1206,11 +1345,12 @@ float monster_initialize(float mon_id)
        self.moveto                             = self.origin;
        self.pos1                               = self.origin;
        self.pos2                               = self.angles;
-       self.reset                              = monsters_reset;
+       self.reset                              = Monster_Reset;
        self.netname                    = mon.netname;
-       self.monster_name               = M_NAME(mon_id);
+       self.monster_attackfunc = mon.monster_attackfunc;
+       self.monster_name               = mon.monster_name;
        self.candrop                    = true;
-       self.view_ofs                   = '0 0 1' * (self.maxs.z * 0.5);
+       self.view_ofs                   = '0 0 0.7' * (self.maxs_z * 0.5);
        self.oldtarget2                 = self.target2;
        self.pass_distance              = 0;
        self.deadflag                   = DEAD_NO;
@@ -1218,22 +1358,15 @@ float monster_initialize(float mon_id)
        self.spawn_time                 = time;
        self.spider_slowness    = 0;
        self.gravity                    = 1;
+       self.monster_moveto             = '0 0 0';
+       self.monster_face               = '0 0 0';
        self.dphitcontentsmask  = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;
-
-       if(!self.scale)
-               self.scale = 1;
-
-       if(autocvar_g_monsters_edit)
-               self.grab = 1; // owner may carry their monster
-
-       if(autocvar_g_fullbrightplayers)
-               self.effects |= EF_FULLBRIGHT;
-
-       if(autocvar_g_nodepthtestplayers)
-               self.effects |= EF_NODEPTHTEST;
-
-       if(mon.spawnflags & MONSTER_TYPE_SWIM)
-               self.flags |= FL_SWIM;
+       
+       if(!self.scale) { self.scale = 1; }
+       if(autocvar_g_monsters_edit) { self.grab = 1; }
+       if(autocvar_g_fullbrightplayers) { self.effects |= EF_FULLBRIGHT; }
+       if(autocvar_g_nodepthtestplayers) { self.effects |= EF_NODEPTHTEST; }
+       if(mon.spawnflags & MONSTER_TYPE_SWIM) { self.flags |= FL_SWIM; }
 
        if(mon.spawnflags & MONSTER_TYPE_FLY)
        {
@@ -1247,22 +1380,15 @@ float monster_initialize(float mon_id)
 
        setsize(self, mon.mins * self.scale, mon.maxs * self.scale);
 
-       if(!self.ticrate)
-               self.ticrate = autocvar_g_monsters_think_delay;
-
-       self.ticrate = bound(sys_frametime, self.ticrate, 60);
-
-       if(!self.m_armor_blockpercent)
-               self.m_armor_blockpercent = 0.5;
-
-       if(!self.target_range)
-               self.target_range = autocvar_g_monsters_target_range;
+       self.ticrate = bound(sys_frametime, ((!self.ticrate) ? autocvar_g_monsters_think_delay : self.ticrate), 60);
 
-       if(!self.respawntime)
-               self.respawntime = autocvar_g_monsters_respawn_delay;
+       Monster_UpdateModel();
 
-       if(!self.monster_moveflags)
-               self.monster_moveflags = MONSTER_MOVE_WANDER;
+       if(!Monster_Spawn_Setup())
+       {
+               Monster_Remove(self);
+               return false;
+       }
 
        if(!self.noalign)
        {
@@ -1271,9 +1397,6 @@ float monster_initialize(float mon_id)
                setorigin(self, trace_endpos);
        }
 
-       if(!monster_spawn())
-               return false;
-
        if(!(self.spawnflags & MONSTERFLAG_RESPAWNED))
                monster_setupcolors(self);
 
index 697c07b72ea02197831154a4f9e560d1869c1b0e..d1d224363d314dc52e59199c3f794c7e34b60830 100644 (file)
 #ifndef SV_MONSTERS_H
 #define SV_MONSTERS_H
 
-.string spawnmob;
-.float monster_attack;
+// stats networking
+.int stat_monsters_killed;
+.int stat_monsters_total;
+int monsters_total;
+int monsters_killed;
+
+// monster properties
+.int monster_movestate; // move target priority
+.entity monster_follow; // follow target
+.float wander_delay; // logic delay between moving while idle
+.float wander_distance; // distance to move between wander delays
+.float monster_lifetime; // monster dies instantly after this delay, set from spawn
+.float attack_range; // melee attack if closer, ranged attack if further away (TODO: separate ranged attack range?)
+.float spawn_time; // delay monster thinking until spawn animation has completed
+.bool candrop; // toggle to allow disabling monster item drops
+.int monster_movestate; // will be phased out
+.int monster_moveflags;
+.string oldtarget2; // a copy of the original follow target string
+.float last_trace; // logic delay between target tracing
+.float last_enemycheck; // for checking enemy
+.float anim_finished; // will be phased out when we have proper animations system
+.vector monster_moveto; // custom destination for monster (reset to '0 0 0' when you're done!)
+.vector monster_face; // custom looking direction for monster (reset to '0 0 0' when you're done!)
+.float speed2; // run speed
+.float stopspeed;
+.int oldskin;
+.string mdl_dead; // dead model for goombas
+
+#define MONSTER_SKILLMOD(mon) (0.5 + mon.monster_skill * ((1.2 - 0.3) / 10))
+
+// other properties
+.bool monster_attack; // indicates whether an entity can be attacked by monsters
+.float spider_slowness; // effect time of slowness inflicted by spiders
+
+// monster state declarations
+const int MONSTER_MOVE_FOLLOW = 1; // monster will follow if in range, or stand still
+const int MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
+const int MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
+const int MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
+const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate
+const int MONSTER_ATTACK_MELEE = 6;
+const int MONSTER_ATTACK_RANGED = 7;
 
-.entity monster_owner; // new monster owner entity, fixes non-solid monsters
+// skill declarations
+const int MONSTER_SKILL_EASY = 1;
+const int MONSTER_SKILL_MEDIUM = 3;
+const int MONSTER_SKILL_HARD = 5;
+const int MONSTER_SKILL_INSANE = 7;
+const int MONSTER_SKILL_NIGHTMARE = 10;
 
-.float stat_monsters_killed; // stats
-.float stat_monsters_total;
-float monsters_total;
-float monsters_killed;
-void monsters_setstatus(); // monsters.qc
-.float monster_moveflags; // checks where to move when not attacking
+const int MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
+const int MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
+const int MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
 
-.float wander_delay;
-.float wander_distance;
+// spawn flags
+const int MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
+const int MONSTERFLAG_NORESPAWN = 4;
+const int MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
+const int MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
+const int MONSTERFLAG_MINIBOSS = 64;   // monster spawns as mini-boss (also has a chance of naturally becoming one)
+const int MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
+const int MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
+const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
 
+// compatibility with old maps (soon to be removed)
 .float monster_lifetime;
+.int monster_skill;
 
-.float spider_slowness; // special spider timer
+// functions used elsewhere
+void Monster_Remove(entity mon);
 
-void monster_remove(entity mon); // removes a monster
+void monsters_setstatus();
 
-.float(float attack_type) monster_attackfunc;
-const int MONSTER_ATTACK_MELEE = 1;
-const int MONSTER_ATTACK_RANGED = 2;
+bool Monster_Spawn(int mon_id);
 
-.float monster_skill;
-const float MONSTER_SKILL_EASY = 1;
-const float MONSTER_SKILL_MEDIUM = 3;
-const float MONSTER_SKILL_HARD = 5;
-const float MONSTER_SKILL_INSANE = 7;
-const float MONSTER_SKILL_NIGHTMARE = 10;
+void monster_setupcolors(entity mon);
+
+void Monster_Touch();
 
-.float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
+void Monster_Move_2D(float mspeed, float allow_jumpoff);
 
-.float candrop;
+void Monster_Delay(float repeat_count, float repeat_defer, float defer_amnt, void() func);
 
-.float attack_range;
+float Monster_Attack_Melee(entity targ, float damg, vector anim, float er, float animtime, int deathtype, float dostop);
 
-.float spawn_time; // stop monster from moving around right after spawning
+bool Monster_Attack_Leap(vector anm, void() touchfunc, vector vel, float animtime);
 
-.string oldtarget2;
-.float lastshielded;
+entity Monster_FindTarget(entity mon);
 
-.vector oldangles;
+void monster_makevectors(entity e);
 
-.float m_armor_blockpercent;
+void Monster_Sound(.string samplefield, float sound_delay, float delaytoo, float chan);
 
 // monster sounds
-// copied from player sounds
 .float msound_delay; // temporary antilag system
 #define ALLMONSTERSOUNDS \
                _MSOUND(death) \
@@ -58,7 +103,8 @@ const float MONSTER_SKILL_NIGHTMARE = 10;
                _MSOUND(melee) \
                _MSOUND(pain) \
                _MSOUND(spawn) \
-               _MSOUND(idle)
+               _MSOUND(idle) \
+               _MSOUND(attack)
 
 #define _MSOUND(m) .string monstersound_##m;
 ALLMONSTERSOUNDS
@@ -66,36 +112,4 @@ ALLMONSTERSOUNDS
 
 float GetMonsterSoundSampleField_notFound;
 
-const int MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
-const int MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
-const int MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
-
-// new flags
-const int MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
-const int MONSTERFLAG_NORESPAWN = 4;
-const int MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
-const int MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
-const int MONSTERFLAG_MINIBOSS = 64;   // monster spawns as mini-boss (also has a chance of naturally becoming one)
-const int MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
-const int MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
-const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
-
-.int monster_movestate; // used to tell what the monster is currently doing
-const int MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
-const int MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
-const int MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
-const int MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
-const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate
-
-const int MONSTER_STATE_ATTACK_LEAP = 1;
-const int MONSTER_STATE_ATTACK_MELEE = 2;
-
-float monster_initialize(float mon_id);
-float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished);
-void monster_makevectors(entity e);
-float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop);
-void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_run, float manim_walk, float manim_idle);
-void monster_setupcolors(entity mon);
-float Monster_SkillModifier();
-void MonsterTouch ();
 #endif
index 90be7738c2b4a9133babce082edf5d54b61508a6..e92e81a0dad19b2757fbc534c61659427295788a 100644 (file)
@@ -452,11 +452,11 @@ bool _Movetype_UnstickEntity()  // SV_UnstickEntity
                if(!_Movetype_TestEntityPosition('0 0 -1' * i)) goto success;
                if(!_Movetype_TestEntityPosition('0 0 1' * i)) goto success;
        }
-       dprintf("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_TRACEF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
                num_for_edict(self), self.classname, vtos(self.move_origin));
        return false;
        : success;
-       dprintf("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_TRACEF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
                num_for_edict(self), self.classname, vtos(self.move_origin));
        _Movetype_LinkEdict(true);
        return true;
index 1f563f58ddcf51a813dbf2e08e4c197b9ccb1fdd..954033edbe9f59256914958a0963b2fd29f6b90b 100644 (file)
@@ -26,7 +26,7 @@ void _Movetype_PushMove(float dt)  // SV_PushMove
                        _Movetype_LinkEdict(true);
                        return;
                default:
-                       dprintf("_Movetype_PushMove: entity %e, unrecognized solid type %d\n", self, self.solid);
+                       LOG_TRACEF("_Movetype_PushMove: entity %e, unrecognized solid type %d\n", self, self.solid);
                        return;
        }
 
index baa891c939825adc1d63ce75e3393df80d3bfc58..4c39d6f7d5a4f32b46ef32e20fe90910a9b9eaee 100644 (file)
@@ -262,7 +262,7 @@ STATIC_INIT(Mutators) {
 #define MUTATOR_HOOK(cb, func, order) do {                              \
     MUTATOR_ONADD {                                                     \
         if (!CallbackChain_Add(HOOK_##cb, CALLBACK_##func, order)) {    \
-            print("HOOK FAILED: ", #cb, ":", #func, "\n");              \
+            LOG_INFO("HOOK FAILED: ", #cb, ":", #func, "\n");              \
             return true;                                                \
         }                                                               \
     }                                                                   \
index c5fa1ac00bf771cc0fa4a832d4e679e1c3327682..8673b96b35717946d6ce952dc62afe25a564035b 100644 (file)
@@ -545,7 +545,7 @@ void Draw_WaypointSprite()
     if (rgb == '0 0 0')
     {
         self.teamradar_color = '1 0 1';
-        printf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
+        LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
     }
 
     if (time - floor(time) > 0.5)
diff --git a/qcsrc/common/notifications.inc b/qcsrc/common/notifications.inc
new file mode 100644 (file)
index 0000000..a13fa0b
--- /dev/null
@@ -0,0 +1,848 @@
+// ====================================
+//  Notifications List and Information
+// ====================================
+/*
+ List of all notifications (including identifiers and display information)
+ Possible Tokens:
+    default, name, strnum, flnum,
+    channel, sound, volume, position,
+    args, hudargs, icon, cpid, durcnt, normal, gentle,
+    anncename, infoname, centername,
+    challow, chtype, optiona, optionb
+ Format Specifications:
+    MSG_ANNCE:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled if gentle is disabled, 2 = always enabled
+      name: VAR: Name of notification
+      channel: FLOAT: Sound channel to broadcast on to
+      sound: STRING: Filename for the announcement sound
+      volume: FLOAT: Volume setting for the announcement sound
+      position: FLOAT: Attenuation/positioning value
+    MSG_INFO:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled, 2 = also print to chat box
+      name: VAR: Name of notification
+      strnum: FLOAT: Number of STRING arguments (so that networking knows how many to send/receive)
+      flnum: FLOAT: Number of FLOAT arguments (so that networking knows how many to send/receive)
+      args: STRING: Arguments for Local_Notification_sprintf()
+      hudargs: STRING: Arguments for Local_Notification_HUD_Notify_Push()
+      icon: STRING: icon string name for the hud notify panel, "" if no icon is used
+      normal: STRING: Normal message (string for sprintf when gentle messages are NOT enabled)
+      gentle: STRING: Gentle message (string for sprintf when gentle messages ARE enabled)
+    MSG_CENTER:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled
+      name: VAR: Name of notification
+      strnum: FLOAT: Number of STRING arguments (so that networking knows how many to send/receive)
+      flnum: FLOAT: Number of FLOAT arguments (so that networking knows how many to send/receive)
+      args: STRING: Arguments for Local_Notification_sprintf()
+      cpid: FLOAT: centerprint ID number (CPID_*), NO_CPID if no CPID is needed
+      durcnt: XPD(FLOAT, FLOAT): Duration/Countdown: extra arguments for centerprint messages
+      normal: STRING: Normal message (string for sprintf when gentle messages are NOT enabled)
+      gentle: STRING: Gentle message (string for sprintf when gentle messages ARE enabled)
+    MSG_MULTI:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled
+      name: VAR: Name of chaining notification
+      anncename: VAR: Name of announcer notification for reference
+      infoname: VAR: Name of info notification for reference
+      centername: VAR: Name of centerprint notification for reference
+    MSG_CHOICE:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = select option A, 2 = selection option B
+      challow: FLOAT: Default setting for server allowing choices other than A
+         ^-> 0 = no choice, 1 = allowed in warmup, 2 = always allowed
+      name: VAR: Name of choice notification
+      chtype: VAR: Notification message type for options
+      optiona: VAR: Name of choice "A" notification for reference
+      optionb: VAR: Name of choice "B" notification for reference
+
+ Messages with ^F1, ^BG, ^TC, etc etc in them will replace those strings
+ with colors according to the cvars the user has chosen. This allows for
+ users to create unique color profiles for their HUD, giving more customization
+ options to HUD designers and end users who want such a feature.
+
+ Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
+ string TCR(...) to better understand how these code replacements work.
+
+ Additionally, you can find all the definitions and explanations for
+ the argument values and what they return down below in this file.
+
+ Guidlines for notification declaration (please try and follow these):
+  Specific rules:
+    -ALWAYS start the string with a color, preferably background.
+    -ALWAYS reset a color after a name (this way they don't set it for the whole string).
+    -NEVER re-declare an event twice.
+    -NEVER add or remove tokens from the format, it SHOULD already work.
+    -MSG_INFO hudargs must always be ATTACKER -> VICTIM
+    -MSG_INFO and MSG_CENTER should NOT end with a new line
+
+ General rules:
+    -Be clean and simple with your notification naming,
+     nothing too long for the name field... Abbreviations are your friend. :D
+    -Keep the spacing as clean as possible... if the arguments are abnormally long,
+      it's okay to go out of line a bit... but try and keep it clean still.
+    - Use ONLY spaces for spacing in the notification list, tabs are too inconsistent
+      with keeping alignment on different mediums.
+    -Sort the notifications in the most appropriate order for their tasks.
+    -ARIRE unir frk jvgu lbhe bja zbgure. (gvc sbe zvxrrhfn) -- Don't pay attention to this ^_^
+
+ Final note: DO NOT PROVIDE MORE ARGUMENTS THAN NECESSARY FOR THE NOTIFICATION YOU'RE CALLING!
+      The system is designed to save as much networking bandwidth as possible,
+      so please dynamically control your argument sending to fit *exactly* what is required.
+      If you send a notification with mismatching arguments, Send_Notification() will error.
+*/
+
+#define MULTITEAM_ANNCE2(default,prefix,channel,sound,volume,position) \
+    MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+    MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position)
+#define MULTITEAM_ANNCE3(default,prefix,channel,sound,volume,position) \
+    MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+    MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
+    MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position)
+#define MULTITEAM_ANNCE4(default,prefix,channel,sound,volume,position) \
+    MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+    MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
+    MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
+    MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
+#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+    MULTITEAM_ANNCE##teams(default,prefix,channel,sound,volume,position)
+
+// MSG_ANNCE_NOTIFICATIONS
+    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT,       CH_INFO, "airshot",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AMAZING,       CH_INFO, "amazing",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AWESOME,       CH_INFO, "awesome",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_BOTLIKE,       CH_INFO, "botlike",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_ACHIEVEMENT_ELECTROBITCH,  CH_INFO, "electrobitch",      VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_IMPRESSIVE,    CH_INFO, "impressive",        VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_YODA,          CH_INFO, "yoda",              VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_BEGIN,                     CH_INFO, "begin",             VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_03,             CH_INFO, "03kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_05,             CH_INFO, "05kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_10,             CH_INFO, "10kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_15,             CH_INFO, "15kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_20,             CH_INFO, "20kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_25,             CH_INFO, "25kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_30,             CH_INFO, "30kills",           VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_INSTAGIB_LASTSECOND,       CH_INFO, "lastsecond",        VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_INSTAGIB_NARROWLY,         CH_INFO, "narrowly",          VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_INSTAGIB_TERMINATED,       CH_INFO, "terminated",        VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_MULTIFRAG,                 CH_INFO, "multifrag",         VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_1,                     CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_2,                     CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_3,                     CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_4,                     CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_5,                     CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_6,                     CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_7,                     CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_8,                     CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_9,                     CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_10,                    CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_1,           CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_2,           CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_3,           CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_4,           CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_5,           CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_6,           CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_7,           CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_8,           CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_9,           CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_10,          CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_1,                CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_2,                CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_3,                CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_4,                CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_5,                CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_6,                CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_7,                CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_8,                CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_9,                CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_10,               CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_1,                CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_2,                CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_3,                CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_4,                CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_5,                CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_6,                CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_7,                CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_8,                CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_9,                CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_10,               CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_1,             CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_2,             CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_3,             CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_4,             CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_5,             CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_6,             CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_7,             CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_8,             CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_9,             CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_10,            CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_1,          CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_2,          CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_3,          CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_4,          CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_5,          CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_6,          CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_7,          CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_8,          CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_9,          CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_10,         CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_PREPARE,                   CH_INFO, "prepareforbattle",  VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_1,          CH_INFO, "1fragleft",         VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_2,          CH_INFO, "2fragsleft",        VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_3,          CH_INFO, "3fragsleft",        VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_1,           CH_INFO, "1minuteremains",    VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_5,           CH_INFO, "5minutesremain",    VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_TIMEOUT,                   CH_INFO, "timeoutcalled",     VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_VOTE_ACCEPT,               CH_INFO, "voteaccept",        VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_VOTE_CALL,                 CH_INFO, "votecall",          VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(2, ANNCE_VOTE_FAIL,                 CH_INFO, "votefail",          VOL_BASEVOICE, ATTEN_NONE)
+
+#define MULTITEAM_INFO2(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+    MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+    MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_INFO3(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+    MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+    MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+    MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_INFO4(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+    MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+    MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+    MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+    MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+    MULTITEAM_INFO##teams(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle)
+
+// MSG_INFO_NOTIFICATIONS
+    MSG_INFO_NOTIF(1, INFO_CONNECTING,                     1, 0, "s1", "",                          "",                     _("^BG%s^BG is connecting..."), "")
+    MSG_INFO_NOTIF(2, INFO_CHAT_NOSPECTATORS,              0, 0, "", "",                            "",                     _("^F4NOTE: ^BGSpectator chat is not sent to players during the match"), "")
+    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 4,                1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag"), "")
+    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 4,         2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_CAPTURE_NEUTRAL,            1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the flag"), "")
+    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_TIME_, 4,           1, 1, "s1 f1p2dec", "s1",                "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds"), "")
+    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_UNBROKEN_, 4,       2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds"), "")
+    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_ABORTRUN_, 4,    0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag was returned to base by its owner"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_ABORTRUN_NEUTRAL,0, 0, "", "",                            "",                     _("^BGThe flag was returned by its owner"), "")
+    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DAMAGED_, 4,     0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag was destroyed and returned to base"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_DAMAGED_NEUTRAL, 0, 0, "", "",                            "",                     _("^BGThe flag was destroyed and returned to base"), "")
+    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DROPPED_, 4,     0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_DROPPED_NEUTRAL, 0, 0, "", "",                            "",                     _("^BGThe flag was dropped in the base and returned itself"), "")
+    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_NEEDKILL_, 4,    0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag fell somewhere it couldn't be reached and returned to base"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_NEEDKILL_NEUTRAL,0, 0, "", "",                            "",                     _("^BGThe flag fell somewhere it couldn't be reached and returned to base"), "")
+    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_SPEEDRUN_, 4,    0, 1, "f1p2dec", "",                     "",                     _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_SPEEDRUN_NEUTRAL,0, 1, "f1p2dec", "",                     "",                     _("^BGThe flag became impatient after ^F1%.2f^BG seconds and returned itself"), "")
+    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_TIMEOUT_, 4,     0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag has returned to the base"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_TIMEOUT_NEUTRAL, 0, 0, "", "",                            "",                     _("^BGThe flag has returned to the base"), "")
+    MULTITEAM_INFO(1, INFO_CTF_LOST_, 4,                   1, 0, "s1", "s1",                        "notify_%s_lost",       _("^BG%s^BG lost the ^TC^TT^BG flag"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_LOST_NEUTRAL,               1, 0, "s1", "s1",                        "notify_%s_lost",       _("^BG%s^BG lost the flag"), "")
+    MULTITEAM_INFO(1, INFO_CTF_PICKUP_, 4,                 1, 0, "s1", "s1",                        "notify_%s_taken",      _("^BG%s^BG got the ^TC^TT^BG flag"), "")
+    MSG_INFO_NOTIF(1, INFO_CTF_PICKUP_NEUTRAL,             1, 0, "s1", "s1",                        "notify_%s_taken",      _("^BG%s^BG got the flag"), "")
+    MULTITEAM_INFO(1, INFO_CTF_RETURN_, 4,                 1, 0, "s1", "s1",                        "notify_%s_returned",   _("^BG%s^BG returned the ^TC^TT^BG flag"), "")
+    MULTITEAM_INFO(1, INFO_CTF_RETURN_MONSTER_, 4,         1, 0, "s1", "s1",                        "notify_%s_returned",   _("^BG%s^BG returned the ^TC^TT^BG flag"), "")
+    MSG_INFO_NOTIF(2, INFO_COINTOSS,                       1, 0, "s1", "",                          "",                     _("^F2Throwing coin... Result: %s^F2!"), "")
+    MSG_INFO_NOTIF(1, INFO_JETPACK_NOFUEL,                 0, 0, "", "",                            "",                     _("^BGYou don't have any fuel for the ^F1Jetpack"), "")
+    MSG_INFO_NOTIF(2, INFO_SUPERSPEC_MISSING_UID,          0, 0, "", "",                            "",                     _("^F2You lack a UID, superspec options will not be saved/restored"), "")
+    MSG_INFO_NOTIF(1, INFO_CA_JOIN_LATE,                   0, 0, "", "",                            "",                     _("^F1Round already started, you will join the game in the next round"), "")
+    MSG_INFO_NOTIF(1, INFO_CA_LEAVE,                       0, 0, "", "",                            "",                     _("^F2You will spectate in the next round"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_BUFF,              3, 3, "spree_inf s1 s2 f3buffname s3loc spree_end", "s2 s1",  "notify_death", _("^BG%s%s^K1 was killed by ^BG%s^K1's ^BG%s^K1 buff ^K1%s%s"), _("^BG%s%s^K1 was scored against by ^BG%s^K1's ^BG%s^K1 buff ^K1%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_CHEAT,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was unfairly eliminated by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_DROWN,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_water",         _("^BG%s%s^K1 was drowned by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FALL,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_fall",          _("^BG%s%s^K1 was grounded by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FIRE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was burnt up into a crisp by ^BG%s^K1%s%s"), _("^BG%s%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_LAVA,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_lava",          _("^BG%s%s^K1 was cooked by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_MONSTER,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was pushed infront of a monster by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_normal",          _("^BG%s%s^K1 was blown up by ^BG%s^K1's Nade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_NAPALM,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_napalm",          _("^BG%s%s^K1 was burned to death by ^BG%s^K1's Napalm Nade%s%s"), _("^BG%s%s^K1 got too close to a napalm explosion%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_ice",             _("^BG%s%s^K1 was blown up by ^BG%s^K1's Ice Nade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE_FREEZE,   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_ice",             _("^BG%s%s^K1 was frozen to death by ^BG%s^K1's Ice Nade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_HEAL,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_heal",            _("^BG%s%s^K1 has not been healed by ^BG%s^K1's Healing Nade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SHOOTING_STAR,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_shootingstar",  _("^BG%s%s^K1 was shot into space by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SLIME,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_slime",         _("^BG%s%s^K1 was slimed by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SWAMP,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_slime",         _("^BG%s%s^K1 was preserved by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_TELEFRAG,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_telefrag",      _("^BG%s%s^K1 was telefragged by ^BG%s^K1%s%s"), _("^BG%s%s^K1 tried to occupy ^BG%s^K1's teleport destination space%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_TOUCHEXPLODE,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 died in an accident with ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_BUMB_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Bumblebee exploded%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_BUMB_GUN,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 saw the pretty lights of ^BG%s^K1's Bumblebee gun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_CRUSH,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was crushed by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_BOMB,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was cluster bombed by ^BG%s^K1's Raptor%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_CANNON,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 couldn't resist ^BG%s^K1's purple blobs%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Raptor exploded%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Spiderbot exploded%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_MINIGUN,   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got shredded by ^BG%s^K1's Spiderbot%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_ROCKET,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was blasted to bits by ^BG%s^K1's Spiderbot%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Racer exploded%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_GUN,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was bolted down by ^BG%s^K1's Racer%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_ROCKET,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 couldn't find shelter from ^BG%s^K1's Racer%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VOID,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_void",          _("^BG%s%s^K1 was thrown into a world of hurt by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_AUTOTEAMCHANGE,      2, 1, "s1 s2loc death_team", "",         "",                     _("^BG%s^K1 was moved into the %s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_BETRAYAL,            2, 1, "s1 s2loc spree_lost", "s1",       "notify_teamkill_red",  _("^BG%s^K1 became enemies with the Lord of Teamplay%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CAMP,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_camping",       _("^BG%s^K1 thought they found a nice camping ground%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CHEAT,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_selfkill",      _("^BG%s^K1 unfairly eliminated themself%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CUSTOM,              3, 1, "s1 s2 s3loc spree_lost", "s1",    "notify_void",          "^BG%s^K1 %s^K1%s%s", "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_DROWN,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_water",         _("^BG%s^K1 couldn't catch their breath%s%s"), _("^BG%s^K1 was in the water for too long%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FALL,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_fall",          _("^BG%s^K1 hit the ground with a crunch%s%s"), _("^BG%s^K1 hit the ground with a bit too much force%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FIRE,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 became a bit too crispy%s%s"), _("^BG%s^K1 felt a little hot%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC,             2, 1, "s1 s2loc spree_lost", "s1",       "notify_selfkill",      _("^BG%s^K1 died%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_LAVA,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_lava",          _("^BG%s^K1 turned into hot slag%s%s"), _("^BG%s^K1 found a hot place%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_MAGE,            2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was exploded by a Mage%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SHAMBLER_CLAW,   2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1's innards became outwards by a Shambler%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SHAMBLER_SMASH,  2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was smashed by a Shambler%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SHAMBLER_ZAP,    2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was zapped to death by a Shambler%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SPIDER,          2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was bitten by a Spider%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_WYVERN,          2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was fireballed by a Wyvern%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ZOMBIE_JUMP,     2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 joins the Zombies%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ZOMBIE_MELEE,    2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was given kung fu lessons by a Zombie%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE,                2, 1, "s1 s2loc spree_lost", "s1",       "nade_normal",          _("^BG%s^K1 mastered the art of self-nading%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_NAPALM,         2, 1, "s1 s2loc spree_lost", "s1",       "nade_napalm",          _("^BG%s^K1 was burned to death by their own Napalm Nade%s%s"), _("^BG%s^K1 decided to take a look at the results of their napalm explosion%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE,            2, 1, "s1 s2loc spree_lost", "s1",       "nade_ice",             _("^BG%s^K1 mastered the art of self-nading%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE_FREEZE,     2, 1, "s1 s2loc spree_lost", "s1",       "nade_ice",             _("^BG%s^K1 was frozen to death by their own Ice Nade%s%s"), _("^BG%s^K1 felt a little chilly%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_HEAL,           2, 1, "s1 s2loc spree_lost", "s1",       "nade_heal",            _("^BG%s^K1's Healing Nade didn't quite heal them%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NOAMMO,              2, 1, "s1 s2loc spree_lost", "s1",       "notify_outofammo",     _("^BG%s^K1 died%s%s. What's the point of living without ammo?"), _("^BG%s^K1 ran out of ammo%s%s"))
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_ROT,                 2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 rotted away%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SHOOTING_STAR,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_shootingstar",  _("^BG%s^K1 became a shooting star%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SLIME,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_slime",         _("^BG%s^K1 was slimed%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",       "notify_selfkill",      _("^BG%s^K1 couldn't take it anymore%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SWAMP,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_slime",         _("^BG%s^K1 is now preserved for centuries to come%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TEAMCHANGE,          2, 1, "s1 s2loc death_team", "",         "",                     _("^BG%s^K1 switched to the %s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TOUCHEXPLODE,        2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 died in an accident%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET,              2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 ran into a turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_EWHEEL,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted away by an eWheel turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_FLAC,         2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught up in the FLAC turret fire%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_HELLION,      2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted away by a Hellion turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_HK,           2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 could not hide from the Hunter turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_MACHINEGUN,   2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was riddled full of holes by a Machinegun turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_MLRS,         2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got turned into smoldering gibs by an MLRS turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_PHASER,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was phased out by a turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_PLASMA,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got served some superheated plasma from a turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_TESLA,        2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was electrocuted by a Tesla turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_GUN,     2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got served a lead enrichment by a Walker turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_MELEE,   2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was impaled by a Walker turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_ROCKET,  2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted away by a Walker turret%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_BUMB_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Bumblebee explosion%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_CRUSH,            2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was crushed by a vehicle%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_RAPT_BOMB,        2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was caught in a Raptor cluster bomb%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_RAPT_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Raptor explosion%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_SPID_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Spiderbot explosion%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_SPID_ROCKET,      2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted to bits by a Spiderbot rocket%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_WAKI_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Racer explosion%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_WAKI_ROCKET,      2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 couldn't find shelter from a Racer rocket%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VOID,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_void",          _("^BG%s^K1 was in the wrong place%s%s"), "")
+    MULTITEAM_INFO(1, INFO_DEATH_TEAMKILL_, 4,             3, 1, "s1 s2 s3loc spree_end", "s2 s1",  "notify_teamkill_%s",   _("^BG%s^K1 was betrayed by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_DOMINATION_CAPTURE_TIME,        2, 2, "s1 s2 f1 f2", "",                 "",                     _("^BG%s^BG%s^BG (%s points every %s seconds)"), "")
+    MSG_INFO_NOTIF(1, INFO_FREEZETAG_FREEZE,               2, 0, "s1 s2", "",                       "",                     _("^BG%s^K1 was frozen by ^BG%s"), "")
+    MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED,              2, 0, "s1 s2", "",                       "",                     _("^BG%s^K3 was revived by ^BG%s"), "")
+    MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED_FALL,         1, 0, "s1", "",                          "",                     _("^BG%s^K3 was revived by falling"), "")
+    MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED_NADE,         1, 0, "s1", "",                          "",                     _("^BG%s^K3 was revived by their Nade explosion"), "")
+    MSG_INFO_NOTIF(1, INFO_FREEZETAG_AUTO_REVIVED,         1, 1, "s1 f1", "",                       "",                     _("^BG%s^K3 was automatically revived after %s second(s)"), "")
+    MULTITEAM_INFO(1, INFO_ROUND_TEAM_WIN_, 4,             0, 0, "", "",                            "",                     _("^TC^TT^BG team wins the round"), "")
+    MSG_INFO_NOTIF(1, INFO_ROUND_PLAYER_WIN,               1, 0, "s1", "",                          "",                     _("^BG%s^BG wins the round"), "")
+    MSG_INFO_NOTIF(1, INFO_ROUND_TIED,                     0, 0, "", "",                            "",                     _("^BGRound tied"), "")
+    MSG_INFO_NOTIF(1, INFO_ROUND_OVER,                     0, 0, "", "",                            "",                     _("^BGRound over, there's no winner"), "")
+    MSG_INFO_NOTIF(1, INFO_FREEZETAG_SELF,                 1, 0, "s1", "",                          "",                     _("^BG%s^K1 froze themself"), "")
+    MSG_INFO_NOTIF(1, INFO_GODMODE_OFF,                    0, 1, "f1", "",                          "",                     _("^BGGodmode saved you %s units of damage, cheater!"), "")
+    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF,                      1, 1, "s1 item_buffname", "",            "",                     _("^BG%s^BG got the %s^BG buff!"), "")
+    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF_LOST,                 1, 1, "s1 item_buffname", "",            "",                     _("^BG%s^BG lost the %s^BG buff!"), "")
+    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF_DROP,                 0, 1, "item_buffname", "",               "",                     _("^BGYou dropped the %s^BG buff!"), "")
+    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF_GOT,                  0, 1, "item_buffname", "",               "",                     _("^BGYou got the %s^BG buff!"), "")
+    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_DONTHAVE,           0, 1, "item_wepname", "",                      "",               _("^BGYou do not have the ^F1%s"), "")
+    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_DROP,               1, 1, "item_wepname item_wepammo", "",         "",               _("^BGYou dropped the ^F1%s^BG%s"), "")
+    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_GOT,                0, 1, "item_wepname", "",                      "",               _("^BGYou got the ^F1%s"), "")
+    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_NOAMMO,             0, 1, "item_wepname", "",                      "",               _("^BGYou don't have enough ammo for the ^F1%s"), "")
+    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_PRIMORSEC,          0, 3, "item_wepname f2primsec f3primsec", "",  "",               _("^F1%s %s^BG is unable to fire, but its ^F1%s^BG can"), "")
+    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_UNAVAILABLE,        0, 1, "item_wepname", "",                      "",               _("^F1%s^BG is ^F4not available^BG on this map"), "")
+    MSG_INFO_NOTIF(2, INFO_JOIN_CONNECT,                   1, 0, "s1", "",                          "",                     _("^BG%s^F3 connected%s"), "")
+    MULTITEAM_INFO(2, INFO_JOIN_CONNECT_TEAM_, 4,          1, 0, "s1", "",                          "",                     _("^BG%s^F3 connected and joined the ^TC^TT team"), "")
+    MSG_INFO_NOTIF(1, INFO_JOIN_PLAY,                      1, 0, "s1", "",                          "",                     _("^BG%s^F3 is now playing"), "")
+    MSG_INFO_NOTIF(1, INFO_KEEPAWAY_DROPPED,               1, 0, "s1", "s1",                        "notify_balldropped",   _("^BG%s^BG has dropped the ball!"), "")
+    MSG_INFO_NOTIF(1, INFO_KEEPAWAY_PICKUP,                1, 0, "s1", "s1",                        "notify_ballpickedup",  _("^BG%s^BG has picked up the ball!"), "")
+    MULTITEAM_INFO(1, INFO_KEYHUNT_CAPTURE_, 4,            1, 0, "s1", "",                          "",                     _("^BG%s^BG captured the keys for the ^TC^TT team"), "")
+    MULTITEAM_INFO(1, INFO_KEYHUNT_DROP_, 4,               1, 0, "s1", "",                          "",                     _("^BG%s^BG dropped the ^TC^TT Key"), "")
+    MULTITEAM_INFO(1, INFO_KEYHUNT_LOST_, 4,               1, 0, "s1", "",                          "",                     _("^BG%s^BG lost the ^TC^TT Key"), "")
+    MULTITEAM_INFO(1, INFO_KEYHUNT_PICKUP_, 4,             1, 0, "s1", "",                          "",                     _("^BG%s^BG picked up the ^TC^TT Key"), "")
+    MSG_INFO_NOTIF(1, INFO_LMS_FORFEIT,                    1, 0, "s1", "",                          "",                     _("^BG%s^F3 forfeited"), "")
+    MSG_INFO_NOTIF(1, INFO_LMS_NOLIVES,                    1, 0, "s1", "",                          "",                     _("^BG%s^F3 has no more lives left"), "")
+    MSG_INFO_NOTIF(1, INFO_MONSTERS_DISABLED,              0, 0, "", "",                            "",                     _("^BGMonsters are currently disabled"), "")
+    MSG_INFO_NOTIF(1, INFO_ONSLAUGHT_CAPTURE,              2, 0, "s1 s2", "",                       "",                     _("^BG%s^BG captured %s^BG control point"), "")
+    MULTITEAM_INFO(1, INFO_ONSLAUGHT_CPDESTROYED_, 4,      2, 0, "s1 s2", "",                       "",                     _("^TC^TT^BG team %s^BG control point has been destroyed by %s"), "")
+    MULTITEAM_INFO(1, INFO_ONSLAUGHT_GENDESTROYED_, 4,     0, 0, "", "",                            "",                     _("^TC^TT^BG generator has been destroyed"), "")
+    MULTITEAM_INFO(1, INFO_ONSLAUGHT_GENDESTROYED_OVERTIME_, 4,  0, 0, "", "",                      "",                     _("^TC^TT^BG generator spontaneously combusted due to overtime!"), "")
+    MSG_INFO_NOTIF(1, INFO_POWERUP_INVISIBILITY,           1, 0, "s1", "s1",                        "strength",             _("^BG%s^K1 picked up Invisibility"), "")
+    MSG_INFO_NOTIF(1, INFO_POWERUP_SHIELD,                 1, 0, "s1", "s1",                        "shield",               _("^BG%s^K1 picked up Shield"), "")
+    MSG_INFO_NOTIF(1, INFO_POWERUP_SPEED,                  1, 0, "s1", "s1",                        "shield",               _("^BG%s^K1 picked up Speed"), "")
+    MSG_INFO_NOTIF(1, INFO_POWERUP_STRENGTH,               1, 0, "s1", "s1",                        "strength",             _("^BG%s^K1 picked up Strength"), "")
+    MSG_INFO_NOTIF(2, INFO_QUIT_DISCONNECT,                1, 0, "s1", "",                          "",                     _("^BG%s^F3 disconnected"), "")
+    MSG_INFO_NOTIF(2, INFO_QUIT_KICK_IDLING,               1, 0, "s1", "",                          "",                     _("^BG%s^F3 was kicked for idling"), "")
+    MSG_INFO_NOTIF(1, INFO_QUIT_KICK_SPECTATING,           0, 0, "", "",                            "",                     _("^F2You were kicked from the server because you are a spectator and spectators aren't allowed at the moment."), "")
+    MSG_INFO_NOTIF(1, INFO_QUIT_SPECTATE,                  1, 0, "s1", "",                          "",                     _("^BG%s^F3 is now spectating"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_ABANDONED,                 1, 0, "s1", "",                                                                    "",                      _("^BG%s^BG has abandoned the race"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_FAIL_RANKED,               1, 3, "s1 race_col f1ord race_col f3race_time race_diff", "s1 f3race_time",        "race_newfail",          _("^BG%s^BG couldn't break their %s%s^BG place record of %s%s %s"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_FAIL_UNRANKED,             1, 3, "s1 race_col f1ord race_col f3race_time race_diff", "s1 f3race_time",        "race_newfail",          _("^BG%s^BG couldn't break the %s%s^BG place record of %s%s %s"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_FINISHED,                  1, 0, "s1", "",                                                                    "",                      _("^BG%s^BG has finished the race"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_NEW_BROKEN,                2, 3, "s1 s2 race_col f1ord race_col f2race_time race_diff", "s1 f2race_time",     "race_newrankyellow",    _("^BG%s^BG broke %s^BG's %s%s^BG place record with %s%s %s"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_NEW_IMPROVED,              1, 3, "s1 race_col f1ord race_col f2race_time race_diff", "s1 f2race_time",        "race_newtime",          _("^BG%s^BG improved their %s%s^BG place record with %s%s %s"), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_NEW_MISSING_UID,           1, 1, "s1 f1race_time", "s1 f1race_time",                                          "race_newfail",          _("^BG%s^BG scored a new record with ^F2%s^BG, but unfortunately lacks a UID and will be lost."), "")
+    MSG_INFO_NOTIF(1, INFO_RACE_NEW_SET,                   1, 2, "s1 race_col f1ord race_col f2race_time", "s1 f2race_time",                  "race_newrecordserver",  _("^BG%s^BG set the %s%s^BG place record with %s%s"), "")
+    MULTIICON_INFO(1, INFO_MINIGAME_INVITE,                2, 0, "s2 minigame1_name s1","s2",              "minigame1_d",                    "minigames/%s/icon_notif",_("^F4You have been invited by ^BG%s^F4 to join their game of ^F2%s^F4 (^F1%s^F4)"), "")
+    MULTITEAM_INFO(1, INFO_SCORES_, 4,                     0, 0, "", "",                            "",                     _("^TC^TT ^BGteam scores!"), "")
+    MSG_INFO_NOTIF(1, INFO_SPECTATE_WARNING,               0, 1, "f1secs", "",                      "",                     _("^F2You have to become a player within the next %s, otherwise you will be kicked, because spectating isn't allowed at this time!"), "")
+    MSG_INFO_NOTIF(1, INFO_SUPERWEAPON_PICKUP,             1, 0, "s1", "s1",                        "superweapons",         _("^BG%s^K1 picked up a Superweapon"), "")
+    MSG_INFO_NOTIF(1, INFO_TEAMCHANGE_LARGERTEAM,          0, 0, "", "",                            "",                     _("^BGYou cannot change to a larger team"), "")
+    MSG_INFO_NOTIF(1, INFO_TEAMCHANGE_NOTALLOWED,          0, 0, "", "",                            "",                     _("^BGYou are not allowed to change teams"), "")
+    MSG_INFO_NOTIF(2, INFO_VERSION_BETA,                   2, 0, "s1 s2", "",                       "",                     _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s"), "")
+    MSG_INFO_NOTIF(2, INFO_VERSION_OLD,                    2, 0, "s1 s2", "",                       "",                     _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s"), "")
+    MSG_INFO_NOTIF(2, INFO_VERSION_OUTDATED,               2, 0, "s1 s2", "",                       "",                     _("^F4NOTE: ^F1Xonotic %s^BG is out, and you still have ^F2Xonotic %s^BG - get the update from ^F3http://www.xonotic.org/^BG!"), "")
+    MSG_INFO_NOTIF(1, INFO_WATERMARK,                      1, 0, "s1", "",                          "",                     _("^F3SVQC Build information: ^F4%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Accordeon%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Accordeon%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ARC_MURDER,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponarc",              _("^BG%s%s^K1 was electrocuted by ^BG%s^K1's Arc%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponlaser",            _("^BG%s%s^K1 was shot to death by ^BG%s^K1's Blaster%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_SUICIDE,               2, 1, "s1 s2loc spree_lost", "s1",                 "weaponlaser",            _("^BG%s^K1 shot themself to hell with their Blaster%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponcrylink",          _("^BG%s%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_SUICIDE,               2, 1, "s1 s2loc spree_lost", "s1",                 "weaponcrylink",          _("^BG%s^K1 felt the strong pull of their Crylink%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_DEVASTATOR_MURDER_DIRECT,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrocketlauncher",   _("^BG%s%s^K1 ate ^BG%s^K1's rocket%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_DEVASTATOR_MURDER_SPLASH,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrocketlauncher",   _("^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_DEVASTATOR_SUICIDE,            2, 1, "s1 s2loc spree_lost", "s1",                 "weaponrocketlauncher",   _("^BG%s^K1 blew themself up with their Devastator%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_BOLT,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponelectro",          _("^BG%s%s^K1 was blasted by ^BG%s^K1's Electro bolt%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_COMBO,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponelectro",          _("^BG%s%s^K1 felt the electrifying air of ^BG%s^K1's Electro combo%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_ORBS,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponelectro",          _("^BG%s%s^K1 got too close to ^BG%s^K1's Electro orb%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_SUICIDE_BOLT,          2, 1, "s1 s2loc spree_lost", "s1",                 "weaponelectro",          _("^BG%s^K1 played with Electro bolts%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_SUICIDE_ORBS,          2, 1, "s1 s2loc spree_lost", "s1",                 "weaponelectro",          _("^BG%s^K1 could not remember where they put their Electro orb%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_MURDER_BLAST,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponfireball",         _("^BG%s%s^K1 got too close to ^BG%s^K1's fireball%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_MURDER_FIREMINE,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponfireball",         _("^BG%s%s^K1 got burnt by ^BG%s^K1's firemine%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_SUICIDE_BLAST,        2, 1, "s1 s2loc spree_lost", "s1",                 "weaponfireball",         _("^BG%s^K1 should have used a smaller gun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,     2, 1, "s1 s2loc spree_lost", "s1",                 "weaponfireball",         _("^BG%s^K1 forgot about their firemine%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_MURDER_BURST,            3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhagar",            _("^BG%s%s^K1 was pummeled by a burst of ^BG%s^K1's Hagar rockets%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_MURDER_SPRAY,            3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhagar",            _("^BG%s%s^K1 was pummeled by ^BG%s^K1's Hagar rockets%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_SUICIDE,                 2, 1, "s1 s2loc spree_lost", "s1",                 "weaponhagar",            _("^BG%s^K1 played with tiny Hagar rockets%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HLAC_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhlac",             _("^BG%s%s^K1 was cut down with ^BG%s^K1's HLAC%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HLAC_SUICIDE,                  2, 1, "s1 s2loc spree_lost", "s1",                 "weaponhlac",             _("^BG%s^K1 got a little jumpy with their HLAC%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HMG_MURDER_SNIPE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhmg",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Heavy Machine Gun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HMG_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhmg",              _("^BG%s%s^K1 was torn to bits by ^BG%s^K1's Heavy Machine Gun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_HOOK_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhook",             _("^BG%s%s^K1 was caught in ^BG%s^K1's Hook gravity bomb%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_KLEINBOTTLE_MURDER,            3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Klein Bottle%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_KLEINBOTTLE_SUICIDE,           2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Klein Bottle%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MACHINEGUN_MURDER_SNIPE,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MACHINEGUN_MURDER_SPRAY,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_LIMIT,               0, 1, "f1", "",                                    "",                       _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponminelayer",        _("^BG%s%s^K1 got too close to ^BG%s^K1's mine%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",                 "weaponminelayer",        _("^BG%s^K1 forgot about their mine%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_BOUNCE,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapongrenadelauncher",  _("^BG%s%s^K1 got too close to ^BG%s^K1's Mortar grenade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_EXPLODE,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapongrenadelauncher",  _("^BG%s%s^K1 ate ^BG%s^K1's Mortar grenade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,         2, 1, "s1 s2loc spree_lost", "s1",                 "weapongrenadelauncher",  _("^BG%s^K1 didn't see their own Mortar grenade%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,        2, 1, "s1 s2loc spree_lost", "s1",                 "weapongrenadelauncher",  _("^BG%s^K1 blew themself up with their own Mortar%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER,                  3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 was sniped with a Rifle by ^BG%s^K1%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HAIL,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 died in ^BG%s^K1's Rifle bullet hail%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 failed to hide from ^BG%s^K1's Rifle bullet hail%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_PIERCING,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 failed to hide from ^BG%s^K1's Rifle%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_MURDER_DIRECT,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrpc",              _("^BG%s%s^K1 was sawn in half by ^BG%s^K1's Rocket Propelled Chainsaw%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_MURDER_SPLASH,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrpc",              _("^BG%s%s^K1 almost dodged ^BG%s^K1's Rocket Propelled Chainsaw%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_SUICIDE_DIRECT,            2, 1, "s1 s2loc spree_lost", "s1",                 "weaponrpc",              _("^BG%s^K1 was sawn in half by their own Rocket Propelled Chainsaw%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_SUICIDE_SPLASH,            2, 1, "s1 s2loc spree_lost", "s1",                 "weaponrpc",              _("^BG%s^K1 blew themself up with their Rocket Propelled Chainsaw%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_MURDER_SPRAY,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponseeker",           _("^BG%s%s^K1 was pummeled by ^BG%s^K1's Seeker rockets%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_MURDER_TAG,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponseeker",           _("^BG%s%s^K1 was tagged by ^BG%s^K1's Seeker%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_SUICIDE,                2, 1, "s1 s2loc spree_lost", "s1",                 "weaponseeker",           _("^BG%s^K1 played with tiny Seeker rockets%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOCKWAVE_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponshotgun",          _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shockwave%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOCKWAVE_MURDER_SLAP,         3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1",  "notify_melee_shotgun",   _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shockwave%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponshotgun",          _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shotgun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER_SLAP,           3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1",  "notify_melee_shotgun",   _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shotgun%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_THINKING_WITH_PORTALS,         2, 1, "s1 s2loc spree_lost", "s1",                 "notify_selfkill",        _("^BG%s^K1 is now thinking with portals%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Tuba%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_SUICIDE,                  2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Tuba%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_VAPORIZER_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponminstanex",        _("^BG%s%s^K1 has been sublimated by ^BG%s^K1's Vaporizer%s%s"), "")
+    MSG_INFO_NOTIF(1, INFO_WEAPON_VORTEX_MURDER,                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponnex",              _("^BG%s%s^K1 has been vaporized by ^BG%s^K1's Vortex%s%s"), "")
+
+#define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+    MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+    MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_CENTER3(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+    MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+    MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+    MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_CENTER4(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+    MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+    MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+    MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+    MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+    MULTITEAM_CENTER##teams(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle)
+
+// MSG_CENTER_NOTIFICATIONS
+    MSG_CENTER_NOTIF(1, CENTER_ALONE,                       0, 0, "",             NO_CPID,             "0 0", _("^F4You are now alone!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are attacking!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are defending!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_BEGIN,             0, 0, "",             CPID_ROUND,          "2 0", _("^F4Begin!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_GAMESTART,         0, 1, "",             CPID_ROUND,          "1 f1", _("^F4Game starts in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_ROUNDSTART,        0, 1, "",             CPID_ROUND,          "1 f1", _("^F4Round starts in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_ROUNDSTOP,         0, 0, "",             CPID_ROUND,          "2 0", _("^F4Round cannot start"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ROUND_TIED,                  0, 0, "",             CPID_ROUND,          "0 0", _("^BGRound tied"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ROUND_OVER,                  0, 0, "",             CPID_ROUND,          "0 0", _("^BGRound over, there's no winner"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CAMPCHECK,                   0, 0, "",             CPID_CAMPCHECK,      "0 0", _("^F2Don't camp!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_COINTOSS,                    1, 0, "s1",           NO_CPID,             "0 0", _("^F2Throwing coin... Result: %s^F2!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_FREE,      0, 0, "",             CPID_CTF_CAPSHIELD,  "0 0", _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_INACTIVE,  0, 0, "",             CPID_CTF_CAPSHIELD,  "0 0", _("^BGThis flag is currently inactive"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED,  0, 0, "",             CPID_CTF_CAPSHIELD,  "0 0", _("^BGYou are now ^F1shielded^BG from the flag(s)\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_CAPTURE_, 4,             0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou captured the ^TC^TT^BG flag!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURE_NEUTRAL,         0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou captured the flag!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_FLAG_THROW_PUNISH,       0, 1, "f1secs",       CPID_CTF_LOWPRIO,    "0 0", _("^BGToo many flag throws! Throwing disabled for %s."), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_PASS_OTHER_, 4,          2, 0, "s1 s2",        CPID_CTF_PASS,       "0 0", _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_OTHER_NEUTRAL,      2, 0, "s1 s2",        CPID_CTF_PASS,       "0 0", _("^BG%s^BG passed the flag to %s"), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_PASS_RECEIVED_, 4,       1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou received the ^TC^TT^BG flag from %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_RECEIVED_NEUTRAL,   1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou received the flag from %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTED,          1, 0, "s1 pass_key",  CPID_CTF_PASS,       "0 0", _("^BG%s^BG requests you to pass the flag%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTING,         1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGRequesting %s^BG to pass you the flag"), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_PASS_SENT_, 4,           1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou passed the ^TC^TT^BG flag to %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_SENT_NEUTRAL,       1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou passed the flag to %s"), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_, 4,              0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got the ^TC^TT^BG flag!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_NEUTRAL,          0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got the flag!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM,             1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got your %steam^BG's flag, return it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_ENEMY,       1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got the %senemy^BG's flag, return it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY,            1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy^BG got your flag! Retrieve it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_VERBOSE,    2, 0, "s1 s2 s1",     CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy (^BG%s%s)^BG got your flag! Retrieve it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_NEUTRAL,    1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy^BG got the flag! Retrieve it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_NEUTRAL_VERBOSE, 2, 0, "s1 s2 s1",CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy (^BG%s%s)^BG got the flag! Retrieve it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_TEAM,        1, 0, "s1",          CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy^BG got their flag! Retrieve it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_TEAM_VERBOSE,2, 0, "s1 s2 s1",    CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy (^BG%s%s)^BG got their flag! Retrieve it!"), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_TEAM_, 4,         1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate^BG got the ^TC^TT^BG flag! Protect them!"), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_TEAM_VERBOSE_,    4, 2, 0, "s1 s2 s1",  CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the ^TC^TT^BG flag! Protect them!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_NEUTRAL,         1, 0, "s1",       CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate^BG got the flag! Protect them!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_VERBOSE_NEUTRAL, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "")
+    MULTITEAM_CENTER(1, CENTER_CTF_RETURN_, 4,              0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou returned the ^TC^TT^BG flag!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_CARRIER,       0, 0, "",             CPID_STALEMATE,      "0 0", _("^BGStalemate! Enemies can now see you on radar!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_OTHER,         0, 0, "",             CPID_STALEMATE,      "0 0", _("^BGStalemate! Flag carriers can now be seen by enemies on radar!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG,                 1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s"), _("^K3%sYou scored against ^BG%s"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAGGED,              1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K1%sYou were fragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAGGED_VERBOSE,      1, 4, "spree_cen s1 frag_stats",  NO_CPID, "0 0", _("^K1%sYou were fragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^BG%s"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG_VERBOSE,         1, 2, "spree_cen s1 frag_ping",   NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s^BG%s"), _("^K3%sYou scored against ^BG%s^BG%s"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG,             1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED,          1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE,  1, 4, "spree_cen s1 frag_stats",  NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing^BG%s"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE,     1, 2, "spree_cen s1 frag_ping",   NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing^BG%s"))
+    MSG_CENTER_NOTIF(1, CENTER_NADE_THROW,                  0, 0, "",             CPID_NADES,          "0 0", _("^BGPress ^F2DROPWEAPON^BG again to toss the nade!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_NADE_BONUS,                  0, 0, "",             CPID_NADES,          "0 0", _("^F2You got a ^K1BONUS GRENADE^F2!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_AUTOTEAMCHANGE,   0, 1, "death_team",   NO_CPID,             "0 0", _("^BGYou have been moved into a different team\nYou are now on: %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_BETRAYAL,         0, 0, "",             NO_CPID,             "0 0", _("^K1Don't shoot your team mates!"), _("^K1Don't go against your team mates!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CAMP,             0, 0, "",             NO_CPID,             "0 0", _("^K1Die camper!"), _("^K1Reconsider your tactics, camper!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CHEAT,            0, 0, "",             NO_CPID,             "0 0", _("^K1You unfairly eliminated yourself!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CUSTOM,           2, 0, "s2",           NO_CPID,             "0 0", _("^K1You were %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_DROWN,            0, 0, "",             NO_CPID,             "0 0", _("^K1You couldn't catch your breath!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FALL,             0, 0, "",             NO_CPID,             "0 0", _("^K1You hit the ground with a crunch!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FIRE,             0, 0, "",             NO_CPID,             "0 0", _("^K1You got a little bit too crispy!"), _("^K1You felt a little too hot!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_GENERIC,          0, 0, "",             NO_CPID,             "0 0", _("^K1You killed your own dumb self!"), _("^K1You need to be more careful!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_LAVA,             0, 0, "",             NO_CPID,             "0 0", _("^K1You couldn't stand the heat!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_MONSTER,          0, 0, "",             NO_CPID,             "0 0", _("^K1You were killed by a monster!"), _("^K1You need to watch out for monsters!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE,             0, 0, "",             NO_CPID,             "0 0", _("^K1You forgot to put the pin back in!"), _("^K1Tastes like chicken!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE_NAPALM,      0, 0, "",             NO_CPID,             "0 0", _("^K1Hanging around a napalm explosion is bad!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE_ICE_FREEZE,  0, 0, "",             NO_CPID,             "0 0", _("^K1You got a little bit too cold!"), _("^K1You felt a little chilly!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE_HEAL,        0, 0, "",             NO_CPID,             "0 0", _("^K1Your Healing Nade is a bit defective"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NOAMMO,           0, 0, "",             NO_CPID,             "0 0", _("^K1You were killed for running out of ammo..."), _("^K1You are respawning for running out of ammo..."))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_ROT,              0, 0, "",             NO_CPID,             "0 0", _("^K1You grew too old without taking your medicine"), _("^K1You need to preserve your health"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SHOOTING_STAR,    0, 0, "",             NO_CPID,             "0 0", _("^K1You became a shooting star!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SLIME,            0, 0, "",             NO_CPID,             "0 0", _("^K1You melted away in slime!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SUICIDE,          0, 0, "",             NO_CPID,             "0 0", _("^K1You committed suicide!"), _("^K1You ended it all!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SWAMP,            0, 0, "",             NO_CPID,             "0 0", _("^K1You got stuck in a swamp!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TEAMCHANGE,       0, 1, "death_team",   NO_CPID,             "0 0", _("^BGYou are now on: %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TOUCHEXPLODE,     0, 0, "",             NO_CPID,             "0 0", _("^K1You died in an accident!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET,           0, 0, "",             NO_CPID,             "0 0", _("^K1You were fragged by a turret!"), _("^K1You had an unfortunate run in with a turret!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET_EWHEEL,    0, 0, "",             NO_CPID,             "0 0", _("^K1You were fragged by an eWheel turret!"), _("^K1You had an unfortunate run in with an eWheel turret!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET_WALK,      0, 0, "",             NO_CPID,             "0 0", _("^K1You were fragged by a Walker turret!"), _("^K1You had an unfortunate run in with a Walker turret!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_BUMB_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Bumblebee explosion!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_CRUSH,         0, 0, "",             NO_CPID,             "0 0", _("^K1You were crushed by a vehicle!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_RAPT_BOMB,     0, 0, "",             NO_CPID,             "0 0", _("^K1You were caught in a Raptor cluster bomb!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_RAPT_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Raptor explosion!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_SPID_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Spiderbot explosion!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_SPID_ROCKET,   0, 0, "",             NO_CPID,             "0 0", _("^K1You were blasted to bits by a Spiderbot rocket!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_WAKI_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Racer explosion!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_WAKI_ROCKET,   0, 0, "",             NO_CPID,             "0 0", _("^K1You couldn't find shelter from a Racer rocket!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VOID,             0, 0, "",             NO_CPID,             "0 0", _("^K1Watch your step!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAG,         1, 0, "s1",           NO_CPID,             "0 0", _("^K1Moron! You fragged ^BG%s^K1, a team mate!"), _("^K1Moron! You went against ^BG%s^K1, a team mate!"))
+    MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAGGED,      1, 0, "s1",           NO_CPID,             "0 0", _("^K1You were fragged by ^BG%s^K1, a team mate"), _("^K1You were scored against by ^BG%s^K1, a team mate"))
+    MSG_CENTER_NOTIF(1, CENTER_DISCONNECT_IDLING,           0, 1, "",             CPID_IDLING,         "1 f1", _("^K1Stop idling!\n^BGDisconnecting in ^COUNT..."), "")
+    MSG_CENTER_NOTIF(1, CENTER_DOOR_LOCKED_NEED,            0, 0, "",             NO_CPID,             "0 0", _("^BGYou need %s^BG!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DOOR_LOCKED_ALSONEED,        0, 0, "",             NO_CPID,             "0 0", _("^BGYou also need %s^BG!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_DOOR_UNLOCKED,               0, 0, "",             NO_CPID,             "0 0", _("^BGDoor unlocked!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_EXTRALIVES,                  0, 0, "",             NO_CPID,             "0 0", _("^F2You picked up some extra lives"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FREEZE,            1, 0, "s1",           NO_CPID,             "0 0", _("^K3You froze ^BG%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FROZEN,            1, 0, "s1",           NO_CPID,             "0 0", _("^K1You were frozen by ^BG%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE,            1, 0, "s1",           NO_CPID,             "0 0", _("^K3You revived ^BG%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE_SELF,       0, 0, "",             NO_CPID,             "0 0", _("^K3You revived yourself"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVED,           1, 0, "s1",           NO_CPID,             "0 0", _("^K3You were revived by ^BG%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_AUTO_REVIVED,      0, 1, "f1",           NO_CPID,             "0 0", _("^K3You were automatically revived after %s second(s)"), "")
+    MSG_CENTER_NOTIF(1, CENTER_GENERATOR_UNDERATTACK,       0, 0, "",             NO_CPID,             "0 0", _("^BGThe generator is under attack!"), "")
+    MULTITEAM_CENTER(1, CENTER_ROUND_TEAM_WIN_, 4,          0, 0, "",             CPID_ROUND,          "0 0", _("^TC^TT^BG team wins the round"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ROUND_PLAYER_WIN,            1, 0, "s1",           CPID_ROUND,          "0 0", _("^BG%s^BG wins the round"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_SELF,              0, 0, "",             NO_CPID,             "0 0", _("^K1You froze yourself"), "")
+    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_SPAWN_LATE,        0, 0, "",             NO_CPID,             "0 0", _("^K1Round already started, you spawn as frozen"), "")
+    MSG_CENTER_NOTIF(1, CENTER_INVASION_SUPERMONSTER,       1, 0, "s1",           NO_CPID,             "0 0", _("^K1A %s has arrived!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_BUFF_DROP,              0, 1, "item_buffname",                     CPID_ITEM, "item_centime 0", _("^BGYou dropped the %s^BG buff!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_BUFF_GOT,               0, 1, "item_buffname",                     CPID_ITEM, "item_centime 0", _("^BGYou got the %s^BG buff!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_DONTHAVE,        0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^BGYou do not have the ^F1%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_DROP,            1, 1, "item_wepname item_wepammo",         CPID_ITEM, "item_centime 0", _("^BGYou dropped the ^F1%s^BG%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_GOT,             0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^BGYou got the ^F1%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_NOAMMO,          0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^BGYou don't have enough ammo for the ^F1%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_PRIMORSEC,       0, 3, "item_wepname f2primsec f3primsec",  CPID_ITEM, "item_centime 0", _("^F1%s %s^BG is unable to fire, but its ^F1%s^BG can"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_UNAVAILABLE,     0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^F1%s^BG is ^F4not available^BG on this map"), "")
+    MSG_CENTER_NOTIF(1, CENTER_JOIN_NOSPAWNS,               0, 0, "",              CPID_PREVENT_JOIN,     "0 0", _("^K1No spawnpoints available!\nHope your team can fix it..."), "")
+    MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT,                0, 0, "",              CPID_PREVENT_JOIN,     "0 0", _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_DROPPED,            1, 0, "s1",            CPID_KEEPAWAY,         "0 0", _("^BG%s^BG has dropped the ball!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP,             1, 0, "s1",            CPID_KEEPAWAY,         "0 0", _("^BG%s^BG has picked up the ball!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP_SELF,        0, 0, "",              CPID_KEEPAWAY,         "0 0", _("^BGYou picked up the ball"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_WARN,               0, 0, "",              CPID_KEEPAWAY_WARN,    "0 0", _("^BGKilling people while you don't have the ball gives no points!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_HELP,                0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGAll keys are in your team's hands!\nHelp the key carriers to meet!"), "")
+    MULTITEAM_CENTER(1, CENTER_KEYHUNT_INTERFERE_, 4,       0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGAll keys are in ^TC^TT team^BG's hands!\nInterfere ^F4NOW^BG!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_MEET,                0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGAll keys are in your team's hands!\nMeet the other key carriers ^F4NOW^BG!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_ROUNDSTART,          0, 1, "",              CPID_KEYHUNT_OTHER,    "1 f1", _("^F4Round will start in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_SCAN,                0, 1, "",              CPID_KEYHUNT_OTHER,    "f1 0", _("^BGScanning frequency range..."), "")
+    MULTITEAM_CENTER(1, CENTER_KEYHUNT_START_, 4,           0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGYou are starting with the ^TC^TT Key"), "")
+    MSG_CENTER_NOTIF(1, CENTER_LMS_NOLIVES,                 0, 0, "",              CPID_LMS,              "0 0", _("^BGYou have no lives left, you must wait until the next match"), "")
+    MSG_CENTER_NOTIF(1, CENTER_MISSING_TEAMS,               0, 1, "missing_teams", CPID_MISSING_TEAMS,    "-1 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_MISSING_PLAYERS,             0, 1, "f1",            CPID_MISSING_PLAYERS,  "-1 0", _("^BGWaiting for %s player(s) to join..."), "")
+    MSG_CENTER_NOTIF(1, CENTER_INSTAGIB_FINDAMMO,           0, 0, "",              CPID_INSTAGIB_FINDAMMO,"1 9", _("^F4^COUNT^BG left to find some ammo!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_INSTAGIB_FINDAMMO_FIRST,     0, 0, "",              CPID_INSTAGIB_FINDAMMO,"1 10", _("^BGGet some ammo or you'll be dead in ^F4^COUNT^BG!"), _("^BGGet some ammo! ^F4^COUNT^BG left!"))
+    MSG_CENTER_NOTIF(1, CENTER_INSTAGIB_LIVES_REMAINING,    0, 1, "f1",            NO_CPID,               "0 0", _("^F2Extra lives remaining: ^K1%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_MOTD,                        1, 0, "s1",            CPID_MOTD,             "-1 0", "^BG%s", "")
+    MSG_CENTER_NOTIF(1, CENTER_NIX_COUNTDOWN,               0, 2, "item_wepname",  CPID_NIX,              "1 f2", _("^F2^COUNT^BG until weapon change...\nNext weapon: ^F1%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_NIX_NEWWEAPON,               0, 1, "item_wepname",  CPID_NIX,              "0 0", _("^F2Active weapon: ^F1%s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_NADE,                        0, 0, "",              NO_CPID,               "0 0", _("^BGPress ^F2DROPWEAPON^BG again to toss the grenade!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ONS_CAPTURE,                 1, 0, "s1",            CPID_ONSLAUGHT,        "0 0", _("^BGYou captured %s^BG control point"), "")
+    MULTITEAM_CENTER(1, CENTER_ONS_CAPTURE_, 4,             1, 0, "s1",            CPID_ONSLAUGHT,        "0 0", _("^TC^TT^BG team captured %s^BG control point"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ONS_CONTROLPOINT_SHIELDED,   0, 0, "",              CPID_ONS_CAPSHIELD,    "0 0", _("^BGThis control point currently cannot be captured"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ONS_GENERATOR_SHIELDED,      0, 0, "",              CPID_ONS_CAPSHIELD,    "0 0", _("^BGThe enemy generator cannot be destroyed yet\n^F2Capture some control points to unshield it"), "")
+    MULTITEAM_CENTER(1, CENTER_ONS_NOTSHIELDED_, 4,         0, 0, "",              CPID_ONSLAUGHT,        "0 0", _("^BGThe ^TCenemy^BG generator is no longer shielded!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ONS_NOTSHIELDED_TEAM,        0, 0, "",              CPID_ONSLAUGHT,        "0 0", _("^K1Your generator is NOT shielded!\n^BGRe-capture control points to shield it!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ONS_TELEPORT,                0, 0, "pass_key",      CPID_ONSLAUGHT,        "0 0", _("^BGPress ^F2DROPFLAG%s^BG to teleport"), "")
+    MSG_CENTER_NOTIF(1, CENTER_ONS_TELEPORT_ANTISPAM,       0, 1, "f1secs",        CPID_ONSLAUGHT,        "0 0", _("^BGTeleporting disabled for %s"), "")
+    MSG_CENTER_NOTIF(1, CENTER_OVERTIME_FRAG,               0, 0, "",              CPID_OVERTIME,         "0 0", _("^F2Now playing ^F4OVERTIME^F2!\nKeep fragging until we have a winner!"), _("^F2Now playing ^F4OVERTIME^F2!\nKeep scoring until we have a winner!"))
+    MSG_CENTER_NOTIF(1, CENTER_OVERTIME_CONTROLPOINT,       0, 0, "",              CPID_OVERTIME,         "5 0", _("^F2Now playing ^F4OVERTIME^F2!\n\nGenerators are now decaying.\nThe more control points your team holds,\nthe faster the enemy generator decays"), "")
+    MSG_CENTER_NOTIF(1, CENTER_OVERTIME_TIME,               0, 1, "f1time",        CPID_OVERTIME,         "0 0", _("^F2Now playing ^F4OVERTIME^F2!\n^BGAdded ^F4%s^BG to the game!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_PORTO_CREATED_IN,            0, 0, "",              NO_CPID,               "0 0", _("^K1In^BG-portal created"), "")
+    MSG_CENTER_NOTIF(1, CENTER_PORTO_CREATED_OUT,           0, 0, "",              NO_CPID,               "0 0", _("^F3Out^BG-portal created"), "")
+    MSG_CENTER_NOTIF(1, CENTER_PORTO_FAILED,                0, 0, "",              NO_CPID,               "0 0", _("^F1Portal creation failed"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_INVISIBILITY,      0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Invisibility has worn off"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SHIELD,            0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Shield has worn off"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SPEED,             0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Speed has worn off"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_STRENGTH,          0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Strength has worn off"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERUP_INVISIBILITY,        0, 0, "",              CPID_POWERUP,          "0 0", _("^F2You are invisible"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERUP_SHIELD,              0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Shield surrounds you"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERUP_SPEED,               0, 0, "",              CPID_POWERUP,          "0 0", _("^F2You are on speed"), "")
+    MSG_CENTER_NOTIF(1, CENTER_POWERUP_STRENGTH,            0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Strength infuses your weapons with devastating power"), "")
+    MSG_CENTER_NOTIF(1, CENTER_RACE_FINISHLAP,              0, 0, "",              CPID_RACE_FINISHLAP,   "0 0", _("^F2The race is over, finish your lap!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_SECONDARY_NODAMAGE,          0, 0, "",              NO_CPID,               "0 0", _("^BGSecondary fire inflicts no damage!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_SEQUENCE_COMPLETED,          0, 0, "",              NO_CPID,               "0 0", _("^BGSequence completed!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_SEQUENCE_COUNTER,            0, 0, "",              NO_CPID,               "0 0", _("^BGThere are more to go..."), "")
+    MSG_CENTER_NOTIF(1, CENTER_SEQUENCE_COUNTER_FEWMORE,    0, 1, "f1",            NO_CPID,               "0 0", _("^BGOnly %s^BG more to go..."), "")
+    MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_BROKEN,          0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Superweapons have broken down"), "")
+    MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_LOST,            0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Superweapons have been lost"), "")
+    MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_PICKUP,          0, 0, "",              CPID_POWERUP,          "0 0", _("^F2You now have a superweapon"), "")
+    MULTITEAM_CENTER(1, CENTER_TEAMCHANGE_, 4,              0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Changing to ^TC^TT^K1 in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_AUTO,             0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Changing team in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE,         0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Spectating in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE,          0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Suicide in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING,           0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout begins in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "")
+    MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT_MINIGAME,       0, 0, "",              NO_CPID,               "0 0",  _("^K1Cannot join given minigame session!"), "" )
+    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER,               0, 0, "pass_key",      CPID_VEHICLES,         "0 0",  _("^BGPress ^F2DROPFLAG%s^BG to enter/exit the vehicle"), "")
+    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_GUNNER,        0, 0, "pass_key",      CPID_VEHICLES,         "0 0",  _("^BGPress ^F2DROPFLAG%s^BG to enter the vehicle gunner"), "")
+    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_STEAL,         0, 0, "pass_key",      CPID_VEHICLES,         "0 0",  _("^BGPress ^F2DROPFLAG%s^BG to steal this vehicle"), "")
+    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL,               0, 0, "",              CPID_VEHICLES_OTHER,   "0 0",  _("^F2The enemy is stealing one of your vehicles!\n^F4Stop them!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL_SELF,          0, 0, "",              CPID_VEHICLES_OTHER,   "4 0",  _("^F2You have stolen the enemy's vehicle, you are now visible on their radar!"), "")
+    MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT,      0, 1, "f1",            NO_CPID,               "0 0",  _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
+
+#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
+    MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+    MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE)
+#define MULTITEAM_MULTI3(default,prefix,anncepre,infopre,centerpre) \
+    MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+    MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
+    MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
+#define MULTITEAM_MULTI4(default,prefix,anncepre,infopre,centerpre) \
+    MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+    MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
+    MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
+    MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK)
+#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+    MULTITEAM_MULTI##teams(default,prefix,anncepre,infopre,centerpre)
+
+// MSG_MULTI_NOTIFICATIONS
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_BUFF,                    NO_MSG,        INFO_DEATH_MURDER_BUFF,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_CHEAT,                   NO_MSG,        INFO_DEATH_MURDER_CHEAT,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_DROWN,                   NO_MSG,        INFO_DEATH_MURDER_DROWN,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_FALL,                    NO_MSG,        INFO_DEATH_MURDER_FALL,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_FIRE,                    NO_MSG,        INFO_DEATH_MURDER_FIRE,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_LAVA,                    NO_MSG,        INFO_DEATH_MURDER_LAVA,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_MONSTER,                 NO_MSG,        INFO_DEATH_MURDER_MONSTER,                 CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE,                    NO_MSG,        INFO_DEATH_MURDER_NADE,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_NAPALM,             NO_MSG,        INFO_DEATH_MURDER_NADE_NAPALM,             NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_ICE,                NO_MSG,        INFO_DEATH_MURDER_NADE_ICE,                NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_ICE_FREEZE,         NO_MSG,        INFO_DEATH_MURDER_NADE_ICE_FREEZE,         NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_HEAL,               NO_MSG,        INFO_DEATH_MURDER_NADE_HEAL,               NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_SHOOTING_STAR,           NO_MSG,        INFO_DEATH_MURDER_SHOOTING_STAR,           NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_SLIME,                   NO_MSG,        INFO_DEATH_MURDER_SLIME,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_SWAMP,                   NO_MSG,        INFO_DEATH_MURDER_SWAMP,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_TELEFRAG,                NO_MSG,        INFO_DEATH_MURDER_TELEFRAG,                NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_TOUCHEXPLODE,            NO_MSG,        INFO_DEATH_MURDER_TOUCHEXPLODE,            NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_BUMB_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_BUMB_DEATH,           NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_BUMB_GUN,             NO_MSG,        INFO_DEATH_MURDER_VH_BUMB_GUN,             NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_CRUSH,                NO_MSG,        INFO_DEATH_MURDER_VH_CRUSH,                NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_RAPT_BOMB,            NO_MSG,        INFO_DEATH_MURDER_VH_RAPT_BOMB,            NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_RAPT_CANNON,          NO_MSG,        INFO_DEATH_MURDER_VH_RAPT_CANNON,          NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_RAPT_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_RAPT_DEATH,           NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_SPID_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_SPID_DEATH,           NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_SPID_MINIGUN,         NO_MSG,        INFO_DEATH_MURDER_VH_SPID_MINIGUN,         NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_SPID_ROCKET,          NO_MSG,        INFO_DEATH_MURDER_VH_SPID_ROCKET,          NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_WAKI_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_WAKI_DEATH,           NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_WAKI_GUN,             NO_MSG,        INFO_DEATH_MURDER_VH_WAKI_GUN,             NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_WAKI_ROCKET,          NO_MSG,        INFO_DEATH_MURDER_VH_WAKI_ROCKET,          NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_MURDER_VOID,                    NO_MSG,        INFO_DEATH_MURDER_VOID,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_AUTOTEAMCHANGE,            NO_MSG,        INFO_DEATH_SELF_AUTOTEAMCHANGE,            CENTER_DEATH_SELF_AUTOTEAMCHANGE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_BETRAYAL,                  NO_MSG,        INFO_DEATH_SELF_BETRAYAL,                  CENTER_DEATH_SELF_BETRAYAL)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_CAMP,                      NO_MSG,        INFO_DEATH_SELF_CAMP,                      CENTER_DEATH_SELF_CAMP)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_CHEAT,                     NO_MSG,        INFO_DEATH_SELF_CHEAT,                     CENTER_DEATH_SELF_CHEAT)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_CUSTOM,                    NO_MSG,        INFO_DEATH_SELF_GENERIC,                   CENTER_DEATH_SELF_CUSTOM)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_DROWN,                     NO_MSG,        INFO_DEATH_SELF_DROWN,                     CENTER_DEATH_SELF_DROWN)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_FALL,                      NO_MSG,        INFO_DEATH_SELF_FALL,                      CENTER_DEATH_SELF_FALL)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_FIRE,                      NO_MSG,        INFO_DEATH_SELF_FIRE,                      CENTER_DEATH_SELF_FIRE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_GENERIC,                   NO_MSG,        INFO_DEATH_SELF_GENERIC,                   CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_LAVA,                      NO_MSG,        INFO_DEATH_SELF_LAVA,                      CENTER_DEATH_SELF_LAVA)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_MAGE,                  NO_MSG,        INFO_DEATH_SELF_MON_MAGE,                  CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SHAMBLER_CLAW,         NO_MSG,        INFO_DEATH_SELF_MON_SHAMBLER_CLAW,         CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SHAMBLER_SMASH,        NO_MSG,        INFO_DEATH_SELF_MON_SHAMBLER_SMASH,        CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SHAMBLER_ZAP,          NO_MSG,        INFO_DEATH_SELF_MON_SHAMBLER_ZAP,          CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SPIDER,                NO_MSG,        INFO_DEATH_SELF_MON_SPIDER,                CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_WYVERN,                NO_MSG,        INFO_DEATH_SELF_MON_WYVERN,                CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_ZOMBIE_JUMP,           NO_MSG,        INFO_DEATH_SELF_MON_ZOMBIE_JUMP,           CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_ZOMBIE_MELEE,          NO_MSG,        INFO_DEATH_SELF_MON_ZOMBIE_MELEE,          CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE,                      NO_MSG,        INFO_DEATH_SELF_NADE,                      CENTER_DEATH_SELF_NADE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_NAPALM,               NO_MSG,        INFO_DEATH_SELF_NADE_NAPALM,               CENTER_DEATH_SELF_NADE_NAPALM)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_ICE,                  NO_MSG,        INFO_DEATH_SELF_NADE_ICE,                  CENTER_DEATH_SELF_NADE_ICE_FREEZE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_ICE_FREEZE,           NO_MSG,        INFO_DEATH_SELF_NADE_ICE_FREEZE,           CENTER_DEATH_SELF_NADE_ICE_FREEZE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_HEAL,                 NO_MSG,        INFO_DEATH_SELF_NADE_HEAL,                 CENTER_DEATH_SELF_NADE_HEAL)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_NOAMMO,                    NO_MSG,        INFO_DEATH_SELF_NOAMMO,                    CENTER_DEATH_SELF_NOAMMO)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_ROT,                       NO_MSG,        INFO_DEATH_SELF_ROT,                       CENTER_DEATH_SELF_ROT)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_SHOOTING_STAR,             NO_MSG,        INFO_DEATH_SELF_SHOOTING_STAR,             CENTER_DEATH_SELF_SHOOTING_STAR)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_SLIME,                     NO_MSG,        INFO_DEATH_SELF_SLIME,                     CENTER_DEATH_SELF_SLIME)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_SUICIDE,                   NO_MSG,        INFO_DEATH_SELF_SUICIDE,                   CENTER_DEATH_SELF_SUICIDE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_SWAMP,                     NO_MSG,        INFO_DEATH_SELF_SWAMP,                     CENTER_DEATH_SELF_SWAMP)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TEAMCHANGE,                NO_MSG,        INFO_DEATH_SELF_TEAMCHANGE,                CENTER_DEATH_SELF_TEAMCHANGE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TOUCHEXPLODE,              NO_MSG,        INFO_DEATH_SELF_TOUCHEXPLODE,              CENTER_DEATH_SELF_TOUCHEXPLODE)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET,                    NO_MSG,        INFO_DEATH_SELF_TURRET,                    CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_EWHEEL,             NO_MSG,        INFO_DEATH_SELF_TURRET_EWHEEL,             CENTER_DEATH_SELF_TURRET_EWHEEL)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_FLAC,               NO_MSG,        INFO_DEATH_SELF_TURRET_FLAC,               CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_HELLION,            NO_MSG,        INFO_DEATH_SELF_TURRET_HELLION,            CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_HK,                 NO_MSG,        INFO_DEATH_SELF_TURRET_HK,                 CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_MACHINEGUN,         NO_MSG,        INFO_DEATH_SELF_TURRET_MACHINEGUN,         CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_MLRS,               NO_MSG,        INFO_DEATH_SELF_TURRET_MLRS,               CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_PHASER,             NO_MSG,        INFO_DEATH_SELF_TURRET_PHASER,             CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_PLASMA,             NO_MSG,        INFO_DEATH_SELF_TURRET_PLASMA,             CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_TESLA,              NO_MSG,        INFO_DEATH_SELF_TURRET_TESLA,              CENTER_DEATH_SELF_TURRET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_WALK_GUN,           NO_MSG,        INFO_DEATH_SELF_TURRET_WALK_GUN,           CENTER_DEATH_SELF_TURRET_WALK)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_WALK_MELEE,         NO_MSG,        INFO_DEATH_SELF_TURRET_WALK_MELEE,         CENTER_DEATH_SELF_TURRET_WALK)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_WALK_ROCKET,        NO_MSG,        INFO_DEATH_SELF_TURRET_WALK_ROCKET,        CENTER_DEATH_SELF_TURRET_WALK)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_BUMB_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_BUMB_DEATH,             CENTER_DEATH_SELF_VH_BUMB_DEATH)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_CRUSH,                  NO_MSG,        INFO_DEATH_SELF_VH_CRUSH,                  CENTER_DEATH_SELF_VH_CRUSH)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_RAPT_BOMB,              NO_MSG,        INFO_DEATH_SELF_VH_RAPT_BOMB,              CENTER_DEATH_SELF_VH_RAPT_BOMB)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_RAPT_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_RAPT_DEATH,             CENTER_DEATH_SELF_VH_RAPT_DEATH)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_SPID_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_SPID_DEATH,             CENTER_DEATH_SELF_VH_SPID_DEATH)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_SPID_ROCKET,            NO_MSG,        INFO_DEATH_SELF_VH_SPID_ROCKET,            CENTER_DEATH_SELF_VH_SPID_ROCKET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_WAKI_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_WAKI_DEATH,             CENTER_DEATH_SELF_VH_WAKI_DEATH)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_WAKI_ROCKET,            NO_MSG,        INFO_DEATH_SELF_VH_WAKI_ROCKET,            CENTER_DEATH_SELF_VH_WAKI_ROCKET)
+    MSG_MULTI_NOTIF(1, DEATH_SELF_VOID,                      NO_MSG,        INFO_DEATH_SELF_VOID,                      CENTER_DEATH_SELF_VOID)
+    MSG_MULTI_NOTIF(1, ITEM_BUFF_DROP,                       NO_MSG,        INFO_ITEM_BUFF_DROP,                       CENTER_ITEM_BUFF_DROP)
+    MSG_MULTI_NOTIF(1, ITEM_BUFF_GOT,                        NO_MSG,        INFO_ITEM_BUFF_GOT,                        CENTER_ITEM_BUFF_GOT)
+    MSG_MULTI_NOTIF(1, ITEM_WEAPON_DONTHAVE,                 NO_MSG,        INFO_ITEM_WEAPON_DONTHAVE,                 CENTER_ITEM_WEAPON_DONTHAVE)
+    MSG_MULTI_NOTIF(1, ITEM_WEAPON_DROP,                     NO_MSG,        INFO_ITEM_WEAPON_DROP,                     CENTER_ITEM_WEAPON_DROP)
+    MSG_MULTI_NOTIF(1, ITEM_WEAPON_GOT,                      NO_MSG,        INFO_ITEM_WEAPON_GOT,                      CENTER_ITEM_WEAPON_GOT)
+    MSG_MULTI_NOTIF(1, ITEM_WEAPON_NOAMMO,                   NO_MSG,        INFO_ITEM_WEAPON_NOAMMO,                   CENTER_ITEM_WEAPON_NOAMMO)
+    MSG_MULTI_NOTIF(1, ITEM_WEAPON_PRIMORSEC,                NO_MSG,        INFO_ITEM_WEAPON_PRIMORSEC,                CENTER_ITEM_WEAPON_PRIMORSEC)
+    MSG_MULTI_NOTIF(1, ITEM_WEAPON_UNAVAILABLE,              NO_MSG,        INFO_ITEM_WEAPON_UNAVAILABLE,              CENTER_ITEM_WEAPON_UNAVAILABLE)
+    MSG_MULTI_NOTIF(1, MULTI_COINTOSS,                       NO_MSG,        INFO_COINTOSS,                             CENTER_COINTOSS)
+    MSG_MULTI_NOTIF(1, MULTI_COUNTDOWN_BEGIN,                ANNCE_BEGIN,   NO_MSG,                                    CENTER_COUNTDOWN_BEGIN)
+    MSG_MULTI_NOTIF(1, MULTI_INSTAGIB_FINDAMMO,              ANNCE_NUM_10,  NO_MSG,                                    CENTER_INSTAGIB_FINDAMMO_FIRST)
+    MSG_MULTI_NOTIF(1, WEAPON_ACCORDEON_MURDER,              NO_MSG,        INFO_WEAPON_ACCORDEON_MURDER,              NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_ACCORDEON_SUICIDE,             NO_MSG,        INFO_WEAPON_ACCORDEON_SUICIDE,             CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_ARC_MURDER,                    NO_MSG,        INFO_WEAPON_ARC_MURDER,                    NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_BLASTER_MURDER,                NO_MSG,        INFO_WEAPON_BLASTER_MURDER,                NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_BLASTER_SUICIDE,               NO_MSG,        INFO_WEAPON_BLASTER_SUICIDE,               CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_CRYLINK_MURDER,                NO_MSG,        INFO_WEAPON_CRYLINK_MURDER,                NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_CRYLINK_SUICIDE,               NO_MSG,        INFO_WEAPON_CRYLINK_SUICIDE,               CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_DEVASTATOR_MURDER_DIRECT,      NO_MSG,        INFO_WEAPON_DEVASTATOR_MURDER_DIRECT,      NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_DEVASTATOR_MURDER_SPLASH,      NO_MSG,        INFO_WEAPON_DEVASTATOR_MURDER_SPLASH,      NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_DEVASTATOR_SUICIDE,            NO_MSG,        INFO_WEAPON_DEVASTATOR_SUICIDE,            CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_MURDER_BOLT,           NO_MSG,        INFO_WEAPON_ELECTRO_MURDER_BOLT,           NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_MURDER_COMBO,          NO_MSG,        INFO_WEAPON_ELECTRO_MURDER_COMBO,          NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_MURDER_ORBS,           NO_MSG,        INFO_WEAPON_ELECTRO_MURDER_ORBS,           NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_SUICIDE_BOLT,          NO_MSG,        INFO_WEAPON_ELECTRO_SUICIDE_BOLT,          CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_SUICIDE_ORBS,          NO_MSG,        INFO_WEAPON_ELECTRO_SUICIDE_ORBS,          CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_MURDER_BLAST,         NO_MSG,        INFO_WEAPON_FIREBALL_MURDER_BLAST,         NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_MURDER_FIREMINE,      NO_MSG,        INFO_WEAPON_FIREBALL_MURDER_FIREMINE,      NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_SUICIDE_BLAST,        NO_MSG,        INFO_WEAPON_FIREBALL_SUICIDE_BLAST,        CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_SUICIDE_FIREMINE,     NO_MSG,        INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,     CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_HAGAR_MURDER_BURST,            NO_MSG,        INFO_WEAPON_HAGAR_MURDER_BURST,            NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_HAGAR_MURDER_SPRAY,            NO_MSG,        INFO_WEAPON_HAGAR_MURDER_SPRAY,            NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_HAGAR_SUICIDE,                 NO_MSG,        INFO_WEAPON_HAGAR_SUICIDE,                 CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_HLAC_MURDER,                   NO_MSG,        INFO_WEAPON_HLAC_MURDER,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_HLAC_SUICIDE,                  NO_MSG,        INFO_WEAPON_HLAC_SUICIDE,                  CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_HMG_MURDER_SNIPE,              NO_MSG,        INFO_WEAPON_HMG_MURDER_SNIPE,              NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_HMG_MURDER_SPRAY,              NO_MSG,        INFO_WEAPON_HMG_MURDER_SPRAY,              NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_HOOK_MURDER,                   NO_MSG,        INFO_WEAPON_HOOK_MURDER,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_KLEINBOTTLE_MURDER,            NO_MSG,        INFO_WEAPON_KLEINBOTTLE_MURDER,            NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_KLEINBOTTLE_SUICIDE,           NO_MSG,        INFO_WEAPON_KLEINBOTTLE_SUICIDE,           CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_MACHINEGUN_MURDER_SNIPE,       NO_MSG,        INFO_WEAPON_MACHINEGUN_MURDER_SNIPE,       NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_MACHINEGUN_MURDER_SPRAY,       NO_MSG,        INFO_WEAPON_MACHINEGUN_MURDER_SPRAY,       NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_LIMIT,               NO_MSG,        INFO_WEAPON_MINELAYER_LIMIT,               CENTER_WEAPON_MINELAYER_LIMIT)
+    MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_MURDER,              NO_MSG,        INFO_WEAPON_MINELAYER_MURDER,              NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_SUICIDE,             NO_MSG,        INFO_WEAPON_MINELAYER_SUICIDE,             CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_BOUNCE,          NO_MSG,        INFO_WEAPON_MORTAR_MURDER_BOUNCE,          NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_EXPLODE,         NO_MSG,        INFO_WEAPON_MORTAR_MURDER_EXPLODE,         NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_SUICIDE_BOUNCE,         NO_MSG,        INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,         CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_SUICIDE_EXPLODE,        NO_MSG,        INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,        CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER,                  NO_MSG,        INFO_WEAPON_RIFLE_MURDER,                  NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER_HAIL,             NO_MSG,        INFO_WEAPON_RIFLE_MURDER_HAIL,             NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER_HAIL_PIERCING,    NO_MSG,        INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,    NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER_PIERCING,         NO_MSG,        INFO_WEAPON_RIFLE_MURDER_PIERCING,         NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RPC_MURDER_DIRECT,             NO_MSG,        INFO_WEAPON_RPC_MURDER_DIRECT,             NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RPC_MURDER_SPLASH,             NO_MSG,        INFO_WEAPON_RPC_MURDER_SPLASH,             NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RPC_SUICIDE_DIRECT,            NO_MSG,        INFO_WEAPON_RPC_SUICIDE_DIRECT,            NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_RPC_SUICIDE_SPLASH,            NO_MSG,        INFO_WEAPON_RPC_SUICIDE_SPLASH,            CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_SEEKER_MURDER_SPRAY,           NO_MSG,        INFO_WEAPON_SEEKER_MURDER_SPRAY,           NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_SEEKER_MURDER_TAG,             NO_MSG,        INFO_WEAPON_SEEKER_MURDER_TAG,             NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_SEEKER_SUICIDE,                NO_MSG,        INFO_WEAPON_SEEKER_SUICIDE,                CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_SHOCKWAVE_MURDER,              NO_MSG,        INFO_WEAPON_SHOCKWAVE_MURDER,              NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_SHOCKWAVE_MURDER_SLAP,         NO_MSG,        INFO_WEAPON_SHOCKWAVE_MURDER_SLAP,         NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_SHOTGUN_MURDER,                NO_MSG,        INFO_WEAPON_SHOTGUN_MURDER,                NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_SHOTGUN_MURDER_SLAP,           NO_MSG,        INFO_WEAPON_SHOTGUN_MURDER_SLAP,           NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_THINKING_WITH_PORTALS,         NO_MSG,        INFO_WEAPON_THINKING_WITH_PORTALS,         CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_TUBA_MURDER,                   NO_MSG,        INFO_WEAPON_TUBA_MURDER,                   NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_TUBA_SUICIDE,                  NO_MSG,        INFO_WEAPON_TUBA_SUICIDE,                  CENTER_DEATH_SELF_GENERIC)
+    MSG_MULTI_NOTIF(1, WEAPON_VAPORIZER_MURDER,              NO_MSG,        INFO_WEAPON_VAPORIZER_MURDER,              NO_MSG)
+    MSG_MULTI_NOTIF(1, WEAPON_VORTEX_MURDER,                 NO_MSG,        INFO_WEAPON_VORTEX_MURDER,                 NO_MSG)
+
+#define MULTITEAM_CHOICE2(default,challow,prefix,chtype,optiona,optionb) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE)
+#define MULTITEAM_CHOICE3(default,challow,prefix,chtype,optiona,optionb) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW)
+#define MULTITEAM_CHOICE4(default,challow,prefix,chtype,optiona,optionb) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
+    MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK)
+#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
+    MULTITEAM_CHOICE##teams(default,challow,prefix,chtype,optiona,optionb)
+
+// MSG_CHOICE_NOTIFICATIONS
+    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 4,    MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_BROKEN_)
+    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 4,      MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_TIME_)
+    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_UNBROKEN_, 4,  MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_UNBROKEN_)
+    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_PICKUP_TEAM_, 4,       MSG_CENTER,  CENTER_CTF_PICKUP_TEAM_,          CENTER_CTF_PICKUP_TEAM_VERBOSE_)
+    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_TEAM_NEUTRAL,   MSG_CENTER,  CENTER_CTF_PICKUP_TEAM_NEUTRAL,   CENTER_CTF_PICKUP_TEAM_VERBOSE_NEUTRAL)
+    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY,          MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY,          CENTER_CTF_PICKUP_ENEMY_VERBOSE)
+    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY_NEUTRAL,  MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY_NEUTRAL,  CENTER_CTF_PICKUP_ENEMY_NEUTRAL_VERBOSE)
+    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY_TEAM,     MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY_TEAM,     CENTER_CTF_PICKUP_ENEMY_TEAM_VERBOSE)
+    MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG,                      MSG_CENTER,  CENTER_DEATH_MURDER_FRAG,         CENTER_DEATH_MURDER_FRAG_VERBOSE)
+    MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED,                   MSG_CENTER,  CENTER_DEATH_MURDER_FRAGGED,      CENTER_DEATH_MURDER_FRAGGED_VERBOSE)
+    MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG,                  MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAG,     CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE)
+    MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAGGED,               MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAGGED,  CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
+    //MSG_CHOICE_NOTIF(2, CHOICE_)
index 03005da3432bfea9fe1778c78f1eb1746b0fcdeb..5145e5340cff8f3a78748bb88c1d107e90ac8e08 100644 (file)
@@ -296,7 +296,7 @@ string Process_Notif_Line(
        // done to both MSG_INFO and MSG_CENTER
        if(substring(input, (strlen(input) - 1), 1) == "\n")
        {
-               printf(
+               LOG_INFOF(
                        strcat(
                                "^1TRAILING NEW LINE AT END OF NOTIFICATION: ",
                                "^7net_type = %s, net_name = %s, string = %s.\n"
@@ -331,7 +331,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_ARGS)
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max args = %d.\n"
@@ -363,7 +363,7 @@ string Process_Notif_Args(
                                        #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                "^7net_type = %s, net_name = %s, args arg = '%s'.\n"
@@ -382,7 +382,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_HUDARGS)
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max hudargs = %d.\n"
@@ -414,7 +414,7 @@ string Process_Notif_Args(
                                        #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                "^7net_type = %s, net_name = %s, hudargs arg = '%s'.\n"
@@ -433,7 +433,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_DURCNT)
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max durcnt = %d.\n"
@@ -468,7 +468,7 @@ string Process_Notif_Args(
                                                if(ftos(stof(selected)) != "") { ++sel_num; }
                                                else
                                                {
-                                                       printf(
+                                                       LOG_INFOF(
                                                                strcat(
                                                                        "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                        "^7net_type = %s, net_name = %s, durcnt arg = '%s'.\n"
@@ -606,7 +606,7 @@ void Create_Notification_Entity(
                                }
                                else
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION WITH NO SOUND: ",
                                                        "^7net_type = %s, net_name = %s.\n"
@@ -653,7 +653,7 @@ void Create_Notification_Entity(
                                        }
                                        else if((hudargs == "") && (durcnt ==""))
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: ",
                                                                "^7net_type = %s, net_name = %s, strnum = %d, flnum = %d\n"
@@ -687,7 +687,7 @@ void Create_Notification_Entity(
                                        if(icon != "") { notif.nent_icon = strzone(icon); }
                                        else
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION HAS HUDARGS BUT NO ICON: ",
                                                                "^7net_type = %s, net_name = %s.\n"
@@ -700,7 +700,7 @@ void Create_Notification_Entity(
                                }
                                else if(icon != "")
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS ICON BUT NO HUDARGS: ",
                                                        "^7net_type = %s, net_name = %s.\n"
@@ -719,7 +719,7 @@ void Create_Notification_Entity(
                                        if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                        else
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION HAS DURCNT BUT NO CPID: ",
                                                                "^7net_type = %s, net_name = %s.\n"
@@ -761,7 +761,7 @@ void Create_Notification_Entity(
                                // Check to make sure a string was chosen
                                if(notif.nent_string == "")
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1EMPTY NOTIFICATION: ",
                                                        "^7net_type = %s, net_name = %s.\n"
@@ -781,7 +781,7 @@ void Create_Notification_Entity(
                        // Set MSG_MULTI string/float counts
                        if((anncename == NO_MSG) && (infoname == NO_MSG) && (centername == NO_MSG))
                        {
-                               printf(
+                               LOG_INFOF(
                                        strcat(
                                                "^1NOTIFICATION WITH NO SUBCALLS: ",
                                                "^7net_type = %s, net_name = %s.\n"
@@ -825,7 +825,7 @@ void Create_Notification_Entity(
                {
                        if((chtype == NO_MSG) || (optiona == NO_MSG) || (optionb == NO_MSG))
                        {
-                               printf(
+                               LOG_INFOF(
                                        strcat(
                                                "^1NOTIFICATION IS MISSING CHOICE PARAMS: ",
                                                "^7net_type = %s, net_name = %s.\n"
@@ -872,7 +872,7 @@ void Create_Notification_Entity(
 
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION WITH IMPROPER TYPE: ",
                                                                "^7net_type = %d, net_name = %s.\n"
@@ -915,7 +915,7 @@ void Create_Notification_Entity(
 
                default:
                {
-                       printf(
+                       LOG_INFOF(
                                strcat(
                                        "^1NOTIFICATION WITH IMPROPER TYPE: ",
                                        "^7net_type = %d, net_name = %s.\n"
@@ -962,7 +962,7 @@ void Dump_Notifications(float fh, float alsoprint)
 {
        #define NOTIF_WRITE(a) { \
                fputs(fh, a); \
-               if(alsoprint) { print(a); } }
+               if(alsoprint) { LOG_INFO(a); } }
        #define NOTIF_WRITE_ENTITY(description) { \
                notif_msg = \
                        sprintf( \
@@ -1193,8 +1193,8 @@ void Debug_Notification(string input)
 {
        switch(autocvar_notification_debug)
        {
-               case 1: { dprint(input); break; }
-               case 2: { print(input); break; }
+               case 1: { LOG_TRACE(input); break; }
+               case 2: { LOG_INFO(input); break; }
        }
 }
 #endif
@@ -1550,7 +1550,7 @@ void Local_Notification(int net_type, int net_name, ...count)
 
                case MSG_INFO:
                {
-                       print(
+                       LOG_INFO(
                                Local_Notification_sprintf(
                                        notif.nent_string,
                                        notif.nent_args,
index cde5576897f502d0b890d6085a51cf035dc70f9e..2fbc9cdf0e67154affb28ff7f62bdb3be2600fe0 100644 (file)
@@ -128,857 +128,6 @@ void Send_Notification_WOCOVA(
     float f1, float f2, float f3, float f4);
 #endif
 
-
-// ====================================
-//  Notifications List and Information
-// ====================================
-/*
- List of all notifications (including identifiers and display information)
- Possible Tokens:
-    default, name, strnum, flnum,
-    channel, sound, volume, position,
-    args, hudargs, icon, cpid, durcnt, normal, gentle,
-    anncename, infoname, centername,
-    challow, chtype, optiona, optionb
- Format Specifications:
-    MSG_ANNCE:
-      default: FLOAT: Default setting for whether the notification is enabled or not
-         ^-> 0 = disabled, 1 = enabled if gentle is disabled, 2 = always enabled
-      name: VAR: Name of notification
-      channel: FLOAT: Sound channel to broadcast on to
-      sound: STRING: Filename for the announcement sound
-      volume: FLOAT: Volume setting for the announcement sound
-      position: FLOAT: Attenuation/positioning value
-    MSG_INFO:
-      default: FLOAT: Default setting for whether the notification is enabled or not
-         ^-> 0 = disabled, 1 = enabled, 2 = also print to chat box
-      name: VAR: Name of notification
-      strnum: FLOAT: Number of STRING arguments (so that networking knows how many to send/receive)
-      flnum: FLOAT: Number of FLOAT arguments (so that networking knows how many to send/receive)
-      args: STRING: Arguments for Local_Notification_sprintf()
-      hudargs: STRING: Arguments for Local_Notification_HUD_Notify_Push()
-      icon: STRING: icon string name for the hud notify panel, "" if no icon is used
-      normal: STRING: Normal message (string for sprintf when gentle messages are NOT enabled)
-      gentle: STRING: Gentle message (string for sprintf when gentle messages ARE enabled)
-    MSG_CENTER:
-      default: FLOAT: Default setting for whether the notification is enabled or not
-         ^-> 0 = disabled, 1 = enabled
-      name: VAR: Name of notification
-      strnum: FLOAT: Number of STRING arguments (so that networking knows how many to send/receive)
-      flnum: FLOAT: Number of FLOAT arguments (so that networking knows how many to send/receive)
-      args: STRING: Arguments for Local_Notification_sprintf()
-      cpid: FLOAT: centerprint ID number (CPID_*), NO_CPID if no CPID is needed
-      durcnt: XPD(FLOAT, FLOAT): Duration/Countdown: extra arguments for centerprint messages
-      normal: STRING: Normal message (string for sprintf when gentle messages are NOT enabled)
-      gentle: STRING: Gentle message (string for sprintf when gentle messages ARE enabled)
-    MSG_MULTI:
-      default: FLOAT: Default setting for whether the notification is enabled or not
-         ^-> 0 = disabled, 1 = enabled
-      name: VAR: Name of chaining notification
-      anncename: VAR: Name of announcer notification for reference
-      infoname: VAR: Name of info notification for reference
-      centername: VAR: Name of centerprint notification for reference
-    MSG_CHOICE:
-      default: FLOAT: Default setting for whether the notification is enabled or not
-         ^-> 0 = disabled, 1 = select option A, 2 = selection option B
-      challow: FLOAT: Default setting for server allowing choices other than A
-         ^-> 0 = no choice, 1 = allowed in warmup, 2 = always allowed
-      name: VAR: Name of choice notification
-      chtype: VAR: Notification message type for options
-      optiona: VAR: Name of choice "A" notification for reference
-      optionb: VAR: Name of choice "B" notification for reference
-
- Messages with ^F1, ^BG, ^TC, etc etc in them will replace those strings
- with colors according to the cvars the user has chosen. This allows for
- users to create unique color profiles for their HUD, giving more customization
- options to HUD designers and end users who want such a feature.
-
- Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
- string TCR(...) to better understand how these code replacements work.
-
- Additionally, you can find all the definitions and explanations for
- the argument values and what they return down below in this file.
-
- Guidlines for notification declaration (please try and follow these):
-  Specific rules:
-    -ALWAYS start the string with a color, preferably background.
-    -ALWAYS reset a color after a name (this way they don't set it for the whole string).
-    -NEVER re-declare an event twice.
-    -NEVER add or remove tokens from the format, it SHOULD already work.
-    -MSG_INFO hudargs must always be ATTACKER -> VICTIM
-    -MSG_INFO and MSG_CENTER should NOT end with a new line
-
- General rules:
-    -Be clean and simple with your notification naming,
-     nothing too long for the name field... Abbreviations are your friend. :D
-    -Keep the spacing as clean as possible... if the arguments are abnormally long,
-      it's okay to go out of line a bit... but try and keep it clean still.
-    - Use ONLY spaces for spacing in the notification list, tabs are too inconsistent
-      with keeping alignment on different mediums.
-    -Sort the notifications in the most appropriate order for their tasks.
-    -ARIRE unir frk jvgu lbhe bja zbgure. (gvc sbe zvxrrhfn) -- Don't pay attention to this ^_^
-
- Final note: DO NOT PROVIDE MORE ARGUMENTS THAN NECESSARY FOR THE NOTIFICATION YOU'RE CALLING!
-      The system is designed to save as much networking bandwidth as possible,
-      so please dynamically control your argument sending to fit *exactly* what is required.
-      If you send a notification with mismatching arguments, Send_Notification() will error.
-*/
-
-#define MULTITEAM_ANNCE2(default,prefix,channel,sound,volume,position) \
-    MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
-    MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position)
-#define MULTITEAM_ANNCE3(default,prefix,channel,sound,volume,position) \
-    MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
-    MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
-    MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position)
-#define MULTITEAM_ANNCE4(default,prefix,channel,sound,volume,position) \
-    MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
-    MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
-    MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
-    MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
-#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
-    MULTITEAM_ANNCE##teams(default,prefix,channel,sound,volume,position)
-
-#define MSG_ANNCE_NOTIFICATIONS \
-    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT,       CH_INFO, "airshot",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AMAZING,       CH_INFO, "amazing",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AWESOME,       CH_INFO, "awesome",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_BOTLIKE,       CH_INFO, "botlike",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_ACHIEVEMENT_ELECTROBITCH,  CH_INFO, "electrobitch",      VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_IMPRESSIVE,    CH_INFO, "impressive",        VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_YODA,          CH_INFO, "yoda",              VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_BEGIN,                     CH_INFO, "begin",             VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_03,             CH_INFO, "03kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_05,             CH_INFO, "05kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_10,             CH_INFO, "10kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_15,             CH_INFO, "15kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_20,             CH_INFO, "20kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_25,             CH_INFO, "25kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_30,             CH_INFO, "30kills",           VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_INSTAGIB_LASTSECOND,       CH_INFO, "lastsecond",        VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_INSTAGIB_NARROWLY,         CH_INFO, "narrowly",          VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_INSTAGIB_TERMINATED,       CH_INFO, "terminated",        VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_MULTIFRAG,                 CH_INFO, "multifrag",         VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_1,                     CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_2,                     CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_3,                     CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_4,                     CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_5,                     CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_6,                     CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_7,                     CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_8,                     CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_9,                     CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_10,                    CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_1,           CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_2,           CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_3,           CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_4,           CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_5,           CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_6,           CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_7,           CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_8,           CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_9,           CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_10,          CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_1,                CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_2,                CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_3,                CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_4,                CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_5,                CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_6,                CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_7,                CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_8,                CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_9,                CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_10,               CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_1,                CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_2,                CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_3,                CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_4,                CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_5,                CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_6,                CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_7,                CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_8,                CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_9,                CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_10,               CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_1,             CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_2,             CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_3,             CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_4,             CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_5,             CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_6,             CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_7,             CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_8,             CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_9,             CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_10,            CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_1,          CH_INFO, "1",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_2,          CH_INFO, "2",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_3,          CH_INFO, "3",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_4,          CH_INFO, "4",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_5,          CH_INFO, "5",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_6,          CH_INFO, "6",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_7,          CH_INFO, "7",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_8,          CH_INFO, "8",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_9,          CH_INFO, "9",                 VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_10,         CH_INFO, "10",                VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_PREPARE,                   CH_INFO, "prepareforbattle",  VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_1,          CH_INFO, "1fragleft",         VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_2,          CH_INFO, "2fragsleft",        VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_3,          CH_INFO, "3fragsleft",        VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_1,           CH_INFO, "1minuteremains",    VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_5,           CH_INFO, "5minutesremain",    VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_TIMEOUT,                   CH_INFO, "timeoutcalled",     VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_VOTE_ACCEPT,               CH_INFO, "voteaccept",        VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_VOTE_CALL,                 CH_INFO, "votecall",          VOL_BASEVOICE, ATTEN_NONE) \
-    MSG_ANNCE_NOTIF(2, ANNCE_VOTE_FAIL,                 CH_INFO, "votefail",          VOL_BASEVOICE, ATTEN_NONE)
-
-#define MULTITEAM_INFO2(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
-    MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
-    MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
-#define MULTITEAM_INFO3(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
-    MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
-    MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-    MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
-#define MULTITEAM_INFO4(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
-    MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
-    MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-    MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
-    MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
-#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
-    MULTITEAM_INFO##teams(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle)
-
-#define MSG_INFO_NOTIFICATIONS \
-    MSG_INFO_NOTIF(1, INFO_CONNECTING,                     1, 0, "s1", "",                          "",                     _("^BG%s^BG is connecting..."), "") \
-    MSG_INFO_NOTIF(2, INFO_CHAT_NOSPECTATORS,              0, 0, "", "",                            "",                     _("^F4NOTE: ^BGSpectator chat is not sent to players during the match"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 4,                1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 4,         2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_CAPTURE_NEUTRAL,            1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the flag"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_TIME_, 4,           1, 1, "s1 f1p2dec", "s1",                "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_CAPTURE_UNBROKEN_, 4,       2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_ABORTRUN_, 4,    0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag was returned to base by its owner"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_ABORTRUN_NEUTRAL,0, 0, "", "",                            "",                     _("^BGThe flag was returned by its owner"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DAMAGED_, 4,     0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag was destroyed and returned to base"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_DAMAGED_NEUTRAL, 0, 0, "", "",                            "",                     _("^BGThe flag was destroyed and returned to base"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DROPPED_, 4,     0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_DROPPED_NEUTRAL, 0, 0, "", "",                            "",                     _("^BGThe flag was dropped in the base and returned itself"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_NEEDKILL_, 4,    0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag fell somewhere it couldn't be reached and returned to base"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_NEEDKILL_NEUTRAL,0, 0, "", "",                            "",                     _("^BGThe flag fell somewhere it couldn't be reached and returned to base"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_SPEEDRUN_, 4,    0, 1, "f1p2dec", "",                     "",                     _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_SPEEDRUN_NEUTRAL,0, 1, "f1p2dec", "",                     "",                     _("^BGThe flag became impatient after ^F1%.2f^BG seconds and returned itself"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_TIMEOUT_, 4,     0, 0, "", "",                            "",                     _("^BGThe ^TC^TT^BG flag has returned to the base"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_TIMEOUT_NEUTRAL, 0, 0, "", "",                            "",                     _("^BGThe flag has returned to the base"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_LOST_, 4,                   1, 0, "s1", "s1",                        "notify_%s_lost",       _("^BG%s^BG lost the ^TC^TT^BG flag"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_LOST_NEUTRAL,               1, 0, "s1", "s1",                        "notify_%s_lost",       _("^BG%s^BG lost the flag"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_PICKUP_, 4,                 1, 0, "s1", "s1",                        "notify_%s_taken",      _("^BG%s^BG got the ^TC^TT^BG flag"), "") \
-    MSG_INFO_NOTIF(1, INFO_CTF_PICKUP_NEUTRAL,             1, 0, "s1", "s1",                        "notify_%s_taken",      _("^BG%s^BG got the flag"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_RETURN_, 4,                 1, 0, "s1", "s1",                        "notify_%s_returned",   _("^BG%s^BG returned the ^TC^TT^BG flag"), "") \
-    MULTITEAM_INFO(1, INFO_CTF_RETURN_MONSTER_, 4,         1, 0, "s1", "s1",                        "notify_%s_returned",   _("^BG%s^BG returned the ^TC^TT^BG flag"), "") \
-    MSG_INFO_NOTIF(2, INFO_COINTOSS,                       1, 0, "s1", "",                          "",                     _("^F2Throwing coin... Result: %s^F2!"), "") \
-    MSG_INFO_NOTIF(1, INFO_JETPACK_NOFUEL,                 0, 0, "", "",                            "",                     _("^BGYou don't have any fuel for the ^F1Jetpack"), "") \
-    MSG_INFO_NOTIF(2, INFO_SUPERSPEC_MISSING_UID,          0, 0, "", "",                            "",                     _("^F2You lack a UID, superspec options will not be saved/restored"), "") \
-    MSG_INFO_NOTIF(1, INFO_CA_JOIN_LATE,                   0, 0, "", "",                            "",                     _("^F1Round already started, you will join the game in the next round"), "") \
-    MSG_INFO_NOTIF(1, INFO_CA_LEAVE,                       0, 0, "", "",                            "",                     _("^F2You will spectate in the next round"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_BUFF,              3, 3, "spree_inf s1 s2 f3buffname s3loc spree_end", "s2 s1",  "notify_death", _("^BG%s%s^K1 was killed by ^BG%s^K1's ^BG%s^K1 buff ^K1%s%s"), _("^BG%s%s^K1 was scored against by ^BG%s^K1's ^BG%s^K1 buff ^K1%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_CHEAT,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was unfairly eliminated by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_DROWN,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_water",         _("^BG%s%s^K1 was drowned by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FALL,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_fall",          _("^BG%s%s^K1 was grounded by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FIRE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was burnt up into a crisp by ^BG%s^K1%s%s"), _("^BG%s%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_LAVA,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_lava",          _("^BG%s%s^K1 was cooked by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_MONSTER,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was pushed infront of a monster by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_normal",          _("^BG%s%s^K1 was blown up by ^BG%s^K1's Nade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_NAPALM,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_napalm",          _("^BG%s%s^K1 was burned to death by ^BG%s^K1's Napalm Nade%s%s"), _("^BG%s%s^K1 got too close to a napalm explosion%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_ice",             _("^BG%s%s^K1 was blown up by ^BG%s^K1's Ice Nade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_ICE_FREEZE,   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_ice",             _("^BG%s%s^K1 was frozen to death by ^BG%s^K1's Ice Nade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE_HEAL,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "nade_heal",            _("^BG%s%s^K1 has not been healed by ^BG%s^K1's Healing Nade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SHOOTING_STAR,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_shootingstar",  _("^BG%s%s^K1 was shot into space by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SLIME,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_slime",         _("^BG%s%s^K1 was slimed by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SWAMP,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_slime",         _("^BG%s%s^K1 was preserved by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_TELEFRAG,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_telefrag",      _("^BG%s%s^K1 was telefragged by ^BG%s^K1%s%s"), _("^BG%s%s^K1 tried to occupy ^BG%s^K1's teleport destination space%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_TOUCHEXPLODE,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 died in an accident with ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_BUMB_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Bumblebee exploded%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_BUMB_GUN,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 saw the pretty lights of ^BG%s^K1's Bumblebee gun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_CRUSH,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was crushed by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_BOMB,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was cluster bombed by ^BG%s^K1's Raptor%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_CANNON,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 couldn't resist ^BG%s^K1's purple blobs%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Raptor exploded%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Spiderbot exploded%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_MINIGUN,   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got shredded by ^BG%s^K1's Spiderbot%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_ROCKET,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was blasted to bits by ^BG%s^K1's Spiderbot%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_DEATH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Racer exploded%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_GUN,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 was bolted down by ^BG%s^K1's Racer%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_ROCKET,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_death",         _("^BG%s%s^K1 couldn't find shelter from ^BG%s^K1's Racer%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VOID,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "notify_void",          _("^BG%s%s^K1 was thrown into a world of hurt by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_AUTOTEAMCHANGE,      2, 1, "s1 s2loc death_team", "",         "",                     _("^BG%s^K1 was moved into the %s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_BETRAYAL,            2, 1, "s1 s2loc spree_lost", "s1",       "notify_teamkill_red",  _("^BG%s^K1 became enemies with the Lord of Teamplay%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CAMP,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_camping",       _("^BG%s^K1 thought they found a nice camping ground%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CHEAT,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_selfkill",      _("^BG%s^K1 unfairly eliminated themself%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CUSTOM,              3, 1, "s1 s2 s3loc spree_lost", "s1",    "notify_void",          "^BG%s^K1 %s^K1%s%s", "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_DROWN,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_water",         _("^BG%s^K1 couldn't catch their breath%s%s"), _("^BG%s^K1 was in the water for too long%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FALL,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_fall",          _("^BG%s^K1 hit the ground with a crunch%s%s"), _("^BG%s^K1 hit the ground with a bit too much force%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FIRE,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 became a bit too crispy%s%s"), _("^BG%s^K1 felt a little hot%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC,             2, 1, "s1 s2loc spree_lost", "s1",       "notify_selfkill",      _("^BG%s^K1 died%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_LAVA,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_lava",          _("^BG%s^K1 turned into hot slag%s%s"), _("^BG%s^K1 found a hot place%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_MAGE,            2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was exploded by a Mage%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SHAMBLER_CLAW,   2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1's innards became outwards by a Shambler%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SHAMBLER_SMASH,  2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was smashed by a Shambler%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SHAMBLER_ZAP,    2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was zapped to death by a Shambler%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_SPIDER,          2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was bitten by a Spider%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_WYVERN,          2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was fireballed by a Wyvern%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ZOMBIE_JUMP,     2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 joins the Zombies%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ZOMBIE_MELEE,    2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was given kung fu lessons by a Zombie%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE,                2, 1, "s1 s2loc spree_lost", "s1",       "nade_normal",          _("^BG%s^K1 mastered the art of self-nading%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_NAPALM,         2, 1, "s1 s2loc spree_lost", "s1",       "nade_napalm",          _("^BG%s^K1 was burned to death by their own Napalm Nade%s%s"), _("^BG%s^K1 decided to take a look at the results of their napalm explosion%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE,            2, 1, "s1 s2loc spree_lost", "s1",       "nade_ice",             _("^BG%s^K1 mastered the art of self-nading%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_ICE_FREEZE,     2, 1, "s1 s2loc spree_lost", "s1",       "nade_ice",             _("^BG%s^K1 was frozen to death by their own Ice Nade%s%s"), _("^BG%s^K1 felt a little chilly%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE_HEAL,           2, 1, "s1 s2loc spree_lost", "s1",       "nade_heal",            _("^BG%s^K1's Healing Nade didn't quite heal them%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NOAMMO,              2, 1, "s1 s2loc spree_lost", "s1",       "notify_outofammo",     _("^BG%s^K1 died%s%s. What's the point of living without ammo?"), _("^BG%s^K1 ran out of ammo%s%s")) \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_ROT,                 2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 rotted away%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SHOOTING_STAR,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_shootingstar",  _("^BG%s^K1 became a shooting star%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SLIME,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_slime",         _("^BG%s^K1 was slimed%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",       "notify_selfkill",      _("^BG%s^K1 couldn't take it anymore%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SWAMP,               2, 1, "s1 s2loc spree_lost", "s1",       "notify_slime",         _("^BG%s^K1 is now preserved for centuries to come%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TEAMCHANGE,          2, 1, "s1 s2loc death_team", "",         "",                     _("^BG%s^K1 switched to the %s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TOUCHEXPLODE,        2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 died in an accident%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET,              2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 ran into a turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_EWHEEL,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted away by an eWheel turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_FLAC,         2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught up in the FLAC turret fire%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_HELLION,      2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted away by a Hellion turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_HK,           2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 could not hide from the Hunter turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_MACHINEGUN,   2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was riddled full of holes by a Machinegun turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_MLRS,         2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got turned into smoldering gibs by an MLRS turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_PHASER,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was phased out by a turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_PLASMA,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got served some superheated plasma from a turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_TESLA,        2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was electrocuted by a Tesla turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_GUN,     2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got served a lead enrichment by a Walker turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_MELEE,   2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was impaled by a Walker turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_ROCKET,  2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted away by a Walker turret%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_BUMB_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Bumblebee explosion%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_CRUSH,            2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was crushed by a vehicle%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_RAPT_BOMB,        2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was caught in a Raptor cluster bomb%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_RAPT_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Raptor explosion%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_SPID_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Spiderbot explosion%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_SPID_ROCKET,      2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 was blasted to bits by a Spiderbot rocket%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_WAKI_DEATH,       2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 got caught in the blast of a Racer explosion%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_WAKI_ROCKET,      2, 1, "s1 s2loc spree_lost", "s1",       "notify_death",         _("^BG%s^K1 couldn't find shelter from a Racer rocket%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VOID,                2, 1, "s1 s2loc spree_lost", "s1",       "notify_void",          _("^BG%s^K1 was in the wrong place%s%s"), "") \
-    MULTITEAM_INFO(1, INFO_DEATH_TEAMKILL_, 4,             3, 1, "s1 s2 s3loc spree_end", "s2 s1",  "notify_teamkill_%s",   _("^BG%s^K1 was betrayed by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_DOMINATION_CAPTURE_TIME,        2, 2, "s1 s2 f1 f2", "",                 "",                     _("^BG%s^BG%s^BG (%s points every %s seconds)"), "") \
-    MSG_INFO_NOTIF(1, INFO_FREEZETAG_FREEZE,               2, 0, "s1 s2", "",                       "",                     _("^BG%s^K1 was frozen by ^BG%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED,              2, 0, "s1 s2", "",                       "",                     _("^BG%s^K3 was revived by ^BG%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED_FALL,         1, 0, "s1", "",                          "",                     _("^BG%s^K3 was revived by falling"), "") \
-    MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED_NADE,         1, 0, "s1", "",                          "",                     _("^BG%s^K3 was revived by their Nade explosion"), "") \
-    MSG_INFO_NOTIF(1, INFO_FREEZETAG_AUTO_REVIVED,         1, 1, "s1 f1", "",                       "",                     _("^BG%s^K3 was automatically revived after %s second(s)"), "") \
-    MULTITEAM_INFO(1, INFO_ROUND_TEAM_WIN_, 4,             0, 0, "", "",                            "",                     _("^TC^TT^BG team wins the round"), "") \
-    MSG_INFO_NOTIF(1, INFO_ROUND_PLAYER_WIN,               1, 0, "s1", "",                          "",                     _("^BG%s^BG wins the round"), "") \
-    MSG_INFO_NOTIF(1, INFO_ROUND_TIED,                     0, 0, "", "",                            "",                     _("^BGRound tied"), "") \
-    MSG_INFO_NOTIF(1, INFO_ROUND_OVER,                     0, 0, "", "",                            "",                     _("^BGRound over, there's no winner"), "") \
-    MSG_INFO_NOTIF(1, INFO_FREEZETAG_SELF,                 1, 0, "s1", "",                          "",                     _("^BG%s^K1 froze themself"), "") \
-    MSG_INFO_NOTIF(1, INFO_GODMODE_OFF,                    0, 1, "f1", "",                          "",                     _("^BGGodmode saved you %s units of damage, cheater!"), "") \
-    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF,                      1, 1, "s1 item_buffname", "",            "",                     _("^BG%s^BG got the %s^BG buff!"), "") \
-    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF_LOST,                 1, 1, "s1 item_buffname", "",            "",                     _("^BG%s^BG lost the %s^BG buff!"), "") \
-    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF_DROP,                 0, 1, "item_buffname", "",               "",                     _("^BGYou dropped the %s^BG buff!"), "") \
-    MSG_INFO_NOTIF(1, INFO_ITEM_BUFF_GOT,                  0, 1, "item_buffname", "",               "",                     _("^BGYou got the %s^BG buff!"), "") \
-    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_DONTHAVE,           0, 1, "item_wepname", "",                      "",               _("^BGYou do not have the ^F1%s"), "") \
-    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_DROP,               1, 1, "item_wepname item_wepammo", "",         "",               _("^BGYou dropped the ^F1%s^BG%s"), "") \
-    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_GOT,                0, 1, "item_wepname", "",                      "",               _("^BGYou got the ^F1%s"), "") \
-    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_NOAMMO,             0, 1, "item_wepname", "",                      "",               _("^BGYou don't have enough ammo for the ^F1%s"), "") \
-    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_PRIMORSEC,          0, 3, "item_wepname f2primsec f3primsec", "",  "",               _("^F1%s %s^BG is unable to fire, but its ^F1%s^BG can"), "") \
-    MSG_INFO_NOTIF(0, INFO_ITEM_WEAPON_UNAVAILABLE,        0, 1, "item_wepname", "",                      "",               _("^F1%s^BG is ^F4not available^BG on this map"), "") \
-    MSG_INFO_NOTIF(2, INFO_JOIN_CONNECT,                   1, 0, "s1", "",                          "",                     _("^BG%s^F3 connected%s"), "") \
-    MULTITEAM_INFO(2, INFO_JOIN_CONNECT_TEAM_, 4,          1, 0, "s1", "",                          "",                     _("^BG%s^F3 connected and joined the ^TC^TT team"), "") \
-    MSG_INFO_NOTIF(1, INFO_JOIN_PLAY,                      1, 0, "s1", "",                          "",                     _("^BG%s^F3 is now playing"), "") \
-    MSG_INFO_NOTIF(1, INFO_KEEPAWAY_DROPPED,               1, 0, "s1", "s1",                        "notify_balldropped",   _("^BG%s^BG has dropped the ball!"), "") \
-    MSG_INFO_NOTIF(1, INFO_KEEPAWAY_PICKUP,                1, 0, "s1", "s1",                        "notify_ballpickedup",  _("^BG%s^BG has picked up the ball!"), "") \
-    MULTITEAM_INFO(1, INFO_KEYHUNT_CAPTURE_, 4,            1, 0, "s1", "",                          "",                     _("^BG%s^BG captured the keys for the ^TC^TT team"), "") \
-    MULTITEAM_INFO(1, INFO_KEYHUNT_DROP_, 4,               1, 0, "s1", "",                          "",                     _("^BG%s^BG dropped the ^TC^TT Key"), "") \
-    MULTITEAM_INFO(1, INFO_KEYHUNT_LOST_, 4,               1, 0, "s1", "",                          "",                     _("^BG%s^BG lost the ^TC^TT Key"), "") \
-    MULTITEAM_INFO(1, INFO_KEYHUNT_PICKUP_, 4,             1, 0, "s1", "",                          "",                     _("^BG%s^BG picked up the ^TC^TT Key"), "") \
-    MSG_INFO_NOTIF(1, INFO_LMS_FORFEIT,                    1, 0, "s1", "",                          "",                     _("^BG%s^F3 forfeited"), "") \
-    MSG_INFO_NOTIF(1, INFO_LMS_NOLIVES,                    1, 0, "s1", "",                          "",                     _("^BG%s^F3 has no more lives left"), "") \
-    MSG_INFO_NOTIF(1, INFO_MONSTERS_DISABLED,              0, 0, "", "",                            "",                     _("^BGMonsters are currently disabled"), "") \
-    MSG_INFO_NOTIF(1, INFO_ONSLAUGHT_CAPTURE,              2, 0, "s1 s2", "",                       "",                     _("^BG%s^BG captured %s^BG control point"), "") \
-    MULTITEAM_INFO(1, INFO_ONSLAUGHT_CPDESTROYED_, 4,      2, 0, "s1 s2", "",                       "",                     _("^TC^TT^BG team %s^BG control point has been destroyed by %s"), "") \
-    MULTITEAM_INFO(1, INFO_ONSLAUGHT_GENDESTROYED_, 4,     0, 0, "", "",                            "",                     _("^TC^TT^BG generator has been destroyed"), "") \
-    MULTITEAM_INFO(1, INFO_ONSLAUGHT_GENDESTROYED_OVERTIME_, 4,  0, 0, "", "",                      "",                     _("^TC^TT^BG generator spontaneously combusted due to overtime!"), "") \
-    MSG_INFO_NOTIF(1, INFO_POWERUP_INVISIBILITY,           1, 0, "s1", "s1",                        "strength",             _("^BG%s^K1 picked up Invisibility"), "") \
-    MSG_INFO_NOTIF(1, INFO_POWERUP_SHIELD,                 1, 0, "s1", "s1",                        "shield",               _("^BG%s^K1 picked up Shield"), "") \
-    MSG_INFO_NOTIF(1, INFO_POWERUP_SPEED,                  1, 0, "s1", "s1",                        "shield",               _("^BG%s^K1 picked up Speed"), "") \
-    MSG_INFO_NOTIF(1, INFO_POWERUP_STRENGTH,               1, 0, "s1", "s1",                        "strength",             _("^BG%s^K1 picked up Strength"), "") \
-    MSG_INFO_NOTIF(2, INFO_QUIT_DISCONNECT,                1, 0, "s1", "",                          "",                     _("^BG%s^F3 disconnected"), "") \
-    MSG_INFO_NOTIF(2, INFO_QUIT_KICK_IDLING,               1, 0, "s1", "",                          "",                     _("^BG%s^F3 was kicked for idling"), "") \
-    MSG_INFO_NOTIF(1, INFO_QUIT_KICK_SPECTATING,           0, 0, "", "",                            "",                     _("^F2You were kicked from the server because you are a spectator and spectators aren't allowed at the moment."), "") \
-    MSG_INFO_NOTIF(1, INFO_QUIT_SPECTATE,                  1, 0, "s1", "",                          "",                     _("^BG%s^F3 is now spectating"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_ABANDONED,                 1, 0, "s1", "",                                                                    "",                      _("^BG%s^BG has abandoned the race"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_FAIL_RANKED,               1, 3, "s1 race_col f1ord race_col f3race_time race_diff", "s1 f3race_time",        "race_newfail",          _("^BG%s^BG couldn't break their %s%s^BG place record of %s%s %s"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_FAIL_UNRANKED,             1, 3, "s1 race_col f1ord race_col f3race_time race_diff", "s1 f3race_time",        "race_newfail",          _("^BG%s^BG couldn't break the %s%s^BG place record of %s%s %s"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_FINISHED,                  1, 0, "s1", "",                                                                    "",                      _("^BG%s^BG has finished the race"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_NEW_BROKEN,                2, 3, "s1 s2 race_col f1ord race_col f2race_time race_diff", "s1 f2race_time",     "race_newrankyellow",    _("^BG%s^BG broke %s^BG's %s%s^BG place record with %s%s %s"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_NEW_IMPROVED,              1, 3, "s1 race_col f1ord race_col f2race_time race_diff", "s1 f2race_time",        "race_newtime",          _("^BG%s^BG improved their %s%s^BG place record with %s%s %s"), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_NEW_MISSING_UID,           1, 1, "s1 f1race_time", "s1 f1race_time",                                          "race_newfail",          _("^BG%s^BG scored a new record with ^F2%s^BG, but unfortunately lacks a UID and will be lost."), "") \
-    MSG_INFO_NOTIF(1, INFO_RACE_NEW_SET,                   1, 2, "s1 race_col f1ord race_col f2race_time", "s1 f2race_time",                  "race_newrecordserver",  _("^BG%s^BG set the %s%s^BG place record with %s%s"), "") \
-    MULTIICON_INFO(1, INFO_MINIGAME_INVITE,                2, 0, "s2 minigame1_name s1","s2",              "minigame1_d",                    "minigames/%s/icon_notif",_("^F4You have been invited by ^BG%s^F4 to join their game of ^F2%s^F4 (^F1%s^F4)"), "") \
-    MULTITEAM_INFO(1, INFO_SCORES_, 4,                     0, 0, "", "",                            "",                     _("^TC^TT ^BGteam scores!"), "") \
-    MSG_INFO_NOTIF(1, INFO_SPECTATE_WARNING,               0, 1, "f1secs", "",                      "",                     _("^F2You have to become a player within the next %s, otherwise you will be kicked, because spectating isn't allowed at this time!"), "") \
-    MSG_INFO_NOTIF(1, INFO_SUPERWEAPON_PICKUP,             1, 0, "s1", "s1",                        "superweapons",         _("^BG%s^K1 picked up a Superweapon"), "") \
-    MSG_INFO_NOTIF(1, INFO_TEAMCHANGE_LARGERTEAM,          0, 0, "", "",                            "",                     _("^BGYou cannot change to a larger team"), "") \
-    MSG_INFO_NOTIF(1, INFO_TEAMCHANGE_NOTALLOWED,          0, 0, "", "",                            "",                     _("^BGYou are not allowed to change teams"), "") \
-    MSG_INFO_NOTIF(2, INFO_VERSION_BETA,                   2, 0, "s1 s2", "",                       "",                     _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s"), "") \
-    MSG_INFO_NOTIF(2, INFO_VERSION_OLD,                    2, 0, "s1 s2", "",                       "",                     _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s"), "") \
-    MSG_INFO_NOTIF(2, INFO_VERSION_OUTDATED,               2, 0, "s1 s2", "",                       "",                     _("^F4NOTE: ^F1Xonotic %s^BG is out, and you still have ^F2Xonotic %s^BG - get the update from ^F3http://www.xonotic.org/^BG!"), "") \
-    MSG_INFO_NOTIF(1, INFO_WATERMARK,                      1, 0, "s1", "",                          "",                     _("^F3SVQC Build information: ^F4%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Accordeon%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Accordeon%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ARC_MURDER,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponarc",              _("^BG%s%s^K1 was electrocuted by ^BG%s^K1's Arc%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponlaser",            _("^BG%s%s^K1 was shot to death by ^BG%s^K1's Blaster%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_BLASTER_SUICIDE,               2, 1, "s1 s2loc spree_lost", "s1",                 "weaponlaser",            _("^BG%s^K1 shot themself to hell with their Blaster%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponcrylink",          _("^BG%s%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_SUICIDE,               2, 1, "s1 s2loc spree_lost", "s1",                 "weaponcrylink",          _("^BG%s^K1 felt the strong pull of their Crylink%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_DEVASTATOR_MURDER_DIRECT,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrocketlauncher",   _("^BG%s%s^K1 ate ^BG%s^K1's rocket%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_DEVASTATOR_MURDER_SPLASH,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrocketlauncher",   _("^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_DEVASTATOR_SUICIDE,            2, 1, "s1 s2loc spree_lost", "s1",                 "weaponrocketlauncher",   _("^BG%s^K1 blew themself up with their Devastator%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_BOLT,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponelectro",          _("^BG%s%s^K1 was blasted by ^BG%s^K1's Electro bolt%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_COMBO,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponelectro",          _("^BG%s%s^K1 felt the electrifying air of ^BG%s^K1's Electro combo%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_ORBS,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponelectro",          _("^BG%s%s^K1 got too close to ^BG%s^K1's Electro orb%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_SUICIDE_BOLT,          2, 1, "s1 s2loc spree_lost", "s1",                 "weaponelectro",          _("^BG%s^K1 played with Electro bolts%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_SUICIDE_ORBS,          2, 1, "s1 s2loc spree_lost", "s1",                 "weaponelectro",          _("^BG%s^K1 could not remember where they put their Electro orb%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_MURDER_BLAST,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponfireball",         _("^BG%s%s^K1 got too close to ^BG%s^K1's fireball%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_MURDER_FIREMINE,      3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponfireball",         _("^BG%s%s^K1 got burnt by ^BG%s^K1's firemine%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_SUICIDE_BLAST,        2, 1, "s1 s2loc spree_lost", "s1",                 "weaponfireball",         _("^BG%s^K1 should have used a smaller gun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,     2, 1, "s1 s2loc spree_lost", "s1",                 "weaponfireball",         _("^BG%s^K1 forgot about their firemine%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_MURDER_BURST,            3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhagar",            _("^BG%s%s^K1 was pummeled by a burst of ^BG%s^K1's Hagar rockets%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_MURDER_SPRAY,            3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhagar",            _("^BG%s%s^K1 was pummeled by ^BG%s^K1's Hagar rockets%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_SUICIDE,                 2, 1, "s1 s2loc spree_lost", "s1",                 "weaponhagar",            _("^BG%s^K1 played with tiny Hagar rockets%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HLAC_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhlac",             _("^BG%s%s^K1 was cut down with ^BG%s^K1's HLAC%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HLAC_SUICIDE,                  2, 1, "s1 s2loc spree_lost", "s1",                 "weaponhlac",             _("^BG%s^K1 got a little jumpy with their HLAC%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HMG_MURDER_SNIPE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhmg",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Heavy Machine Gun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HMG_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhmg",              _("^BG%s%s^K1 was torn to bits by ^BG%s^K1's Heavy Machine Gun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_HOOK_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponhook",             _("^BG%s%s^K1 was caught in ^BG%s^K1's Hook gravity bomb%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_KLEINBOTTLE_MURDER,            3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Klein Bottle%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_KLEINBOTTLE_SUICIDE,           2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Klein Bottle%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MACHINEGUN_MURDER_SNIPE,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MACHINEGUN_MURDER_SPRAY,       3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_LIMIT,               0, 1, "f1", "",                                    "",                       _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponminelayer",        _("^BG%s%s^K1 got too close to ^BG%s^K1's mine%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_SUICIDE,             2, 1, "s1 s2loc spree_lost", "s1",                 "weaponminelayer",        _("^BG%s^K1 forgot about their mine%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_BOUNCE,          3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapongrenadelauncher",  _("^BG%s%s^K1 got too close to ^BG%s^K1's Mortar grenade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_EXPLODE,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapongrenadelauncher",  _("^BG%s%s^K1 ate ^BG%s^K1's Mortar grenade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,         2, 1, "s1 s2loc spree_lost", "s1",                 "weapongrenadelauncher",  _("^BG%s^K1 didn't see their own Mortar grenade%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,        2, 1, "s1 s2loc spree_lost", "s1",                 "weapongrenadelauncher",  _("^BG%s^K1 blew themself up with their own Mortar%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER,                  3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 was sniped with a Rifle by ^BG%s^K1%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HAIL,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 died in ^BG%s^K1's Rifle bullet hail%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 failed to hide from ^BG%s^K1's Rifle bullet hail%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_PIERCING,         3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrifle",            _("^BG%s%s^K1 failed to hide from ^BG%s^K1's Rifle%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_MURDER_DIRECT,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrpc",              _("^BG%s%s^K1 was sawn in half by ^BG%s^K1's Rocket Propelled Chainsaw%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_MURDER_SPLASH,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponrpc",              _("^BG%s%s^K1 almost dodged ^BG%s^K1's Rocket Propelled Chainsaw%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_SUICIDE_DIRECT,            2, 1, "s1 s2loc spree_lost", "s1",                 "weaponrpc",              _("^BG%s^K1 was sawn in half by their own Rocket Propelled Chainsaw%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_RPC_SUICIDE_SPLASH,            2, 1, "s1 s2loc spree_lost", "s1",                 "weaponrpc",              _("^BG%s^K1 blew themself up with their Rocket Propelled Chainsaw%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_MURDER_SPRAY,           3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponseeker",           _("^BG%s%s^K1 was pummeled by ^BG%s^K1's Seeker rockets%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_MURDER_TAG,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponseeker",           _("^BG%s%s^K1 was tagged by ^BG%s^K1's Seeker%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_SUICIDE,                2, 1, "s1 s2loc spree_lost", "s1",                 "weaponseeker",           _("^BG%s^K1 played with tiny Seeker rockets%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOCKWAVE_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponshotgun",          _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shockwave%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOCKWAVE_MURDER_SLAP,         3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1",  "notify_melee_shotgun",   _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shockwave%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponshotgun",          _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shotgun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER_SLAP,           3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1",  "notify_melee_shotgun",   _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shotgun%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_THINKING_WITH_PORTALS,         2, 1, "s1 s2loc spree_lost", "s1",                 "notify_selfkill",        _("^BG%s^K1 is now thinking with portals%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Tuba%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_SUICIDE,                  2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Tuba%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_VAPORIZER_MURDER,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponminstanex",        _("^BG%s%s^K1 has been sublimated by ^BG%s^K1's Vaporizer%s%s"), "") \
-    MSG_INFO_NOTIF(1, INFO_WEAPON_VORTEX_MURDER,                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponnex",              _("^BG%s%s^K1 has been vaporized by ^BG%s^K1's Vortex%s%s"), "")
-
-#define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
-    MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
-    MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
-#define MULTITEAM_CENTER3(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
-    MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
-    MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-    MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
-#define MULTITEAM_CENTER4(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
-    MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
-    MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-    MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
-    MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
-#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
-    MULTITEAM_CENTER##teams(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle)
-
-#define MSG_CENTER_NOTIFICATIONS \
-    MSG_CENTER_NOTIF(1, CENTER_ALONE,                       0, 0, "",             NO_CPID,             "0 0", _("^F4You are now alone!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are attacking!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are defending!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_BEGIN,             0, 0, "",             CPID_ROUND,          "2 0", _("^F4Begin!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_GAMESTART,         0, 1, "",             CPID_ROUND,          "1 f1", _("^F4Game starts in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_ROUNDSTART,        0, 1, "",             CPID_ROUND,          "1 f1", _("^F4Round starts in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_ROUNDSTOP,         0, 0, "",             CPID_ROUND,          "2 0", _("^F4Round cannot start"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ROUND_TIED,                  0, 0, "",             CPID_ROUND,          "0 0", _("^BGRound tied"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ROUND_OVER,                  0, 0, "",             CPID_ROUND,          "0 0", _("^BGRound over, there's no winner"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CAMPCHECK,                   0, 0, "",             CPID_CAMPCHECK,      "0 0", _("^F2Don't camp!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_COINTOSS,                    1, 0, "s1",           NO_CPID,             "0 0", _("^F2Throwing coin... Result: %s^F2!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_FREE,      0, 0, "",             CPID_CTF_CAPSHIELD,  "0 0", _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_INACTIVE,  0, 0, "",             CPID_CTF_CAPSHIELD,  "0 0", _("^BGThis flag is currently inactive"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED,  0, 0, "",             CPID_CTF_CAPSHIELD,  "0 0", _("^BGYou are now ^F1shielded^BG from the flag(s)\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_CAPTURE_, 4,             0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou captured the ^TC^TT^BG flag!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURE_NEUTRAL,         0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou captured the flag!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_FLAG_THROW_PUNISH,       0, 1, "f1secs",       CPID_CTF_LOWPRIO,    "0 0", _("^BGToo many flag throws! Throwing disabled for %s."), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_PASS_OTHER_, 4,          2, 0, "s1 s2",        CPID_CTF_PASS,       "0 0", _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_OTHER_NEUTRAL,      2, 0, "s1 s2",        CPID_CTF_PASS,       "0 0", _("^BG%s^BG passed the flag to %s"), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_PASS_RECEIVED_, 4,       1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou received the ^TC^TT^BG flag from %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_RECEIVED_NEUTRAL,   1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou received the flag from %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTED,          1, 0, "s1 pass_key",  CPID_CTF_PASS,       "0 0", _("^BG%s^BG requests you to pass the flag%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTING,         1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGRequesting %s^BG to pass you the flag"), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_PASS_SENT_, 4,           1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou passed the ^TC^TT^BG flag to %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_SENT_NEUTRAL,       1, 0, "s1",           CPID_CTF_PASS,       "0 0", _("^BGYou passed the flag to %s"), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_, 4,              0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got the ^TC^TT^BG flag!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_NEUTRAL,          0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got the flag!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM,             1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got your %steam^BG's flag, return it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_ENEMY,       1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGYou got the %senemy^BG's flag, return it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY,            1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy^BG got your flag! Retrieve it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_VERBOSE,    2, 0, "s1 s2 s1",     CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy (^BG%s%s)^BG got your flag! Retrieve it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_NEUTRAL,    1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy^BG got the flag! Retrieve it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_NEUTRAL_VERBOSE, 2, 0, "s1 s2 s1",CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy (^BG%s%s)^BG got the flag! Retrieve it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_TEAM,        1, 0, "s1",          CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy^BG got their flag! Retrieve it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_TEAM_VERBOSE,2, 0, "s1 s2 s1",    CPID_CTF_LOWPRIO,    "0 0", _("^BGThe %senemy (^BG%s%s)^BG got their flag! Retrieve it!"), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_TEAM_, 4,         1, 0, "s1",           CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate^BG got the ^TC^TT^BG flag! Protect them!"), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_TEAM_VERBOSE_,    4, 2, 0, "s1 s2 s1",  CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the ^TC^TT^BG flag! Protect them!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_NEUTRAL,         1, 0, "s1",       CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate^BG got the flag! Protect them!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_VERBOSE_NEUTRAL, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO,    "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "") \
-    MULTITEAM_CENTER(1, CENTER_CTF_RETURN_, 4,              0, 0, "",             CPID_CTF_LOWPRIO,    "0 0", _("^BGYou returned the ^TC^TT^BG flag!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_CARRIER,       0, 0, "",             CPID_STALEMATE,      "0 0", _("^BGStalemate! Enemies can now see you on radar!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_OTHER,         0, 0, "",             CPID_STALEMATE,      "0 0", _("^BGStalemate! Flag carriers can now be seen by enemies on radar!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG,                 1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s"), _("^K3%sYou scored against ^BG%s")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAGGED,              1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K1%sYou were fragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAGGED_VERBOSE,      1, 4, "spree_cen s1 frag_stats",  NO_CPID, "0 0", _("^K1%sYou were fragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^BG%s")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG_VERBOSE,         1, 2, "spree_cen s1 frag_ping",   NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s^BG%s"), _("^K3%sYou scored against ^BG%s^BG%s")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG,             1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED,          1, 1, "spree_cen s1",             NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE,  1, 4, "spree_cen s1 frag_stats",  NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing^BG%s")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE,     1, 2, "spree_cen s1 frag_ping",   NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing^BG%s")) \
-    MSG_CENTER_NOTIF(1, CENTER_NADE_THROW,                  0, 0, "",             CPID_NADES,          "0 0", _("^BGPress ^F2DROPWEAPON^BG again to toss the nade!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_NADE_BONUS,                  0, 0, "",             CPID_NADES,          "0 0", _("^F2You got a ^K1BONUS GRENADE^F2!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_AUTOTEAMCHANGE,   0, 1, "death_team",   NO_CPID,             "0 0", _("^BGYou have been moved into a different team\nYou are now on: %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_BETRAYAL,         0, 0, "",             NO_CPID,             "0 0", _("^K1Don't shoot your team mates!"), _("^K1Don't go against your team mates!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CAMP,             0, 0, "",             NO_CPID,             "0 0", _("^K1Die camper!"), _("^K1Reconsider your tactics, camper!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CHEAT,            0, 0, "",             NO_CPID,             "0 0", _("^K1You unfairly eliminated yourself!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CUSTOM,           2, 0, "s2",           NO_CPID,             "0 0", _("^K1You were %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_DROWN,            0, 0, "",             NO_CPID,             "0 0", _("^K1You couldn't catch your breath!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FALL,             0, 0, "",             NO_CPID,             "0 0", _("^K1You hit the ground with a crunch!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FIRE,             0, 0, "",             NO_CPID,             "0 0", _("^K1You got a little bit too crispy!"), _("^K1You felt a little too hot!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_GENERIC,          0, 0, "",             NO_CPID,             "0 0", _("^K1You killed your own dumb self!"), _("^K1You need to be more careful!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_LAVA,             0, 0, "",             NO_CPID,             "0 0", _("^K1You couldn't stand the heat!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_MONSTER,          0, 0, "",             NO_CPID,             "0 0", _("^K1You were killed by a monster!"), _("^K1You need to watch out for monsters!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE,             0, 0, "",             NO_CPID,             "0 0", _("^K1You forgot to put the pin back in!"), _("^K1Tastes like chicken!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE_NAPALM,      0, 0, "",             NO_CPID,             "0 0", _("^K1Hanging around a napalm explosion is bad!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE_ICE_FREEZE,  0, 0, "",             NO_CPID,             "0 0", _("^K1You got a little bit too cold!"), _("^K1You felt a little chilly!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE_HEAL,        0, 0, "",             NO_CPID,             "0 0", _("^K1Your Healing Nade is a bit defective"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NOAMMO,           0, 0, "",             NO_CPID,             "0 0", _("^K1You were killed for running out of ammo..."), _("^K1You are respawning for running out of ammo...")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_ROT,              0, 0, "",             NO_CPID,             "0 0", _("^K1You grew too old without taking your medicine"), _("^K1You need to preserve your health")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SHOOTING_STAR,    0, 0, "",             NO_CPID,             "0 0", _("^K1You became a shooting star!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SLIME,            0, 0, "",             NO_CPID,             "0 0", _("^K1You melted away in slime!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SUICIDE,          0, 0, "",             NO_CPID,             "0 0", _("^K1You committed suicide!"), _("^K1You ended it all!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SWAMP,            0, 0, "",             NO_CPID,             "0 0", _("^K1You got stuck in a swamp!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TEAMCHANGE,       0, 1, "death_team",   NO_CPID,             "0 0", _("^BGYou are now on: %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TOUCHEXPLODE,     0, 0, "",             NO_CPID,             "0 0", _("^K1You died in an accident!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET,           0, 0, "",             NO_CPID,             "0 0", _("^K1You were fragged by a turret!"), _("^K1You had an unfortunate run in with a turret!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET_EWHEEL,    0, 0, "",             NO_CPID,             "0 0", _("^K1You were fragged by an eWheel turret!"), _("^K1You had an unfortunate run in with an eWheel turret!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET_WALK,      0, 0, "",             NO_CPID,             "0 0", _("^K1You were fragged by a Walker turret!"), _("^K1You had an unfortunate run in with a Walker turret!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_BUMB_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Bumblebee explosion!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_CRUSH,         0, 0, "",             NO_CPID,             "0 0", _("^K1You were crushed by a vehicle!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_RAPT_BOMB,     0, 0, "",             NO_CPID,             "0 0", _("^K1You were caught in a Raptor cluster bomb!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_RAPT_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Raptor explosion!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_SPID_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Spiderbot explosion!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_SPID_ROCKET,   0, 0, "",             NO_CPID,             "0 0", _("^K1You were blasted to bits by a Spiderbot rocket!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_WAKI_DEATH,    0, 0, "",             NO_CPID,             "0 0", _("^K1You got caught in the blast of a Racer explosion!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_WAKI_ROCKET,   0, 0, "",             NO_CPID,             "0 0", _("^K1You couldn't find shelter from a Racer rocket!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VOID,             0, 0, "",             NO_CPID,             "0 0", _("^K1Watch your step!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAG,         1, 0, "s1",           NO_CPID,             "0 0", _("^K1Moron! You fragged ^BG%s^K1, a team mate!"), _("^K1Moron! You went against ^BG%s^K1, a team mate!")) \
-    MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAGGED,      1, 0, "s1",           NO_CPID,             "0 0", _("^K1You were fragged by ^BG%s^K1, a team mate"), _("^K1You were scored against by ^BG%s^K1, a team mate")) \
-    MSG_CENTER_NOTIF(1, CENTER_DISCONNECT_IDLING,           0, 1, "",             CPID_IDLING,         "1 f1", _("^K1Stop idling!\n^BGDisconnecting in ^COUNT..."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DOOR_LOCKED_NEED,            0, 0, "",             NO_CPID,             "0 0", _("^BGYou need %s^BG!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DOOR_LOCKED_ALSONEED,        0, 0, "",             NO_CPID,             "0 0", _("^BGYou also need %s^BG!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_DOOR_UNLOCKED,               0, 0, "",             NO_CPID,             "0 0", _("^BGDoor unlocked!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_EXTRALIVES,                  0, 0, "",             NO_CPID,             "0 0", _("^F2You picked up some extra lives"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FREEZE,            1, 0, "s1",           NO_CPID,             "0 0", _("^K3You froze ^BG%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FROZEN,            1, 0, "s1",           NO_CPID,             "0 0", _("^K1You were frozen by ^BG%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE,            1, 0, "s1",           NO_CPID,             "0 0", _("^K3You revived ^BG%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE_SELF,       0, 0, "",             NO_CPID,             "0 0", _("^K3You revived yourself"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVED,           1, 0, "s1",           NO_CPID,             "0 0", _("^K3You were revived by ^BG%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_AUTO_REVIVED,      0, 1, "f1",           NO_CPID,             "0 0", _("^K3You were automatically revived after %s second(s)"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_GENERATOR_UNDERATTACK,       0, 0, "",             NO_CPID,             "0 0", _("^BGThe generator is under attack!"), "") \
-    MULTITEAM_CENTER(1, CENTER_ROUND_TEAM_WIN_, 4,          0, 0, "",             CPID_ROUND,          "0 0", _("^TC^TT^BG team wins the round"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ROUND_PLAYER_WIN,            1, 0, "s1",           CPID_ROUND,          "0 0", _("^BG%s^BG wins the round"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_SELF,              0, 0, "",             NO_CPID,             "0 0", _("^K1You froze yourself"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_SPAWN_LATE,        0, 0, "",             NO_CPID,             "0 0", _("^K1Round already started, you spawn as frozen"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_INVASION_SUPERMONSTER,       1, 0, "s1",           NO_CPID,             "0 0", _("^K1A %s has arrived!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_BUFF_DROP,              0, 1, "item_buffname",                     CPID_ITEM, "item_centime 0", _("^BGYou dropped the %s^BG buff!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_BUFF_GOT,               0, 1, "item_buffname",                     CPID_ITEM, "item_centime 0", _("^BGYou got the %s^BG buff!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_DONTHAVE,        0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^BGYou do not have the ^F1%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_DROP,            1, 1, "item_wepname item_wepammo",         CPID_ITEM, "item_centime 0", _("^BGYou dropped the ^F1%s^BG%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_GOT,             0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^BGYou got the ^F1%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_NOAMMO,          0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^BGYou don't have enough ammo for the ^F1%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_PRIMORSEC,       0, 3, "item_wepname f2primsec f3primsec",  CPID_ITEM, "item_centime 0", _("^F1%s %s^BG is unable to fire, but its ^F1%s^BG can"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_UNAVAILABLE,     0, 1, "item_wepname",                      CPID_ITEM, "item_centime 0", _("^F1%s^BG is ^F4not available^BG on this map"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_JOIN_NOSPAWNS,               0, 0, "",              CPID_PREVENT_JOIN,     "0 0", _("^K1No spawnpoints available!\nHope your team can fix it..."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT,                0, 0, "",              CPID_PREVENT_JOIN,     "0 0", _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_DROPPED,            1, 0, "s1",            CPID_KEEPAWAY,         "0 0", _("^BG%s^BG has dropped the ball!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP,             1, 0, "s1",            CPID_KEEPAWAY,         "0 0", _("^BG%s^BG has picked up the ball!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP_SELF,        0, 0, "",              CPID_KEEPAWAY,         "0 0", _("^BGYou picked up the ball"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_WARN,               0, 0, "",              CPID_KEEPAWAY_WARN,    "0 0", _("^BGKilling people while you don't have the ball gives no points!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_HELP,                0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGAll keys are in your team's hands!\nHelp the key carriers to meet!"), "") \
-    MULTITEAM_CENTER(1, CENTER_KEYHUNT_INTERFERE_, 4,       0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGAll keys are in ^TC^TT team^BG's hands!\nInterfere ^F4NOW^BG!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_MEET,                0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGAll keys are in your team's hands!\nMeet the other key carriers ^F4NOW^BG!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_ROUNDSTART,          0, 1, "",              CPID_KEYHUNT_OTHER,    "1 f1", _("^F4Round will start in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_SCAN,                0, 1, "",              CPID_KEYHUNT_OTHER,    "f1 0", _("^BGScanning frequency range..."), "") \
-    MULTITEAM_CENTER(1, CENTER_KEYHUNT_START_, 4,           0, 0, "",              CPID_KEYHUNT,          "0 0", _("^BGYou are starting with the ^TC^TT Key"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_LMS_NOLIVES,                 0, 0, "",              CPID_LMS,              "0 0", _("^BGYou have no lives left, you must wait until the next match"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_MISSING_TEAMS,               0, 1, "missing_teams", CPID_MISSING_TEAMS,    "-1 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_MISSING_PLAYERS,             0, 1, "f1",            CPID_MISSING_PLAYERS,  "-1 0", _("^BGWaiting for %s player(s) to join..."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_INSTAGIB_FINDAMMO,           0, 0, "",              CPID_INSTAGIB_FINDAMMO,"1 9", _("^F4^COUNT^BG left to find some ammo!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_INSTAGIB_FINDAMMO_FIRST,     0, 0, "",              CPID_INSTAGIB_FINDAMMO,"1 10", _("^BGGet some ammo or you'll be dead in ^F4^COUNT^BG!"), _("^BGGet some ammo! ^F4^COUNT^BG left!")) \
-    MSG_CENTER_NOTIF(1, CENTER_INSTAGIB_LIVES_REMAINING,    0, 1, "f1",            NO_CPID,               "0 0", _("^F2Extra lives remaining: ^K1%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_MOTD,                        1, 0, "s1",            CPID_MOTD,             "-1 0", "^BG%s", "") \
-    MSG_CENTER_NOTIF(1, CENTER_NIX_COUNTDOWN,               0, 2, "item_wepname",  CPID_NIX,              "1 f2", _("^F2^COUNT^BG until weapon change...\nNext weapon: ^F1%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_NIX_NEWWEAPON,               0, 1, "item_wepname",  CPID_NIX,              "0 0", _("^F2Active weapon: ^F1%s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_NADE,                        0, 0, "",              NO_CPID,               "0 0", _("^BGPress ^F2DROPWEAPON^BG again to toss the grenade!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ONS_CAPTURE,                 1, 0, "s1",            CPID_ONSLAUGHT,        "0 0", _("^BGYou captured %s^BG control point"), "") \
-    MULTITEAM_CENTER(1, CENTER_ONS_CAPTURE_, 4,             1, 0, "s1",            CPID_ONSLAUGHT,        "0 0", _("^TC^TT^BG team captured %s^BG control point"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ONS_CONTROLPOINT_SHIELDED,   0, 0, "",              CPID_ONS_CAPSHIELD,    "0 0", _("^BGThis control point currently cannot be captured"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ONS_GENERATOR_SHIELDED,      0, 0, "",              CPID_ONS_CAPSHIELD,    "0 0", _("^BGThe enemy generator cannot be destroyed yet\n^F2Capture some control points to unshield it"), "") \
-    MULTITEAM_CENTER(1, CENTER_ONS_NOTSHIELDED_, 4,         0, 0, "",              CPID_ONSLAUGHT,        "0 0", _("^BGThe ^TCenemy^BG generator is no longer shielded!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ONS_NOTSHIELDED_TEAM,        0, 0, "",              CPID_ONSLAUGHT,        "0 0", _("^K1Your generator is NOT shielded!\n^BGRe-capture control points to shield it!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ONS_TELEPORT,                0, 0, "pass_key",      CPID_ONSLAUGHT,        "0 0", _("^BGPress ^F2DROPFLAG%s^BG to teleport"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_ONS_TELEPORT_ANTISPAM,       0, 1, "f1secs",        CPID_ONSLAUGHT,        "0 0", _("^BGTeleporting disabled for %s"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_OVERTIME_FRAG,               0, 0, "",              CPID_OVERTIME,         "0 0", _("^F2Now playing ^F4OVERTIME^F2!\nKeep fragging until we have a winner!"), _("^F2Now playing ^F4OVERTIME^F2!\nKeep scoring until we have a winner!")) \
-    MSG_CENTER_NOTIF(1, CENTER_OVERTIME_CONTROLPOINT,       0, 0, "",              CPID_OVERTIME,         "5 0", _("^F2Now playing ^F4OVERTIME^F2!\n\nGenerators are now decaying.\nThe more control points your team holds,\nthe faster the enemy generator decays"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_OVERTIME_TIME,               0, 1, "f1time",        CPID_OVERTIME,         "0 0", _("^F2Now playing ^F4OVERTIME^F2!\n^BGAdded ^F4%s^BG to the game!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_PORTO_CREATED_IN,            0, 0, "",              NO_CPID,               "0 0", _("^K1In^BG-portal created"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_PORTO_CREATED_OUT,           0, 0, "",              NO_CPID,               "0 0", _("^F3Out^BG-portal created"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_PORTO_FAILED,                0, 0, "",              NO_CPID,               "0 0", _("^F1Portal creation failed"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_INVISIBILITY,      0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Invisibility has worn off"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SHIELD,            0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Shield has worn off"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SPEED,             0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Speed has worn off"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_STRENGTH,          0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Strength has worn off"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERUP_INVISIBILITY,        0, 0, "",              CPID_POWERUP,          "0 0", _("^F2You are invisible"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERUP_SHIELD,              0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Shield surrounds you"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERUP_SPEED,               0, 0, "",              CPID_POWERUP,          "0 0", _("^F2You are on speed"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_POWERUP_STRENGTH,            0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Strength infuses your weapons with devastating power"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_RACE_FINISHLAP,              0, 0, "",              CPID_RACE_FINISHLAP,   "0 0", _("^F2The race is over, finish your lap!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SECONDARY_NODAMAGE,          0, 0, "",              NO_CPID,               "0 0", _("^BGSecondary fire inflicts no damage!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SEQUENCE_COMPLETED,          0, 0, "",              NO_CPID,               "0 0", _("^BGSequence completed!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SEQUENCE_COUNTER,            0, 0, "",              NO_CPID,               "0 0", _("^BGThere are more to go..."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SEQUENCE_COUNTER_FEWMORE,    0, 1, "f1",            NO_CPID,               "0 0", _("^BGOnly %s^BG more to go..."), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_BROKEN,          0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Superweapons have broken down"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_LOST,            0, 0, "",              CPID_POWERUP,          "0 0", _("^F2Superweapons have been lost"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_PICKUP,          0, 0, "",              CPID_POWERUP,          "0 0", _("^F2You now have a superweapon"), "") \
-    MULTITEAM_CENTER(1, CENTER_TEAMCHANGE_, 4,              0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Changing to ^TC^TT^K1 in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_AUTO,             0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Changing team in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE,         0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Spectating in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE,          0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Suicide in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING,           0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT_MINIGAME,       0, 0, "",              NO_CPID,               "0 0",  _("^K1Cannot join given minigame session!"), "" ) \
-    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER,               0, 0, "pass_key",      CPID_VEHICLES,         "0 0",  _("^BGPress ^F2DROPFLAG%s^BG to enter/exit the vehicle"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_GUNNER,        0, 0, "pass_key",      CPID_VEHICLES,         "0 0",  _("^BGPress ^F2DROPFLAG%s^BG to enter the vehicle gunner"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_STEAL,         0, 0, "pass_key",      CPID_VEHICLES,         "0 0",  _("^BGPress ^F2DROPFLAG%s^BG to steal this vehicle"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL,               0, 0, "",              CPID_VEHICLES_OTHER,   "0 0",  _("^F2The enemy is stealing one of your vehicles!\n^F4Stop them!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL_SELF,          0, 0, "",              CPID_VEHICLES_OTHER,   "4 0",  _("^F2You have stolen the enemy's vehicle, you are now visible on their radar!"), "") \
-    MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT,      0, 1, "f1",            NO_CPID,               "0 0",  _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
-
-#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
-    MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
-    MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE)
-#define MULTITEAM_MULTI3(default,prefix,anncepre,infopre,centerpre) \
-    MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
-    MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
-    MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
-#define MULTITEAM_MULTI4(default,prefix,anncepre,infopre,centerpre) \
-    MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
-    MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
-    MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
-    MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK)
-#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
-    MULTITEAM_MULTI##teams(default,prefix,anncepre,infopre,centerpre)
-
-#define MSG_MULTI_NOTIFICATIONS \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_BUFF,                    NO_MSG,        INFO_DEATH_MURDER_BUFF,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_CHEAT,                   NO_MSG,        INFO_DEATH_MURDER_CHEAT,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_DROWN,                   NO_MSG,        INFO_DEATH_MURDER_DROWN,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_FALL,                    NO_MSG,        INFO_DEATH_MURDER_FALL,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_FIRE,                    NO_MSG,        INFO_DEATH_MURDER_FIRE,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_LAVA,                    NO_MSG,        INFO_DEATH_MURDER_LAVA,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_MONSTER,                 NO_MSG,        INFO_DEATH_MURDER_MONSTER,                 CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE,                    NO_MSG,        INFO_DEATH_MURDER_NADE,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_NAPALM,             NO_MSG,        INFO_DEATH_MURDER_NADE_NAPALM,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_ICE,                NO_MSG,        INFO_DEATH_MURDER_NADE_ICE,                NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_ICE_FREEZE,         NO_MSG,        INFO_DEATH_MURDER_NADE_ICE_FREEZE,         NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE_HEAL,               NO_MSG,        INFO_DEATH_MURDER_NADE_HEAL,               NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_SHOOTING_STAR,           NO_MSG,        INFO_DEATH_MURDER_SHOOTING_STAR,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_SLIME,                   NO_MSG,        INFO_DEATH_MURDER_SLIME,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_SWAMP,                   NO_MSG,        INFO_DEATH_MURDER_SWAMP,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_TELEFRAG,                NO_MSG,        INFO_DEATH_MURDER_TELEFRAG,                NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_TOUCHEXPLODE,            NO_MSG,        INFO_DEATH_MURDER_TOUCHEXPLODE,            NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_BUMB_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_BUMB_DEATH,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_BUMB_GUN,             NO_MSG,        INFO_DEATH_MURDER_VH_BUMB_GUN,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_CRUSH,                NO_MSG,        INFO_DEATH_MURDER_VH_CRUSH,                NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_RAPT_BOMB,            NO_MSG,        INFO_DEATH_MURDER_VH_RAPT_BOMB,            NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_RAPT_CANNON,          NO_MSG,        INFO_DEATH_MURDER_VH_RAPT_CANNON,          NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_RAPT_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_RAPT_DEATH,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_SPID_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_SPID_DEATH,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_SPID_MINIGUN,         NO_MSG,        INFO_DEATH_MURDER_VH_SPID_MINIGUN,         NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_SPID_ROCKET,          NO_MSG,        INFO_DEATH_MURDER_VH_SPID_ROCKET,          NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_WAKI_DEATH,           NO_MSG,        INFO_DEATH_MURDER_VH_WAKI_DEATH,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_WAKI_GUN,             NO_MSG,        INFO_DEATH_MURDER_VH_WAKI_GUN,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VH_WAKI_ROCKET,          NO_MSG,        INFO_DEATH_MURDER_VH_WAKI_ROCKET,          NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_MURDER_VOID,                    NO_MSG,        INFO_DEATH_MURDER_VOID,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_AUTOTEAMCHANGE,            NO_MSG,        INFO_DEATH_SELF_AUTOTEAMCHANGE,            CENTER_DEATH_SELF_AUTOTEAMCHANGE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_BETRAYAL,                  NO_MSG,        INFO_DEATH_SELF_BETRAYAL,                  CENTER_DEATH_SELF_BETRAYAL) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_CAMP,                      NO_MSG,        INFO_DEATH_SELF_CAMP,                      CENTER_DEATH_SELF_CAMP) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_CHEAT,                     NO_MSG,        INFO_DEATH_SELF_CHEAT,                     CENTER_DEATH_SELF_CHEAT) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_CUSTOM,                    NO_MSG,        INFO_DEATH_SELF_GENERIC,                   CENTER_DEATH_SELF_CUSTOM) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_DROWN,                     NO_MSG,        INFO_DEATH_SELF_DROWN,                     CENTER_DEATH_SELF_DROWN) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_FALL,                      NO_MSG,        INFO_DEATH_SELF_FALL,                      CENTER_DEATH_SELF_FALL) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_FIRE,                      NO_MSG,        INFO_DEATH_SELF_FIRE,                      CENTER_DEATH_SELF_FIRE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_GENERIC,                   NO_MSG,        INFO_DEATH_SELF_GENERIC,                   CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_LAVA,                      NO_MSG,        INFO_DEATH_SELF_LAVA,                      CENTER_DEATH_SELF_LAVA) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_MAGE,                  NO_MSG,        INFO_DEATH_SELF_MON_MAGE,                  CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SHAMBLER_CLAW,         NO_MSG,        INFO_DEATH_SELF_MON_SHAMBLER_CLAW,         CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SHAMBLER_SMASH,        NO_MSG,        INFO_DEATH_SELF_MON_SHAMBLER_SMASH,        CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SHAMBLER_ZAP,          NO_MSG,        INFO_DEATH_SELF_MON_SHAMBLER_ZAP,          CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_SPIDER,                NO_MSG,        INFO_DEATH_SELF_MON_SPIDER,                CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_WYVERN,                NO_MSG,        INFO_DEATH_SELF_MON_WYVERN,                CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_ZOMBIE_JUMP,           NO_MSG,        INFO_DEATH_SELF_MON_ZOMBIE_JUMP,           CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_MON_ZOMBIE_MELEE,          NO_MSG,        INFO_DEATH_SELF_MON_ZOMBIE_MELEE,          CENTER_DEATH_SELF_MONSTER) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE,                      NO_MSG,        INFO_DEATH_SELF_NADE,                      CENTER_DEATH_SELF_NADE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_NAPALM,               NO_MSG,        INFO_DEATH_SELF_NADE_NAPALM,               CENTER_DEATH_SELF_NADE_NAPALM) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_ICE,                  NO_MSG,        INFO_DEATH_SELF_NADE_ICE,                  CENTER_DEATH_SELF_NADE_ICE_FREEZE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_ICE_FREEZE,           NO_MSG,        INFO_DEATH_SELF_NADE_ICE_FREEZE,           CENTER_DEATH_SELF_NADE_ICE_FREEZE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_NADE_HEAL,                 NO_MSG,        INFO_DEATH_SELF_NADE_HEAL,                 CENTER_DEATH_SELF_NADE_HEAL) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_NOAMMO,                    NO_MSG,        INFO_DEATH_SELF_NOAMMO,                    CENTER_DEATH_SELF_NOAMMO) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_ROT,                       NO_MSG,        INFO_DEATH_SELF_ROT,                       CENTER_DEATH_SELF_ROT) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_SHOOTING_STAR,             NO_MSG,        INFO_DEATH_SELF_SHOOTING_STAR,             CENTER_DEATH_SELF_SHOOTING_STAR) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_SLIME,                     NO_MSG,        INFO_DEATH_SELF_SLIME,                     CENTER_DEATH_SELF_SLIME) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_SUICIDE,                   NO_MSG,        INFO_DEATH_SELF_SUICIDE,                   CENTER_DEATH_SELF_SUICIDE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_SWAMP,                     NO_MSG,        INFO_DEATH_SELF_SWAMP,                     CENTER_DEATH_SELF_SWAMP) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TEAMCHANGE,                NO_MSG,        INFO_DEATH_SELF_TEAMCHANGE,                CENTER_DEATH_SELF_TEAMCHANGE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TOUCHEXPLODE,              NO_MSG,        INFO_DEATH_SELF_TOUCHEXPLODE,              CENTER_DEATH_SELF_TOUCHEXPLODE) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET,                    NO_MSG,        INFO_DEATH_SELF_TURRET,                    CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_EWHEEL,             NO_MSG,        INFO_DEATH_SELF_TURRET_EWHEEL,             CENTER_DEATH_SELF_TURRET_EWHEEL) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_FLAC,               NO_MSG,        INFO_DEATH_SELF_TURRET_FLAC,               CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_HELLION,            NO_MSG,        INFO_DEATH_SELF_TURRET_HELLION,            CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_HK,                 NO_MSG,        INFO_DEATH_SELF_TURRET_HK,                 CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_MACHINEGUN,         NO_MSG,        INFO_DEATH_SELF_TURRET_MACHINEGUN,         CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_MLRS,               NO_MSG,        INFO_DEATH_SELF_TURRET_MLRS,               CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_PHASER,             NO_MSG,        INFO_DEATH_SELF_TURRET_PHASER,             CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_PLASMA,             NO_MSG,        INFO_DEATH_SELF_TURRET_PLASMA,             CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_TESLA,              NO_MSG,        INFO_DEATH_SELF_TURRET_TESLA,              CENTER_DEATH_SELF_TURRET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_WALK_GUN,           NO_MSG,        INFO_DEATH_SELF_TURRET_WALK_GUN,           CENTER_DEATH_SELF_TURRET_WALK) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_WALK_MELEE,         NO_MSG,        INFO_DEATH_SELF_TURRET_WALK_MELEE,         CENTER_DEATH_SELF_TURRET_WALK) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_TURRET_WALK_ROCKET,        NO_MSG,        INFO_DEATH_SELF_TURRET_WALK_ROCKET,        CENTER_DEATH_SELF_TURRET_WALK) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_BUMB_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_BUMB_DEATH,             CENTER_DEATH_SELF_VH_BUMB_DEATH) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_CRUSH,                  NO_MSG,        INFO_DEATH_SELF_VH_CRUSH,                  CENTER_DEATH_SELF_VH_CRUSH) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_RAPT_BOMB,              NO_MSG,        INFO_DEATH_SELF_VH_RAPT_BOMB,              CENTER_DEATH_SELF_VH_RAPT_BOMB) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_RAPT_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_RAPT_DEATH,             CENTER_DEATH_SELF_VH_RAPT_DEATH) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_SPID_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_SPID_DEATH,             CENTER_DEATH_SELF_VH_SPID_DEATH) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_SPID_ROCKET,            NO_MSG,        INFO_DEATH_SELF_VH_SPID_ROCKET,            CENTER_DEATH_SELF_VH_SPID_ROCKET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_WAKI_DEATH,             NO_MSG,        INFO_DEATH_SELF_VH_WAKI_DEATH,             CENTER_DEATH_SELF_VH_WAKI_DEATH) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VH_WAKI_ROCKET,            NO_MSG,        INFO_DEATH_SELF_VH_WAKI_ROCKET,            CENTER_DEATH_SELF_VH_WAKI_ROCKET) \
-    MSG_MULTI_NOTIF(1, DEATH_SELF_VOID,                      NO_MSG,        INFO_DEATH_SELF_VOID,                      CENTER_DEATH_SELF_VOID) \
-    MSG_MULTI_NOTIF(1, ITEM_BUFF_DROP,                       NO_MSG,        INFO_ITEM_BUFF_DROP,                       CENTER_ITEM_BUFF_DROP) \
-    MSG_MULTI_NOTIF(1, ITEM_BUFF_GOT,                        NO_MSG,        INFO_ITEM_BUFF_GOT,                        CENTER_ITEM_BUFF_GOT) \
-    MSG_MULTI_NOTIF(1, ITEM_WEAPON_DONTHAVE,                 NO_MSG,        INFO_ITEM_WEAPON_DONTHAVE,                 CENTER_ITEM_WEAPON_DONTHAVE) \
-    MSG_MULTI_NOTIF(1, ITEM_WEAPON_DROP,                     NO_MSG,        INFO_ITEM_WEAPON_DROP,                     CENTER_ITEM_WEAPON_DROP) \
-    MSG_MULTI_NOTIF(1, ITEM_WEAPON_GOT,                      NO_MSG,        INFO_ITEM_WEAPON_GOT,                      CENTER_ITEM_WEAPON_GOT) \
-    MSG_MULTI_NOTIF(1, ITEM_WEAPON_NOAMMO,                   NO_MSG,        INFO_ITEM_WEAPON_NOAMMO,                   CENTER_ITEM_WEAPON_NOAMMO) \
-    MSG_MULTI_NOTIF(1, ITEM_WEAPON_PRIMORSEC,                NO_MSG,        INFO_ITEM_WEAPON_PRIMORSEC,                CENTER_ITEM_WEAPON_PRIMORSEC) \
-    MSG_MULTI_NOTIF(1, ITEM_WEAPON_UNAVAILABLE,              NO_MSG,        INFO_ITEM_WEAPON_UNAVAILABLE,              CENTER_ITEM_WEAPON_UNAVAILABLE) \
-    MSG_MULTI_NOTIF(1, MULTI_COINTOSS,                       NO_MSG,        INFO_COINTOSS,                             CENTER_COINTOSS) \
-    MSG_MULTI_NOTIF(1, MULTI_COUNTDOWN_BEGIN,                ANNCE_BEGIN,   NO_MSG,                                    CENTER_COUNTDOWN_BEGIN) \
-    MSG_MULTI_NOTIF(1, MULTI_INSTAGIB_FINDAMMO,              ANNCE_NUM_10,  NO_MSG,                                    CENTER_INSTAGIB_FINDAMMO_FIRST) \
-    MSG_MULTI_NOTIF(1, WEAPON_ACCORDEON_MURDER,              NO_MSG,        INFO_WEAPON_ACCORDEON_MURDER,              NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_ACCORDEON_SUICIDE,             NO_MSG,        INFO_WEAPON_ACCORDEON_SUICIDE,             CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_ARC_MURDER,                    NO_MSG,        INFO_WEAPON_ARC_MURDER,                    NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_BLASTER_MURDER,                NO_MSG,        INFO_WEAPON_BLASTER_MURDER,                NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_BLASTER_SUICIDE,               NO_MSG,        INFO_WEAPON_BLASTER_SUICIDE,               CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_CRYLINK_MURDER,                NO_MSG,        INFO_WEAPON_CRYLINK_MURDER,                NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_CRYLINK_SUICIDE,               NO_MSG,        INFO_WEAPON_CRYLINK_SUICIDE,               CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_DEVASTATOR_MURDER_DIRECT,      NO_MSG,        INFO_WEAPON_DEVASTATOR_MURDER_DIRECT,      NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_DEVASTATOR_MURDER_SPLASH,      NO_MSG,        INFO_WEAPON_DEVASTATOR_MURDER_SPLASH,      NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_DEVASTATOR_SUICIDE,            NO_MSG,        INFO_WEAPON_DEVASTATOR_SUICIDE,            CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_MURDER_BOLT,           NO_MSG,        INFO_WEAPON_ELECTRO_MURDER_BOLT,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_MURDER_COMBO,          NO_MSG,        INFO_WEAPON_ELECTRO_MURDER_COMBO,          NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_MURDER_ORBS,           NO_MSG,        INFO_WEAPON_ELECTRO_MURDER_ORBS,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_SUICIDE_BOLT,          NO_MSG,        INFO_WEAPON_ELECTRO_SUICIDE_BOLT,          CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_ELECTRO_SUICIDE_ORBS,          NO_MSG,        INFO_WEAPON_ELECTRO_SUICIDE_ORBS,          CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_MURDER_BLAST,         NO_MSG,        INFO_WEAPON_FIREBALL_MURDER_BLAST,         NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_MURDER_FIREMINE,      NO_MSG,        INFO_WEAPON_FIREBALL_MURDER_FIREMINE,      NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_SUICIDE_BLAST,        NO_MSG,        INFO_WEAPON_FIREBALL_SUICIDE_BLAST,        CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_FIREBALL_SUICIDE_FIREMINE,     NO_MSG,        INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,     CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_HAGAR_MURDER_BURST,            NO_MSG,        INFO_WEAPON_HAGAR_MURDER_BURST,            NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_HAGAR_MURDER_SPRAY,            NO_MSG,        INFO_WEAPON_HAGAR_MURDER_SPRAY,            NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_HAGAR_SUICIDE,                 NO_MSG,        INFO_WEAPON_HAGAR_SUICIDE,                 CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_HLAC_MURDER,                   NO_MSG,        INFO_WEAPON_HLAC_MURDER,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_HLAC_SUICIDE,                  NO_MSG,        INFO_WEAPON_HLAC_SUICIDE,                  CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_HMG_MURDER_SNIPE,              NO_MSG,        INFO_WEAPON_HMG_MURDER_SNIPE,              NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_HMG_MURDER_SPRAY,              NO_MSG,        INFO_WEAPON_HMG_MURDER_SPRAY,              NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_HOOK_MURDER,                   NO_MSG,        INFO_WEAPON_HOOK_MURDER,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_KLEINBOTTLE_MURDER,            NO_MSG,        INFO_WEAPON_KLEINBOTTLE_MURDER,            NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_KLEINBOTTLE_SUICIDE,           NO_MSG,        INFO_WEAPON_KLEINBOTTLE_SUICIDE,           CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_MACHINEGUN_MURDER_SNIPE,       NO_MSG,        INFO_WEAPON_MACHINEGUN_MURDER_SNIPE,       NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_MACHINEGUN_MURDER_SPRAY,       NO_MSG,        INFO_WEAPON_MACHINEGUN_MURDER_SPRAY,       NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_LIMIT,               NO_MSG,        INFO_WEAPON_MINELAYER_LIMIT,               CENTER_WEAPON_MINELAYER_LIMIT) \
-    MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_MURDER,              NO_MSG,        INFO_WEAPON_MINELAYER_MURDER,              NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_SUICIDE,             NO_MSG,        INFO_WEAPON_MINELAYER_SUICIDE,             CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_BOUNCE,          NO_MSG,        INFO_WEAPON_MORTAR_MURDER_BOUNCE,          NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_EXPLODE,         NO_MSG,        INFO_WEAPON_MORTAR_MURDER_EXPLODE,         NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_SUICIDE_BOUNCE,         NO_MSG,        INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,         CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_MORTAR_SUICIDE_EXPLODE,        NO_MSG,        INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,        CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER,                  NO_MSG,        INFO_WEAPON_RIFLE_MURDER,                  NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER_HAIL,             NO_MSG,        INFO_WEAPON_RIFLE_MURDER_HAIL,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER_HAIL_PIERCING,    NO_MSG,        INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,    NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RIFLE_MURDER_PIERCING,         NO_MSG,        INFO_WEAPON_RIFLE_MURDER_PIERCING,         NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RPC_MURDER_DIRECT,             NO_MSG,        INFO_WEAPON_RPC_MURDER_DIRECT,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RPC_MURDER_SPLASH,             NO_MSG,        INFO_WEAPON_RPC_MURDER_SPLASH,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RPC_SUICIDE_DIRECT,            NO_MSG,        INFO_WEAPON_RPC_SUICIDE_DIRECT,            NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_RPC_SUICIDE_SPLASH,            NO_MSG,        INFO_WEAPON_RPC_SUICIDE_SPLASH,            CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_SEEKER_MURDER_SPRAY,           NO_MSG,        INFO_WEAPON_SEEKER_MURDER_SPRAY,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_SEEKER_MURDER_TAG,             NO_MSG,        INFO_WEAPON_SEEKER_MURDER_TAG,             NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_SEEKER_SUICIDE,                NO_MSG,        INFO_WEAPON_SEEKER_SUICIDE,                CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_SHOCKWAVE_MURDER,              NO_MSG,        INFO_WEAPON_SHOCKWAVE_MURDER,              NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_SHOCKWAVE_MURDER_SLAP,         NO_MSG,        INFO_WEAPON_SHOCKWAVE_MURDER_SLAP,         NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_SHOTGUN_MURDER,                NO_MSG,        INFO_WEAPON_SHOTGUN_MURDER,                NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_SHOTGUN_MURDER_SLAP,           NO_MSG,        INFO_WEAPON_SHOTGUN_MURDER_SLAP,           NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_THINKING_WITH_PORTALS,         NO_MSG,        INFO_WEAPON_THINKING_WITH_PORTALS,         CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_TUBA_MURDER,                   NO_MSG,        INFO_WEAPON_TUBA_MURDER,                   NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_TUBA_SUICIDE,                  NO_MSG,        INFO_WEAPON_TUBA_SUICIDE,                  CENTER_DEATH_SELF_GENERIC) \
-    MSG_MULTI_NOTIF(1, WEAPON_VAPORIZER_MURDER,              NO_MSG,        INFO_WEAPON_VAPORIZER_MURDER,              NO_MSG) \
-    MSG_MULTI_NOTIF(1, WEAPON_VORTEX_MURDER,                 NO_MSG,        INFO_WEAPON_VORTEX_MURDER,                 NO_MSG)
-
-#define MULTITEAM_CHOICE2(default,challow,prefix,chtype,optiona,optionb) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE)
-#define MULTITEAM_CHOICE3(default,challow,prefix,chtype,optiona,optionb) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW)
-#define MULTITEAM_CHOICE4(default,challow,prefix,chtype,optiona,optionb) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
-    MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK)
-#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
-    MULTITEAM_CHOICE##teams(default,challow,prefix,chtype,optiona,optionb)
-
-#define MSG_CHOICE_NOTIFICATIONS \
-    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 4,    MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_BROKEN_) \
-    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 4,      MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_TIME_) \
-    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_UNBROKEN_, 4,  MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_UNBROKEN_) \
-    MULTITEAM_CHOICE(1, 2, CHOICE_CTF_PICKUP_TEAM_, 4,       MSG_CENTER,  CENTER_CTF_PICKUP_TEAM_,          CENTER_CTF_PICKUP_TEAM_VERBOSE_) \
-    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_TEAM_NEUTRAL,   MSG_CENTER,  CENTER_CTF_PICKUP_TEAM_NEUTRAL,   CENTER_CTF_PICKUP_TEAM_VERBOSE_NEUTRAL) \
-    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY,          MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY,          CENTER_CTF_PICKUP_ENEMY_VERBOSE) \
-    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY_NEUTRAL,  MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY_NEUTRAL,  CENTER_CTF_PICKUP_ENEMY_NEUTRAL_VERBOSE) \
-    MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY_TEAM,     MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY_TEAM,     CENTER_CTF_PICKUP_ENEMY_TEAM_VERBOSE) \
-    MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG,                      MSG_CENTER,  CENTER_DEATH_MURDER_FRAG,         CENTER_DEATH_MURDER_FRAG_VERBOSE) \
-    MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED,                   MSG_CENTER,  CENTER_DEATH_MURDER_FRAGGED,      CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
-    MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG,                  MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAG,     CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
-    MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAGGED,               MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAGGED,  CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
-    //MSG_CHOICE_NOTIF(2, CHOICE_)
-
-
 // ===========================
 //  Special CVAR Declarations
 // ===========================
@@ -1701,7 +850,7 @@ void RegisterNotifications_First()
     #define dedi ""
     #endif
 
-    printf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME);
+    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
@@ -1727,24 +876,14 @@ void RegisterNotifications_Done()
         if(autocvar_notification_errors_are_fatal)
             error("Notification initialization failed! Read above and fix the errors!\n");
         else
-            print("Notification initialization failed! Read above and fix the errors!\n");
+            LOG_INFO("Notification initialization failed! Read above and fix the errors!\n");
     }
-    else { print("Notification initialization successful!\n"); }
+    else { LOG_INFO("Notification initialization successful!\n"); }
 }
 
 // NOW we actually activate the declarations
 ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First);
-MSG_ANNCE_NOTIFICATIONS
-MSG_INFO_NOTIFICATIONS
-MSG_CENTER_NOTIFICATIONS
-MSG_MULTI_NOTIFICATIONS
-MSG_CHOICE_NOTIFICATIONS
+#include "notifications.inc"
 ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done);
-#undef MSG_ANNCE_NOTIF
-#undef MSG_INFO_NOTIF
-#undef MSG_CENTER_NOTIF
-#undef MSG_MULTI_NOTIF
-#undef MSG_CHOICE_NOTIF
 
-#undef NOTIF_ADD_AUTOCVAR
 #endif
index e5b83443fbcd3c28aecce9276cd006e5eead2e74..33aaeb58b0456845e255761a6731b40e3df74021 100644 (file)
@@ -552,15 +552,16 @@ bool PlayerJump (void)
 
        bool doublejump = false;
        float mjumpheight = PHYS_JUMPVELOCITY;
-
-#ifdef SVQC
-       if (MUTATOR_CALLHOOK(PlayerJump, doublejump, mjumpheight))
-#elif defined(CSQC)
+#ifdef CSQC
        player_multijump = doublejump;
        player_jumpheight = mjumpheight;
-       if (PM_multijump_checkjump())
 #endif
-               return true;
+
+       if (MUTATOR_CALLHOOK(PlayerJump, doublejump, mjumpheight)
+#ifdef CSQC
+               || PM_multijump_checkjump()
+#endif
+               ) { return true; }
 
        doublejump = player_multijump;
        mjumpheight = player_jumpheight;
@@ -624,7 +625,7 @@ bool PlayerJump (void)
        {
 #ifdef SVQC
                if(autocvar_speedmeter)
-                       dprint(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
+                       LOG_TRACE(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
 #endif
                if(self.lastground < time - 0.3)
                {
@@ -633,7 +634,7 @@ bool PlayerJump (void)
                }
 #ifdef SVQC
                if(self.jumppadcount > 1)
-                       dprint(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
+                       LOG_TRACE(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
                self.jumppadcount = 0;
 #endif
        }
@@ -970,7 +971,7 @@ void SpecialCommand()
        TetrisImpulse();
 #else
        if (!CheatImpulse(99))
-               print("A hollow voice says \"Plugh\".\n");
+               LOG_INFO("A hollow voice says \"Plugh\".\n");
 #endif
 #endif
 }
@@ -1483,13 +1484,13 @@ void PM_walk(float buttons_prev, float maxspd_mod)
        {
 #ifdef SVQC
                if (autocvar_speedmeter)
-                       dprint(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
+                       LOG_TRACE(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
 #endif
                if (self.lastground < time - 0.3)
                        self.velocity *= (1 - PHYS_FRICTION_ONLAND);
 #ifdef SVQC
                if (self.jumppadcount > 1)
-                       dprint(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
+                       LOG_TRACE(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
                self.jumppadcount = 0;
 #endif
        }
index d4e5fdd389b9e86dc33f8881c05403cbcff9f404..a249b238d7bf197650833c3e3d1badad89135478 100644 (file)
@@ -43,8 +43,8 @@ bool IsFlying(entity a);
        #define IS_PLAYER(s)                                            (s).isplayermodel
        #define isPushable(s)                                           (s).isplayermodel
 
-       float player_multijump;
-       float player_jumpheight;
+       //float player_multijump;
+       //float player_jumpheight;
 
        #define PHYS_INPUT_ANGLES(s)                            input_angles
 // TODO
index ea783a12d6424bb35751ddc157adcda2d6205700..74004d062bcd0cb14b88b1b91568f8e76b4cad87 100644 (file)
@@ -394,9 +394,9 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                {
                        // url_fclose is processing, we got a response for writing the data
                        // this must come from HTTP
-                       dprint("Got response from player stats server:\n");
-                       while((s = url_fgets(fh))) { dprint("  ", s, "\n"); }
-                       dprint("End of response.\n");
+                       LOG_TRACE("Got response from player stats server:\n");
+                       while((s = url_fgets(fh))) { LOG_TRACE("  ", s, "\n"); }
+                       LOG_TRACE("End of response.\n");
                        url_fclose(fh);
                        break;
                }
@@ -404,7 +404,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                case URL_READY_CLOSED:
                {
                        // url_fclose has finished
-                       dprint("Player stats written\n");
+                       LOG_TRACE("Player stats written\n");
                        PlayerStats_GameReport_DelayMapVote = false;
                        if(PS_GR_OUT_DB >= 0)
                        {
@@ -417,7 +417,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                case URL_READY_ERROR:
                default:
                {
-                       print("Player stats writing failed: ", ftos(status), "\n");
+                       LOG_INFO("Player stats writing failed: ", ftos(status), "\n");
                        PlayerStats_GameReport_DelayMapVote = false;
                        if(PS_GR_OUT_DB >= 0)
                        {
@@ -443,7 +443,7 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest)
 
                        // now request the information
                        uri = strcat(uri, "/player/", uri_escape(uri_escape(joiningplayer.crypto_idfp)), "/elo.txt");
-                       dprint("Retrieving playerstats from URL: ", uri, "\n");
+                       LOG_TRACE("Retrieving playerstats from URL: ", uri, "\n");
                        url_single_fopen(
                                uri,
                                FILE_APPEND,
@@ -484,7 +484,7 @@ void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer)
        // determine whether we should retrieve playerbasic information again
 
        #if 0
-       printf("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f\n",
+       LOG_INFOF("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f\n",
                joiningplayer.netname,
                time
        );
@@ -508,7 +508,7 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
        {
                case URL_READY_CANWRITE:
                {
-                       dprint("-- Sending data to player stats server\n");
+                       LOG_TRACE("-- Sending data to player stats server\n");
                        /*url_fputs(fh, "V 1\n");
                        #ifdef WATERMARK
                        url_fputs(fh, sprintf("R %s\n", WATERMARK));
@@ -526,11 +526,11 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
                case URL_READY_CANREAD:
                {
                        string s = "";
-                       dprint("-- Got response from player stats server:\n");
+                       LOG_TRACE("-- Got response from player stats server:\n");
                        //string gametype = string_null;
                        while((s = url_fgets(fh)))
                        {
-                               dprint("  ", s, "\n");
+                               LOG_TRACE("  ", s, "\n");
                                /*
                                string key = "", value = "", data = "";
 
@@ -581,21 +581,21 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
                                continue;
                                */
                        }
-                       dprint("-- End of response.\n");
+                       LOG_TRACE("-- End of response.\n");
                        url_fclose(fh);
                        break;
                }
                case URL_READY_CLOSED:
                {
                        // url_fclose has finished
-                       print("Player stats synchronized with server\n");
+                       LOG_INFO("Player stats synchronized with server\n");
                        break;
                }
 
                case URL_READY_ERROR:
                default:
                {
-                       print("Receiving player stats failed: ", ftos(status), "\n");
+                       LOG_INFO("Receiving player stats failed: ", ftos(status), "\n");
                        break;
                }
        }
@@ -610,7 +610,7 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
        float i = 0;
        for(e = PS_D_IN_EVL; (en = db_get(PS_D_IN_DB, e)) != ""; e = en)
        {
-               print(sprintf("%d:%s:%s\n", i, e, db_get(PS_D_IN_DB, sprintf("#%s", e))));
+               LOG_INFO(sprintf("%d:%s:%s\n", i, e, db_get(PS_D_IN_DB, sprintf("#%s", e))));
                ++i;
        }
 #endif
@@ -634,7 +634,7 @@ void PlayerStats_PlayerDetail_AddItem(string event, string data)
 
        // now actually set the event data
        db_put(PS_D_IN_DB, sprintf("#%s", event), data);
-       dprint("Added item ", sprintf("#%s", event), "=", data, " to PS_D_IN_DB\n");
+       LOG_TRACE("Added item ", sprintf("#%s", event), "=", data, " to PS_D_IN_DB\n");
 }
 
 void PlayerStats_PlayerDetail(void)
@@ -647,7 +647,7 @@ void PlayerStats_PlayerDetail(void)
                        PS_D_IN_DB = db_create();
 
                //uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0)));
-               dprint("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri, "\n");
+               LOG_TRACE("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri, "\n");
                url_single_fopen(
                        autocvar_g_playerstats_playerdetail_uri,
                        FILE_APPEND,
@@ -676,7 +676,7 @@ void PlayerStats_PlayerDetail_CheckUpdate(void)
        float gamecount = cvar("cl_matchcount");
 
        #if 0
-       printf("PlayerStats_PlayerDetail_CheckUpdate(): %f >= %f, %d > %d\n",
+       LOG_INFOF("PlayerStats_PlayerDetail_CheckUpdate(): %f >= %f, %d > %d\n",
                time,
                PS_D_NEXTUPDATETIME,
                PS_D_LASTGAMECOUNT,
@@ -702,7 +702,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
        {
                case URL_READY_CANWRITE:
                {
-                       dprint("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...\n");
+                       LOG_TRACE("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...\n");
                        url_fputs(fh, "V 1\n");
                        #ifdef WATERMARK
                        url_fputs(fh, sprintf("R %s\n", WATERMARK));
@@ -775,7 +775,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
 
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        "PlayerStats_PlayerDetail_Handler(): ERROR: "
                                                        "Key went unhandled? Is our version outdated?\n"
                                                        "PlayerStats_PlayerDetail_Handler(): "
@@ -789,7 +789,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
                                }
 
                                #if 0
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "PlayerStats_PlayerDetail_Handler(): "
                                        "Key '%s', Event '%s', Data '%s'\n",
                                        key,
@@ -808,14 +808,14 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
                case URL_READY_CLOSED:
                {
                        // url_fclose has finished
-                       print("PlayerStats_PlayerDetail_Handler(): Player stats synchronized with server.\n");
+                       LOG_INFO("PlayerStats_PlayerDetail_Handler(): Player stats synchronized with server.\n");
                        break;
                }
 
                case URL_READY_ERROR:
                default:
                {
-                       print("PlayerStats_PlayerDetail_Handler(): Receiving player stats failed: ", ftos(status), "\n");
+                       LOG_INFO("PlayerStats_PlayerDetail_Handler(): Receiving player stats failed: ", ftos(status), "\n");
                        PlayerStats_PlayerDetail_Status = PS_D_STATUS_ERROR;
                        if(PS_D_IN_DB >= 0)
                        {
index 12a225ad9ef8966888aad0a94b1593affbe3636b..b70d8b600938f5e8ac1fc253aad1083310c00806 100644 (file)
@@ -211,8 +211,8 @@ void func_breakable_destroy() {
        if(self.dmg)
                RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, world, self.dmg_force, DEATH_HURTTRIGGER, world);
 
-       if(self.cnt)
-               Send_Effect((effects_ent[self.cnt - 1]).eent_eff_name, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
+       if(self.cnt) // TODO
+               pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
 
        if(self.respawntime)
        {
@@ -282,7 +282,7 @@ void spawnfunc_func_breakable()
        if(!self.debristimejitter) self.debristime = 2.5;
 
        if(self.mdl != "")
-               self.cnt = particleeffectnum(self.mdl);
+               self.cnt = _particleeffectnum(self.mdl);
        if(self.count == 0)
                self.count = 1;
 
index 04f8f24166bb96ec1a6f699bd4c0a598e615b88f..4c56815d2ffc3488a089a23c27ab56b26d6176a8 100644 (file)
@@ -553,10 +553,10 @@ void LinkDoors()
        FindConnectedComponent(self, enemy, LinkDoors_nextent, LinkDoors_isconnected, world);
 
        // set owner, and make a loop of the chain
-       dprint("LinkDoors: linking doors:");
+       LOG_TRACE("LinkDoors: linking doors:");
        for(t = self; ; t = t.enemy)
        {
-               dprint(" ", etos(t));
+               LOG_TRACE(" ", etos(t));
                t.owner = self;
                if(t.enemy == world)
                {
@@ -564,7 +564,7 @@ void LinkDoors()
                        break;
                }
        }
-       dprint("\n");
+       LOG_TRACE("\n");
 
        // collect health, targetname, message, size
        cmins = self.absmin;
index 9b32371dbeaa5af43a94e922bc179216d6f267c7..654db0f72ae1ba4cf979572e93718a7a5af7f692 100644 (file)
@@ -141,7 +141,7 @@ void spawnfunc_func_pointparticles()
                setsize(self, '0 0 0', self.maxs - self.mins);
        }
        if(!self.cnt)
-               self.cnt = particleeffectnum(self.mdl);
+               self.cnt = _particleeffectnum(self.mdl);
 
        Net_LinkEntity(self, (self.spawnflags & 4), 0, pointparticles_SendEntity);
 
index 2d9f0951954438bbae044e6b5138f58ad0334064..a7fb07815356973eee23bdee3c88a0878f312434 100644 (file)
@@ -218,16 +218,16 @@ void spawnfunc_misc_laser()
                        self.cnt = -1;
                else
                {
-                       self.cnt = particleeffectnum(self.mdl);
+                       self.cnt = _particleeffectnum(self.mdl);
                        if(self.cnt < 0)
                                if(self.dmg)
-                                       self.cnt = particleeffectnum("laser_deadly");
+                                       self.cnt = particleeffectnum(EFFECT_LASER_DEADLY);
                }
        }
        else if(!self.cnt)
        {
                if(self.dmg)
-                       self.cnt = particleeffectnum("laser_deadly");
+                       self.cnt = particleeffectnum(EFFECT_LASER_DEADLY);
                else
                        self.cnt = -1;
        }
index 4594c90d971823dafc7c6efc8bc2c3249b5dd260..b3a5a24330763d13152eb088cecb0dfd9ff445df 100644 (file)
@@ -225,7 +225,7 @@ void Net_TargetMusic()
                sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE);
                if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
-                       dprintf("Cannot initialize sound %s\n", e.noise);
+                       LOG_TRACEF("Cannot initialize sound %s\n", e.noise);
                        strunzone(e.noise);
                        e.noise = string_null;
                }
@@ -312,7 +312,7 @@ void Ent_ReadTriggerMusic()
                        sound(self, CH_BGM_SINGLE, self.noise, 0, ATTEN_NONE);
                        if(getsoundtime(self, CH_BGM_SINGLE) < 0)
                        {
-                               dprintf("Cannot initialize sound %s\n", self.noise);
+                               LOG_TRACEF("Cannot initialize sound %s\n", self.noise);
                                strunzone(self.noise);
                                self.noise = string_null;
                        }
index f5c54b58eb942f276e6c4503463f193f352d0d15..da7aeda71e9c628055b7223b9299eb9ba87d0625 100644 (file)
@@ -57,7 +57,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                        data = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", key)));
                        if(data.y == 0) // undefined field, i.e., invalid type
                        {
-                               print("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n");
+                               LOG_INFO("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n");
                                continue;
                        }
                }
@@ -152,7 +152,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                }
                                else
                                {
-                                       print("target_spawn: invalid/unknown variable replacement ", value, " specified, ignored!\n");
+                                       LOG_INFO("target_spawn: invalid/unknown variable replacement ", value, " specified, ignored!\n");
                                        continue;
                                }
 
@@ -165,13 +165,13 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                {
                                        if(value != "")
                                        {
-                                               print("target_spawn: try to get a field of a non-entity, ignored!\n");
+                                               LOG_INFO("target_spawn: try to get a field of a non-entity, ignored!\n");
                                                continue;
                                        }
                                        data2 = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", valuefield)));
                                        if(data2_y == 0) // undefined field, i.e., invalid type
                                        {
-                                               print("target_spawn: invalid/unknown entity key replacement ", valuefield, " specified, ignored!\n");
+                                               LOG_INFO("target_spawn: invalid/unknown entity key replacement ", valuefield, " specified, ignored!\n");
                                                continue;
                                        }
                                        value = getentityfieldstring(data2_x, valueent);
@@ -191,7 +191,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                                        value = vtos(stov(value) + stov(valueoffset));
                                                        break;
                                                default:
-                                                       print("target_spawn: only string, float and vector fields can do calculations, calculation ignored!\n");
+                                                       LOG_INFO("target_spawn: only string, float and vector fields can do calculations, calculation ignored!\n");
                                                        break;
                                        }
                                }
@@ -208,7 +208,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                                        value = vtos(stov(value) + random() * data2_x * '1 0 0' + random() * data2_y * '0 1 0' + random() * data2_z * '0 0 1');
                                                        break;
                                                default:
-                                                       print("target_spawn: only float and vector fields can do random calculations, calculation ignored!\n");
+                                                       LOG_INFO("target_spawn: only float and vector fields can do random calculations, calculation ignored!\n");
                                                        break;
                                        }
                                }
index 89a5fa20df1cef803ab61357d98e06e06d3ffd24..3421311691863f31a23274c4bf73a02fe8af7372 100644 (file)
@@ -82,8 +82,8 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
                                sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTEN_NORM);
                        if(tflags & TELEPORT_FLAG_PARTICLES)
                        {
-                               Send_Effect("teleport", player.origin, '0 0 0', 1);
-                               Send_Effect("teleport", to + v_forward * 32, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, player.origin, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, to + v_forward * 32, '0 0 0', 1);
                        }
                        self.pushltime = time + 0.2;
                }
@@ -190,7 +190,7 @@ void teleport_findtarget (void)
                if(e.movetype == MOVETYPE_NONE)
                        waypoint_spawnforteleporter(self, e.origin, 0);
                if(e.classname != "info_teleport_destination")
-                       print("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
+                       LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
        }
 
        if(n == 0)
@@ -239,7 +239,7 @@ void WarpZone_PostTeleportPlayer_Callback(entity pl)
        if(pl.owner == pl.realowner)
        {
                if(!(pl.flags & FL_PROJECTILE))
-                       print("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
+                       LOG_INFO("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
                pl.owner = world;
        }
        if(IS_PLAYER(pl))
index cd5fdff322955dcbe5c86fd8e2548cfe5c48bd84..2a0432c97827790b3a6a0a483f4e86a830a26851 100644 (file)
@@ -21,7 +21,7 @@ void trigger_disablerelay_use()
        }
 
        if((!a) == (!b))
-               print("Invalid use of trigger_disablerelay: ", ftos(a), " relays were on, ", ftos(b), " relays were off!\n");
+               LOG_INFO("Invalid use of trigger_disablerelay: ", ftos(a), " relays were on, ", ftos(b), " relays were off!\n");
 }
 
 void spawnfunc_trigger_disablerelay()
index b14078fb41a970b3eb176002ff189e5e149b4d3d..47f08d3acb321a0a50a2404d8d0cd2a34c519eb1 100644 (file)
@@ -181,7 +181,7 @@ void trigger_push_touch()
                if(self.pushltime < time)  // prevent "snorring" sound when a player hits the jumppad more than once
                {
                        // flash when activated
-                       Send_Effect("jumppad_activate", other.origin, other.velocity, 1);
+                       Send_Effect(EFFECT_JUMPPAD, other.origin, other.velocity, 1);
                        sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
                        self.pushltime = time + 0.2;
                }
index b36b5eadb2f8f39c27f0f3aa33e9d1f93816d33b..62c37a0f49630664ccbe8a7209b58f2082abd4ff 100644 (file)
@@ -69,7 +69,7 @@ void viewloc_init()
                        break;
                }
 
-       if(!self.enemy) { print("^1FAIL!\n"); remove(self); return; }
+       if(!self.enemy) { LOG_INFO("^1FAIL!\n"); remove(self); return; }
 
        if(!self.goalentity)
                self.goalentity = self.enemy; // make them match so CSQC knows what to do
@@ -83,7 +83,7 @@ void viewloc_init()
 void spawnfunc_trigger_viewlocation()
 {
        // we won't check target2 here yet, as it may not even need to exist
-       if(self.target == "") { print("^1FAIL!\n"); remove(self); return; }
+       if(self.target == "") { LOG_INFO("^1FAIL!\n"); remove(self); return; }
 
        EXACTTRIGGER_INIT;
        InitializeEntity(self, viewloc_init, INITPRIO_FINDTARGET);
index f2fc3a8cb134a285a54dfc65cc9806b9748a7f1c..924ba7ecf008fc1c8f53b384e9e9893a304c60bf 100644 (file)
@@ -60,7 +60,7 @@ void turret_checkpoint_init()
     {
         self.enemy = find(world, targetname, self.target);
         if(self.enemy == world)
-            dprint("A turret_checkpoint faild to find its target!\n");
+            LOG_TRACE("A turret_checkpoint faild to find its target!\n");
     }
     //self.think = turret_checkpoint_think;
     //self.nextthink = time + tc_acum + 0.25;
index 1e75506ab1e46636152fb064a771c156d013575e..f083e80d619e780c9afd4d7f0999753717160457 100644 (file)
@@ -45,11 +45,11 @@ void turret_draw()
 
        if(self.health < 85)
        if(dt < 0.01)
-               pointparticles(particleeffectnum("smoke_large"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_SMOKE_LARGE), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
        if(self.health < 32)
        if(dt < 0.015)
-               pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
 }
 
@@ -110,7 +110,7 @@ void turret_draw2d()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               printf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
+               LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
        }
 
        txt = self.netname;
@@ -273,7 +273,7 @@ void turret_gibboom()
        float i;
 
        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
 
        for (i = 1; i < 5; i = i + 1)
                turret_gibtoss(strcat("models/turrets/head-gib", ftos(i), ".md3"), self.origin + '0 0 2', self.velocity + randomvec() * 700, '0 0 0', false);
@@ -319,7 +319,7 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
 void turret_die()
 {
        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
        if (!autocvar_cl_nogibs)
        {
                // Base
index 547b5c6f2a4f5570bb5c8b823585f57a65a61747..f35448e9c2212dd98506391dbced0b0133658e6d 100644 (file)
@@ -48,7 +48,7 @@ void Dump_Turret_Settings(void)
                TUR_CONFIG_WRITETOFILE("// }}}\n")
 
                // step 5: debug info
-               print(sprintf("#%d: %s: %d settings...\n", i, TUR_NAME(i), TUR_CONFIG_COUNT));
+               LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, TUR_NAME(i), TUR_CONFIG_COUNT));
                totalsettings += TUR_CONFIG_COUNT;
        }
 
@@ -58,5 +58,5 @@ void Dump_Turret_Settings(void)
                { tur_config_queue[x] = string_null; }
 
        // extra information
-       print(sprintf("Totals: %d turrets, %d settings\n", (i - 1), totalsettings));
+       LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (i - 1), totalsettings));
 }
index 85cbd2006c75e7abedfe63c81fe555788225b1a0..9eb69f29dd54fa804b86e94e2456e453e4dce94c 100644 (file)
@@ -17,7 +17,7 @@ string tur_config_queue[MAX_TUR_CONFIG];
 
 #define TUR_CONFIG_WRITETOFILE(a) { \
        fputs(tur_config_file, a); \
-       if(tur_config_alsoprint) { print(a); } }
+       if(tur_config_alsoprint) { LOG_INFO(a); } }
 
 #define TUR_CONFIG_WRITE_CVARS(turret,name) \
                { TUR_CONFIG_QUEUE( \
index fa5318dc2d602917a982aa14bdbfbd348da84aca..5b8ffede8791a463549b9a4ddeb40671166f1b2e 100644 (file)
@@ -827,7 +827,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl
        */
 
 #ifdef TURRET_DEBUG_TARGETSELECT
-       dprint("Target:",e_target.netname," is a valid target for ",e_turret.netname,"\n");
+       LOG_TRACE("Target:",e_target.netname," is a valid target for ",e_turret.netname,"\n");
 #endif
 
        return 1;
@@ -974,11 +974,23 @@ float turret_firecheck()
        return 1;
 }
 
+bool turret_checkfire()
+{
+       bool ret = false; // dummy
+       if(MUTATOR_CALLHOOK(Turret_CheckFire, ret))
+               return ret_bool;
+
+       return self.turret_firecheckfunc();
+}
+
 void turret_fire()
 {
        if (autocvar_g_turrets_nofire != 0)
                return;
 
+       if(MUTATOR_CALLHOOK(TurretFire, self))
+               return;
+
        TUR_ACTION(self.turretid, TR_ATTACK);
 
        self.attack_finished_single = time + self.shot_refire;
@@ -1060,7 +1072,7 @@ void turret_think()
 
                                        turret_do_updates(self);
 
-                                       if (self.turret_firecheckfunc())
+                                       if (turret_checkfire())
                                                turret_fire();
                                }
                        }
@@ -1084,7 +1096,7 @@ void turret_think()
                turret_do_updates(self);
 
                // Fire?
-               if (self.turret_firecheckfunc())
+               if (turret_checkfire())
                        turret_fire();
        }
        else
@@ -1104,7 +1116,7 @@ void turret_think()
                                turret_do_updates(self);
 
                                // Fire!
-                               if (self.turret_firecheckfunc() != 0)
+                               if (turret_checkfire())
                                        turret_fire();
 
                                TUR_ACTION(self.turretid, TR_THINK);
@@ -1164,7 +1176,7 @@ void turret_think()
                turret_do_updates(self);
 
                // Fire?
-               if (self.turret_firecheckfunc())
+               if (turret_checkfire())
                        turret_fire();
        }
 
@@ -1177,7 +1189,7 @@ void turret_think()
 */
 void turret_use()
 {
-       dprint("Turret ",self.netname, " used by ", activator.classname, "\n");
+       LOG_TRACE("Turret ",self.netname, " used by ", activator.classname, "\n");
 
        self.team = activator.team;
 
@@ -1361,7 +1373,7 @@ float turret_initialize(float tur_id)
                if (self.tur_defend == world)
                {
                        self.target = "";
-                       dprint("Turret has invalid defendpoint!\n");
+                       LOG_TRACE("Turret has invalid defendpoint!\n");
                }
        }
 
index f0c02cb3f7b034a08951b81db522c30e93bf0247..1a09611da0bad5a414cd10973362139af581ac42 100644 (file)
@@ -139,7 +139,7 @@ float t_ewheel(float req)
                 _mis = turret_projectile(W_Sound("lasergun_fire"), 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, TRUE, TRUE);
                 _mis.missile_flags = MIF_SPLASH;
 
-                Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 self.tur_head.frame += 2;
 
@@ -212,12 +212,12 @@ float t_ewheel(float req)
                     e = find(world, targetname, self.target);
                     if (!e)
                     {
-                        dprint("Initital waypoint for ewheel does NOT exsist, fix your map!\n");
+                        LOG_TRACE("Initital waypoint for ewheel does NOT exsist, fix your map!\n");
                         self.target = "";
                     }
 
                     if (e.classname != "turret_checkpoint")
-                        dprint("Warning: not a turrret path\n");
+                        LOG_TRACE("Warning: not a turrret path\n");
                     else
                     {
 
index 65d00be38b523c086cc5d7b70be758d49186015f..3b834e4775078a1ebf766f16652ab9b8165a2bed 100644 (file)
@@ -41,7 +41,7 @@ float t_flac(float req)
             turret_tag_fire_update();
 
             proj = turret_projectile(W_Sound("hagar_fire"), 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, TRUE, TRUE);
-            Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+            Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
             proj.think   = turret_flac_projectile_think_explode;
             proj.nextthink  = time + self.tur_impacttime + (random() * 0.01 - random() * 0.01);
             proj.missile_flags = MIF_SPLASH | MIF_PROXY;
index 459c1263a75467629ee7d4f4aadbdec5437cd14d..ca4c3e2de0c92d6f0c9bd304fdd29868358a1865 100644 (file)
@@ -11,33 +11,33 @@ REGISTER_TURRET(
 );
 #else
 #ifdef SVQC
-float turret_fusionreactor_firecheck()
+bool turret_fusionreactor_firecheck()
 {
     if (self.attack_finished_single > time)
-        return 0;
+        return false;
 
     if (self.enemy.deadflag != DEAD_NO)
-        return 0;
+        return false;
 
     if (self.enemy == world)
-        return 0;
+        return false;
 
     if (self.ammo < self.shot_dmg)
-        return 0;
+        return false;
 
     if (self.enemy.ammo >= self.enemy.ammo_max)
-        return 0;
+        return false;
 
     if (vlen(self.enemy.origin - self.origin) > self.target_range)
-        return 0;
+        return false;
 
     if(self.team != self.enemy.team)
-        return 0;
+        return false;
 
     if(!(self.enemy.ammo_flags & TFL_AMMO_ENERGY))
-        return 0;
+        return false;
 
-    return 1;
+    return true;
 }
 
 void spawnfunc_turret_fusionreactor() { if(!turret_initialize(TUR_FUSIONREACTOR)) remove(self); }
index a71ba4c3bf3e734739e0c5443bca8067fad440f5..fca6a5b718ead3e93f203cf1acacf667b3a02f33 100644 (file)
@@ -35,8 +35,8 @@ float t_mlrs(float req)
             self.tur_head.frame = bound(0, 6 - floor(0.1 + self.ammo / self.shot_dmg), 6);
             if(self.tur_head.frame < 0)
             {
-                dprint("ammo:",ftos(self.ammo),"\n");
-                dprint("shot_dmg:",ftos(self.shot_dmg),"\n");
+                LOG_TRACE("ammo:",ftos(self.ammo),"\n");
+                LOG_TRACE("shot_dmg:",ftos(self.shot_dmg),"\n");
             }
 
             return true;
index dfebe1a40880a9fe0c942f4c76e0db8b9972a4d2..dda66f72c570bb3309a8eee79dc0431ce30c1a28 100644 (file)
@@ -27,7 +27,7 @@ float t_plasma(float req)
                 FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
                                    800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
-                Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 // teamcolor / hit beam effect
                 vector v;
@@ -35,7 +35,7 @@ float t_plasma(float req)
                 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
                 s = strcat("TE_TEI_G3", ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
 
-                WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v);
+                WarpZone_TrailParticles(world, _particleeffectnum(s), self.tur_shotorg, v);
 
                 if (self.tur_head.frame == 0)
                     self.tur_head.frame = 1;
@@ -45,7 +45,7 @@ float t_plasma(float req)
                 entity missile = turret_projectile(W_Sound("hagar_fire"), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
                 missile.missile_flags = MIF_SPLASH;
 
-                Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
                 if (self.tur_head.frame == 0)
                     self.tur_head.frame = 1;
             }
index 79e2ba8158557db1988533ce1a3d21f7cd77394c..ef762387b89d5e68731baaa03e1cc56a2df0270c 100644 (file)
@@ -28,15 +28,15 @@ float t_plasma_dual(float req)
                                    800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
 
-                Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 // teamcolor / hit beam effect
                 vector v;
                 string s;
                 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-                s = strcat("TE_TEI_G3", ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
+                s = strcat(EFFECT_VAPORIZER_NEUTRAL.eent_eff_name, ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
 
-                WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v);
+                WarpZone_TrailParticles(world, _particleeffectnum(s), self.tur_shotorg, v);
 
                 self.tur_head.frame += 1;
             }
@@ -44,7 +44,7 @@ float t_plasma_dual(float req)
             {
                 entity missile = turret_projectile(W_Sound("hagar_fire"), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
                 missile.missile_flags = MIF_SPLASH;
-                Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
                 self.tur_head.frame += 1;
             }
 
index 169f10b2411b397196a068607bcccaee649e3c6b..4a9ca77afe1b4e34e15b408f034ab928e6b8ca7d 100644 (file)
@@ -344,7 +344,7 @@ float t_walker(float req)
         {
             sound (self, CH_WEAPON_A, W_Sound("uzi_fire"), VOL_BASE, ATTEN_NORM);
             fireBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, 0, self.shot_dmg, self.shot_force, DEATH_TURRET_WALK_GUN, 0);
-            Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+            Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
             return true;
         }
@@ -613,12 +613,12 @@ float t_walker(float req)
                 e = find(world, targetname, self.target);
                 if (!e)
                 {
-                    dprint("Initital waypoint for walker does NOT exsist, fix your map!\n");
+                    LOG_TRACE("Initital waypoint for walker does NOT exsist, fix your map!\n");
                     self.target = "";
                 }
 
                 if (e.classname != "turret_checkpoint")
-                    dprint("Warning: not a turrret path\n");
+                    LOG_TRACE("Warning: not a turrret path\n");
                 else
                 {
 #ifdef WALKER_FANCYPATHING
index b96e78d514f6832d6c39cfae274e678b641761e9..b81fd2a6df81d409626458a4ba338a15273796f2 100644 (file)
     #define itos(i) ftos(i)
 #endif
 
-#ifndef QCC_SUPPORT_BOOL
-    #define bool float
-
-    // Boolean Constants
-    const int true     = 1;
-    const int false = 0;
-#endif
-
-// Transitional aliases
-[[deprecated("use true")]] [[alias("true")]] const bool TRUE;
-[[deprecated("use false")]] [[alias("false")]] const bool FALSE;
-
 #define FOREACH_ARRAY(arr, start, end, cond, body) do { \
     for (int i = start; i < end; ++i) {                 \
         const noref entity it = arr[i];                 \
index eb744a98949ae5ccdc4d2325b8359a1998521fdf..439f0bffa0f9b77485362c12815b4e26ce75ac7b 100644 (file)
@@ -288,7 +288,7 @@ void db_save(float db, string pFilename)
        fh = fopen(pFilename, FILE_WRITE);
        if(fh < 0)
        {
-               print(strcat("^1Can't write DB to ", pFilename));
+               LOG_INFO(strcat("^1Can't write DB to ", pFilename));
                return;
        }
        n = buf_getsize(db);
@@ -382,16 +382,16 @@ void db_put(float db, string pKey, string pValue)
 void db_test()
 {
        float db, i;
-       print("LOAD...\n");
+       LOG_INFO("LOAD...\n");
        db = db_load("foo.db");
-       print("LOADED. FILL...\n");
+       LOG_INFO("LOADED. FILL...\n");
        for(i = 0; i < DB_BUCKETS; ++i)
                db_put(db, ftos(random()), "X");
-       print("FILLED. SAVE...\n");
+       LOG_INFO("FILLED. SAVE...\n");
        db_save(db, "foo.db");
-       print("SAVED. CLOSE...\n");
+       LOG_INFO("SAVED. CLOSE...\n");
        db_close(db);
-       print("CLOSED.\n");
+       LOG_INFO("CLOSED.\n");
 }
 
 // Multiline text file buffers
@@ -620,17 +620,17 @@ void compressShortVector_init()
 
        if(cvar("developer"))
        {
-               print("Verifying vector compression table...\n");
+               LOG_INFO("Verifying vector compression table...\n");
                for(i = 0x0F00; i < 0xFFFF; ++i)
                        if(i != compressShortVector(decompressShortVector(i)))
                        {
-                               print("BROKEN vector compression: ", ftos(i));
-                               print(" -> ", vtos(decompressShortVector(i)));
-                               print(" -> ", ftos(compressShortVector(decompressShortVector(i))));
-                               print("\n");
+                               LOG_INFO("BROKEN vector compression: ", ftos(i));
+                               LOG_INFO(" -> ", vtos(decompressShortVector(i)));
+                               LOG_INFO(" -> ", ftos(compressShortVector(decompressShortVector(i))));
+                               LOG_INFO("\n");
                                error("b0rk");
                        }
-               print("Done.\n");
+               LOG_INFO("Done.\n");
        }
 }
 
@@ -892,13 +892,13 @@ float cvar_settemp(string tmp_cvar, string tmp_value)
 
        if (!(tmp_cvar || tmp_value))
        {
-               dprint("Error: Invalid usage of cvar_settemp(string, string); !\n");
+               LOG_TRACE("Error: Invalid usage of cvar_settemp(string, string); !\n");
                return 0;
        }
 
        if(!cvar_type(tmp_cvar))
        {
-               printf("Error: cvar %s doesn't exist!\n", tmp_cvar);
+               LOG_INFOF("Error: cvar %s doesn't exist!\n", tmp_cvar);
                return 0;
        }
 
@@ -935,7 +935,7 @@ float cvar_settemp_restore()
                        ++i;
                }
                else
-                       printf("Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.\n", e.netname);
+                       LOG_INFOF("Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.\n", e.netname);
        }
 
        return i;
@@ -1735,17 +1735,17 @@ float compressShotOrigin(vector v)
        z = rint(v.z * 4) + 128;
        if(x > 255 || x < 0)
        {
-               print("shot origin ", vtos(v), " x out of bounds\n");
+               LOG_INFO("shot origin ", vtos(v), " x out of bounds\n");
                x = bound(0, x, 255);
        }
        if(y > 255 || y < 0)
        {
-               print("shot origin ", vtos(v), " y out of bounds\n");
+               LOG_INFO("shot origin ", vtos(v), " y out of bounds\n");
                y = bound(0, y, 255);
        }
        if(z > 255 || z < 0)
        {
-               print("shot origin ", vtos(v), " z out of bounds\n");
+               LOG_INFO("shot origin ", vtos(v), " z out of bounds\n");
                z = bound(0, z, 255);
        }
        return x * 0x10000 + y * 0x100 + z;
@@ -2306,27 +2306,6 @@ string MakeConsoleSafe(string input)
        return input;
 }
 
-#ifndef MENUQC
-// get true/false value of a string with multiple different inputs
-float InterpretBoolean(string input)
-{
-       switch(strtolower(input))
-       {
-               case "yes":
-               case "true":
-               case "on":
-                       return true;
-
-               case "no":
-               case "false":
-               case "off":
-                       return false;
-
-               default: return stof(input);
-       }
-}
-#endif
-
 #ifdef CSQC
 entity ReadCSQCEntity()
 {
@@ -2350,7 +2329,7 @@ void m_shutdown()
 {
        if(shutdown_running)
        {
-               print("Recursive shutdown detected! Only restoring cvars...\n");
+               LOG_INFO("Recursive shutdown detected! Only restoring cvars...\n");
        }
        else
        {
@@ -2628,7 +2607,7 @@ vector animfixfps(entity e, vector a, vector b)
 #ifdef SVQC
 void dedicated_print(string input) // print(), but only print if the server is not local
 {
-       if(server_is_dedicated) { print(input); }
+       if(server_is_dedicated) { LOG_INFO(input); }
 }
 #endif
 
index 8a77ba18ffdcc7b9fdeeb712f4e3a08ed699a68a..e3fab47b7da6d9961c982b9eda081f71a6bbde7f 100644 (file)
@@ -246,10 +246,6 @@ string strtolower(string s);
 
 string MakeConsoleSafe(string input);
 
-#ifndef MENUQC
-float InterpretBoolean(string input);
-#endif
-
 // generic shutdown handler
 void Shutdown();
 
index d55f797443a96baa60cff7591a60b09566d0f6f0..523156006d9c9067315533bb68a34c7fa67430a8 100644 (file)
@@ -292,7 +292,7 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
                sound (self, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTEN_NORM);
 
        if(_mzlfx)
-               Send_Effect(_mzlfx, proj.origin, proj.velocity, 1);
+               Send_Effect_(_mzlfx, proj.origin, proj.velocity, 1);
 
        setsize (proj, '-1 -1 -1' * _size, '1 1 1' * _size);
 
@@ -304,8 +304,8 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
 void vehicles_gib_explode()
 {
        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
-       Send_Effect("explosion_small", self.wp00.origin + '0 0 64', '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, self.wp00.origin + '0 0 64', '0 0 0', 1);
        remove(self);
 }
 
@@ -479,7 +479,7 @@ void vehicles_clearreturn(entity veh)
 void vehicles_spawn();
 void vehicles_return()
 {
-       Send_Effect("teleport", self.wp00.origin + '0 0 64', '0 0 0', 1);
+       Send_Effect(EFFECT_TELEPORT, self.wp00.origin + '0 0 64', '0 0 0', 1);
 
        self.wp00.think  = vehicles_spawn;
        self.wp00.nextthink = time;
@@ -572,7 +572,7 @@ void vehicles_setreturn(entity veh)
 
 void vehicle_use()
 {
-       dprint("vehicle ",self.netname, " used by ", activator.classname, "\n");
+       LOG_TRACE("vehicle ",self.netname, " used by ", activator.classname, "\n");
 
        self.tur_head.team = activator.team;
 
@@ -583,7 +583,7 @@ void vehicle_use()
 
        if(self.active == ACTIVE_ACTIVE && self.deadflag == DEAD_NO && !gameover)
        {
-               dprint("Respawning vehicle: ", self.netname, "\n");
+               LOG_TRACE("Respawning vehicle: ", self.netname, "\n");
                if(self.effects & EF_NODRAW)
                {
                        self.think = vehicles_spawn;
@@ -635,7 +635,7 @@ void vehicles_painframe()
                float _ftmp;
                _ftmp = self.owner.vehicle_health / 50;
                self.pain_frame = time + 0.1 + (random() * 0.5 * _ftmp);
-               pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
                if(self.vehicle_flags & VHF_DMGSHAKE)
                        self.velocity += randomvec() * 30;
@@ -832,7 +832,7 @@ void vehicles_exit(bool eject)
 
        if(vehicles_exit_running)
        {
-               dprint("^1vehicles_exit allready running! this is not good..\n");
+               LOG_TRACE("^1vehicles_exit allready running! this is not good..\n");
                return;
        }
 
@@ -1138,7 +1138,7 @@ void vehicles_think()
 // initialization
 void vehicles_spawn()
 {
-       dprint("Spawning vehicle: ", self.classname, "\n");
+       LOG_TRACE("Spawning vehicle: ", self.classname, "\n");
 
        // disown & reset
        self.vehicle_hudmodel.viewmodelforclient = self;
@@ -1169,7 +1169,7 @@ void vehicles_spawn()
        self.angles = self.pos2;
        setorigin(self, self.pos1);
        // Show it
-       Send_Effect("teleport", self.origin + '0 0 64', '0 0 0', 1);
+       Send_Effect(EFFECT_TELEPORT, self.origin + '0 0 64', '0 0 0', 1);
 
        if(self.vehicle_controller)
                self.team = self.vehicle_controller.team;
index 65eb131685ffe2486bab7d871e0723d872454de7..7ace8225bb5965a9874ed19c29208ac89777d764 100644 (file)
@@ -104,7 +104,7 @@ float bumble_raygun_send(entity to, int sf);
 void bumblebee_fire_cannon(entity _gun, string _tagname, entity _owner)
 {
        vector v = gettaginfo(_gun, gettagindex(_gun, _tagname));
-       vehicles_projectile("bigplasma_muzzleflash", W_Sound("flacexp3"),
+       vehicles_projectile(EFFECT_BIGPLASMA_MUZZLEFLASH.eent_eff_name, W_Sound("flacexp3"),
                                                v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed,
                                                autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force,  0,
                                                DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, true, true, _owner);
@@ -324,7 +324,7 @@ bool bumblebee_gunner_enter()
        }
        else if(!vehic.gunner1 && time >= vehic.gun1.phase)     { gunner = vehic.gun1; vehic.gunner1 = player; }
        else if(!vehic.gunner2 && time >= vehic.gun2.phase)             { gunner = vehic.gun2; vehic.gunner2 = player; }
-       else { dprint("Vehicle is full, fail\n"); return false; }
+       else { LOG_TRACE("Vehicle is full, fail\n"); return false; }
 
        player.vehicle                  = gunner;
        player.angles                   = vehic.angles;
@@ -717,7 +717,7 @@ void bumblebee_blowup()
                                 DEATH_VH_BUMB_DEATH, world);
 
        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("explosion_big", (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_BIG, (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
 
        if(self.owner.deadflag == DEAD_DYING)
                self.owner.deadflag = DEAD_DEAD;
@@ -733,7 +733,7 @@ void bumblebee_diethink()
        if(random() < 0.1)
        {
                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-               Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        }
 
        self.nextthink = time + 0.1;
@@ -877,7 +877,7 @@ float v_bumblebee(float req)
                        _body.scale = 1.5;
                        _body.angles = self.angles;
 
-                       Send_Effect("explosion_medium", findbetterlocation(self.origin, 16), '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation(self.origin, 16), '0 0 0', 1);
 
                        self.health                     = 0;
                        self.event_damage       = func_null;
@@ -1078,8 +1078,8 @@ void bumble_raygun_read(bool bIsNew)
                else
                        self.colormod = '0 1 0';
 
-               self.traileffect = particleeffectnum("healray_muzzleflash");
-               self.lip = particleeffectnum("healray_impact");
+               self.traileffect = particleeffectnum(EFFECT_BUMBLEBEE_HEAL_MUZZLEFLASH);
+               self.lip = particleeffectnum(EFFECT_BUMBLEBEE_HEAL_IMPACT);
 
                self.draw = bumble_raygun_draw;
        }
index f83df2873eb29e54020e0edeacd894c04375ae7d..38b06c3b3a80dd72fe182366622bfb9d9c4397b7 100644 (file)
@@ -174,7 +174,7 @@ void racer_fire_cannon(string tagname)
        entity bolt;
 
        v = gettaginfo(self, gettagindex(self, tagname));
-       bolt = vehicles_projectile("wakizashi_gun_muzzleflash", W_Sound("lasergun_fire"),
+       bolt = vehicles_projectile(EFFECT_RACER_MUZZLEFLASH.eent_eff_name, W_Sound("lasergun_fire"),
                                                   v, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed,
                                                   autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force,  0,
                                                   DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, true, true, self.owner);
@@ -292,7 +292,7 @@ void racer_rocket_tracker()
 void racer_fire_rocket(string tagname, entity trg)
 {
        vector v = gettaginfo(self, gettagindex(self, tagname));
-       entity rocket = vehicles_projectile("wakizashi_rocket_launch", W_Sound("rocket_fire"),
+       entity rocket = vehicles_projectile(EFFECT_RACER_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                   v, v_forward * autocvar_g_vehicle_racer_rocket_speed,
                                                   autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3,
                                                   DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, false, false, self.owner);
@@ -406,7 +406,7 @@ float racer_frame()
        {
 #ifdef SVQC
                if(time - racer.wait > 0.2)
-                       pointparticles(particleeffectnum("wakizashi_booster_smoke"), self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
+                       pointparticles(particleeffectnum(EFFECT_RACER_BOOSTER), self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
 #endif
 
                racer.wait = time;
@@ -427,7 +427,7 @@ float racer_frame()
                {
                        traceline(racer.origin, racer.origin - '0 0 256', MOVE_NORMAL, self);
                        if(trace_fraction != 1.0)
-                               pointparticles(particleeffectnum("smoke_small"), trace_endpos, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), trace_endpos, '0 0 0', 1);
 
                        racer.invincible_finished = time + 0.1 + (random() * 0.1);
                }
@@ -794,7 +794,7 @@ bool v_racer(int req)
                        self.cnt                        = 1 + random() * 2;
                        self.touch                      = racer_deadtouch;
 
-                       Send_Effect("explosion_medium", self.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_MEDIUM, self.origin, '0 0 0', 1);
 
                        if(random() < 0.5)
                                self.avelocity_z = 32;
index 035c20b8b032749bdbe0c9eeb8f28a0395b84c55..d2ddea77316b0c83b7d974bc83b02fe3708ea950 100644 (file)
@@ -195,7 +195,7 @@ void raptor_bombdrop()
 
 void raptor_fire_cannon(entity gun, string tagname)
 {
-       vehicles_projectile("raptor_cannon_muzzleflash", W_Sound("lasergun_fire"),
+       vehicles_projectile(EFFECT_RAPTOR_MUZZLEFLASH.eent_eff_name, W_Sound("lasergun_fire"),
                                                   gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
                                                   autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force,  0,
                                                   DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, true, true, self.owner);
@@ -728,7 +728,7 @@ void raptor_diethink()
        if(random() < 0.05)
        {
                sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-               Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        }
        self.nextthink = time;
 
@@ -842,7 +842,7 @@ float v_raptor(float req)
                        self.nextthink                  = time;
                        self.wait                               = time + 5 + (random() * 5);
 
-                       Send_Effect("explosion_medium", findbetterlocation (self.origin, 16), '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation (self.origin, 16), '0 0 0', 1);
 
                        self.velocity_z += 600;
 
index 8c238f865babb1d982d3f1c6b30b36460e39085d..973e1e5944741ee2353769495ad995ed0febd7d1 100644 (file)
@@ -269,7 +269,7 @@ void spiderbot_rocket_do()
        switch(self.vehicle_weapon2mode)
        {
                case SBRM_VOLLY:
-                       rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+                       rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                                   v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                                                   autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
@@ -283,7 +283,7 @@ void spiderbot_rocket_do()
                                self.wait = -10;
                        break;
                case SBRM_GUIDE:
-                       rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+                       rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                                   v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                                                   autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, false, self.owner);
@@ -295,7 +295,7 @@ void spiderbot_rocket_do()
 
                break;
                case SBRM_ARTILLERY:
-                       rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+                       rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                                   v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                                                   autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
@@ -559,8 +559,8 @@ float spiderbot_frame()
                                 autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0);
 
                        sound (gun, CH_WEAPON_A, W_Sound("uzi_fire"), VOL_BASE, ATTEN_NORM);
-                       //trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
-                       pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
+                       //trailparticles(self, _particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
+                       pointparticles(particleeffectnum(EFFECT_SPIDERBOT_MINIGUN_MUZZLEFLASH), v, v_forward * 2500, 1);
 
                        self = spider;
 
@@ -679,7 +679,7 @@ void spiderbot_headfade()
                if(self.alpha > 0.1)
                {
                        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                       Send_Effect("explosion_big", self.origin + '0 0 100', '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_BIG, self.origin + '0 0 100', '0 0 0', 1);
                }
                remove(self);
        }
@@ -692,7 +692,7 @@ void spiderbot_blowup()
                if(random() < 0.1)
                {
                        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                       Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
                }
                self.nextthink = time + 0.1;
                return;
index 24e6d08ebeb751925a824be5bb7940524ace2f2e..125e6f8e12f0cfa0d27ed2af62eabe33219ab890 100644 (file)
@@ -132,9 +132,9 @@ void viewloc_SetViewLocation()
                }
 
 #if 0
-               dprint(vtos(camera_position), "\n");
-               dprint(vtos(old_camera_angle), "\n");
-               dprint(vtos(camera_angle), "\n");
+               LOG_TRACE(vtos(camera_position), "\n");
+               LOG_TRACE(vtos(old_camera_angle), "\n");
+               LOG_TRACE(vtos(camera_angle), "\n");
 #endif
 
                freeze_org = getpropertyvec(VF_ORIGIN);
index 46bb8a6d45d465879915690e1ef4d51383800903..16b507d14eee683e65c13e28a42399efdd48054f 100644 (file)
@@ -55,7 +55,7 @@ vector damage_explosion_calcpush(vector explosion_f, vector target_v, float spee
        v = explosion_calcpush(explosion_f * speedfactor, m, target_v, 1, 0);
        // the factor we then get is:
        //   1
-       printf("MASS: %f\nv: %v -> %v\nENERGY BEFORE == %f + %f = %f\nENERGY AFTER >= %f\n",
+       LOG_INFOF("MASS: %f\nv: %v -> %v\nENERGY BEFORE == %f + %f = %f\nENERGY AFTER >= %f\n",
                m,
                target_v, target_v + v,
                target_v * target_v, m * explosion_f * speedfactor * explosion_f * speedfactor, target_v * target_v + m * explosion_f * speedfactor * explosion_f * speedfactor,
index 0448f4874a26c416f08d709a376705a20be8183f..b90c01f4a65abd6e300485335c03fa2bd74e32ed 100644 (file)
@@ -51,7 +51,7 @@ void Dump_Weapon_Settings(void)
                WEP_CONFIG_WRITETOFILE("// }}}\n");
 
                // step 5: debug info
-               print(sprintf("#%d: %s: %d settings...\n", i, WEP_NAME(i), WEP_CONFIG_COUNT));
+               LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, WEP_NAME(i), WEP_CONFIG_COUNT));
                totalsettings += WEP_CONFIG_COUNT;
        }
 
@@ -61,5 +61,5 @@ void Dump_Weapon_Settings(void)
                { wep_config_queue[x] = string_null; }
 
        // extra information
-       print(sprintf("Totals: %d weapons, %d settings\n", (i - 1), totalsettings));
+       LOG_INFO(sprintf("Totals: %d weapons, %d settings\n", (i - 1), totalsettings));
 }
index 4e968ec4e518629d0a1dd9c9f8319b901e75fef0..410dbdfadeb8b1f7fe79e4eeacf63bdf1a7e14d0 100644 (file)
@@ -19,7 +19,7 @@ string wep_config_queue[MAX_WEP_CONFIG];
 
 #define WEP_CONFIG_WRITETOFILE(a) do { \
        fputs(wep_config_file, a); \
-       if(wep_config_alsoprint) { print(a); } \
+       if(wep_config_alsoprint) { LOG_INFO(a); } \
 } while(0)
 
 #define WEP_CONFIG_WRITE_CVARS_NONE(wepname,name) \
index 893311441c82d5f0b6c52b453572e0857c518ef7..c101a8c8ab326f79fd8d0e72972d00d30b0fc2b5 100644 (file)
@@ -265,7 +265,7 @@ void W_Arc_Beam_Think(void)
 
                        if ( WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max) )
                        {
-                               Send_Effect("arc_overheat",
+                               Send_Effect_("arc_overheat",
                                        self.beam_start, self.beam_wantdir, 1 );
                                sound(self, CH_WEAPON_A, W_Sound("arc_stop"), VOL_BASE, ATTN_NORM);
                        }
@@ -608,10 +608,10 @@ void Arc_Smoke()
        if ( self.arc_overheat > time )
        {
                if ( random() < self.arc_heat_percent )
-                       Send_Effect("arc_smoke", smoke_origin, '0 0 0', 1 );
+                       Send_Effect_("arc_smoke", smoke_origin, '0 0 0', 1 );
                if ( self.BUTTON_ATCK || self.BUTTON_ATCK2 )
                {
-                       Send_Effect("arc_overheat_fire", smoke_origin, w_shotdir, 1 );
+                       Send_Effect_("arc_overheat_fire", smoke_origin, w_shotdir, 1 );
                        if ( !self.arc_smoke_sound )
                        {
                                self.arc_smoke_sound = 1;
@@ -624,7 +624,7 @@ void Arc_Smoke()
        {
                if ( random() < (self.arc_beam.beam_heat-WEP_CVAR(arc, overheat_min)) /
                                ( WEP_CVAR(arc, overheat_max)-WEP_CVAR(arc, overheat_min) ) )
-                       Send_Effect("arc_smoke", smoke_origin, '0 0 0', 1 );
+                       Send_Effect_("arc_smoke", smoke_origin, '0 0 0', 1 );
        }
 
        if (  self.arc_smoke_sound && ( self.arc_overheat <= time ||
@@ -1281,13 +1281,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1306,13 +1306,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; // particleeffectnum("grenadelauncher_muzzleflash");
+                               self.beam_muzzleeffect = -1; // particleeffectnum(EFFECT_GRENADE_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1332,13 +1332,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam_heal");
-                               self.beam_hiteffect = particleeffectnum("arc_beam_healimpact");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL_IMPACT);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1358,13 +1358,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 20;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 0;
                                self.beam_hitlight[3] = 0;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 50;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 0;
@@ -1384,13 +1384,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1410,13 +1410,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1436,13 +1436,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam_heal");
-                               self.beam_hiteffect = particleeffectnum("healray_impact");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL_IMPACT2);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1462,13 +1462,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1496,7 +1496,7 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
index 23cb071ea05bd980d079d70f3d65ff332741c3b8..6234f4a3e1154b1233afa9ee52ad5fd1b0d7f06d 100644 (file)
@@ -96,7 +96,7 @@ void W_Blaster_Attack(
        vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD);
 
        W_SetupShot_Dir(self, s_forward, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_B, atk_damage);
-       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        entity missile = spawn();
        missile.owner = missile.realowner = self;
@@ -275,7 +275,7 @@ bool W_Blaster(int request)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
                        return true;
                }
index 3c13a91db9c39bda54218489bc11b516e5c9bddf..08deaf78c4a81e5ade345c1e9fd8590e5fb194bf 100644 (file)
@@ -258,7 +258,7 @@ void W_Crylink_LinkJoinEffect_Think(void)
                                        e.projectiledeathtype,
                                        other
                                );
-                               Send_Effect("crylink_joinexplode", self.origin, '0 0 0', n);
+                               Send_Effect(EFFECT_CRYLINK_JOINEXPLODE, self.origin, '0 0 0', n);
                        }
                }
        }
@@ -360,7 +360,7 @@ void W_Crylink_Attack(void)
        up = v_up;
 
        shots = WEP_CVAR_PRI(crylink, shots);
-       Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
+       Send_Effect(EFFECT_CRYLINK_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, shots);
        proj = prevproj = firstproj = world;
        for(counter = 0; counter < shots; ++counter)
        {
@@ -469,7 +469,7 @@ void W_Crylink_Attack2(void)
        up = v_up;
 
        shots = WEP_CVAR_SEC(crylink, shots);
-       Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
+       Send_Effect(EFFECT_CRYLINK_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, shots);
        proj = prevproj = firstproj = world;
        for(counter = 0; counter < shots; ++counter)
        {
@@ -700,13 +700,13 @@ bool W_Crylink(int req)
                        org2 = w_org + w_backoff * 2;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_CRYLINK_IMPACT2), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("crylink_impact2"), VOL_BASE, ATTN_NORM);
                        }
                        else
                        {
-                               pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_CRYLINK_IMPACT), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("crylink_impact"), VOL_BASE, ATTN_NORM);
                        }
index e79e38461c4117d365fc666ed8ab0f05b9065d40..9a235bf35d5206b4d5d8fe049aa355d85ad5a50c 100644 (file)
@@ -293,7 +293,7 @@ void W_Devastator_Think(void)
 
                        if(!self.count)
                        {
-                               Send_Effect("rocket_guide", self.origin, self.velocity, 1);
+                               Send_Effect(EFFECT_ROCKET_GUIDE, self.origin, self.velocity, 1);
                                // TODO add a better sound here
                                sound(self.realowner, CH_WEAPON_B, W_Sound("rocket_mode"), VOL_BASE, ATTN_NORM);
                                self.count = 1;
@@ -343,7 +343,7 @@ void W_Devastator_Attack(void)
        W_DecreaseAmmo(WEP_CVAR(devastator, ammo));
 
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 5, W_Sound("rocket_fire"), CH_WEAPON_A, WEP_CVAR(devastator, damage));
-       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
@@ -605,14 +605,14 @@ bool W_Devastator(int req)
                        #if 0
                        if(self.rl_release == 0)
                        {
-                               printf("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo));
+                               LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo));
                                return true;
                        }
                        else
                        {
                                ammo_amount = self.WEP_AMMO(DEVASTATOR) >= WEP_CVAR(devastator, ammo);
                                ammo_amount += self.(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
-                               printf("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: %s\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo), (ammo_amount ? "TRUE" : "FALSE"));
+                               LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: %s\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo), (ammo_amount ? "TRUE" : "FALSE"));
                                return ammo_amount;
                        }
                        #else
@@ -664,7 +664,7 @@ bool W_Devastator(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTN_NORM);
 
index bfe6edc32a63a7f5d8b7fa0e0c3a5939ee1aae38..0f60fd29d3568b6b430ba864ed9c23882e60f9e1 100644 (file)
@@ -260,7 +260,7 @@ void W_Electro_Attack_Bolt(void)
                WEP_CVAR_PRI(electro, damage)
        );
 
-       Send_Effect("electro_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.classname = "electro_bolt";
@@ -360,7 +360,7 @@ void W_Electro_Attack_Orb(void)
 
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       Send_Effect("electro_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        entity proj = spawn();
        proj.classname = "electro_orb";
@@ -580,7 +580,7 @@ bool W_Electro(int req)
                        org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_ELECTRO_BALLEXPLODE), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
                        }
@@ -589,13 +589,13 @@ bool W_Electro(int req)
                                if(w_deathtype & HITTYPE_BOUNCE)
                                {
                                        // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
-                                       pointparticles(particleeffectnum("electro_combo"), org2, '0 0 0', 1);
+                                       pointparticles(particleeffectnum(EFFECT_ELECTRO_COMBO), org2, '0 0 0', 1);
                                        if(!w_issilent)
                                                sound(self, CH_SHOTS, W_Sound("electro_impact_combo"), VOL_BASE, ATTEN_NORM);
                                }
                                else
                                {
-                                       pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1);
+                                       pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), org2, '0 0 0', 1);
                                        if(!w_issilent)
                                                sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
                                }
index 5f426086fac9f09994d519ed07da14fa9f3a2eb2..4f8f3787c3443335c0d91ca11aa72c5648d5b484 100644 (file)
@@ -100,7 +100,7 @@ void W_Fireball_Explode(void)
                                accuracy_add(self.realowner, WEP_FIREBALL.m_id, 0, WEP_CVAR_PRI(fireball, bfgdamage) * points);
 
                        Damage(e, self, self.realowner, WEP_CVAR_PRI(fireball, bfgdamage) * points, self.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, WEP_CVAR_PRI(fireball, bfgforce) * dir);
-                       Send_Effect("fireball_bfgdamage", e.origin, -1 * dir, 1);
+                       Send_Effect(EFFECT_FIREBALL_BFGDAMAGE, e.origin, -1 * dir, 1);
                }
        }
 
@@ -142,8 +142,8 @@ void W_Fireball_LaserPlay(float dt, float dist, float damage, float edgedamage,
                d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, self.origin) - RandomSelection_chosen_ent.fireball_impactvec);
                d = damage + (edgedamage - damage) * (d / dist);
                Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
-               //trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
-               Send_Effect("fireball_laser", self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+               //trailparticles(self, particleeffectnum(EFFECT_FIREBALL_LASER), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
+               Send_Effect(EFFECT_FIREBALL_LASER, self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
        }
 }
 
@@ -184,7 +184,7 @@ void W_Fireball_Attack1(void)
 
        W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 2, W_Sound("fireball_fire2"), CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage));
 
-       Send_Effect("fireball_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.classname = "plasma_prim";
@@ -221,7 +221,7 @@ void W_Fireball_AttackEffect(float i, vector f_diff)
 {
        W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 0, "", 0, 0);
        w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
-       Send_Effect("fireball_preattack_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 }
 
 void W_Fireball_Attack1_Frame4(void)
@@ -320,7 +320,7 @@ void W_Fireball_Attack2(void)
        traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
        w_shotorg = trace_endpos;
 
-       Send_Effect("fireball_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.owner = proj.realowner = self;
@@ -462,7 +462,7 @@ bool W_Fireball(int req)
                        else
                        {
                                org2 = w_org + w_backoff * 16;
-                               pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_FIREBALL_EXPLODE), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM * 0.25); // long range boom
                        }
index 7856d0603d590bcceed725579036078b94e1ea7d..4f1b9058474596b1f1fc148090ed02cfe5488166 100644 (file)
@@ -114,7 +114,7 @@ void W_Hagar_Touch2(void)
                self.use();
        } else {
                self.cnt++;
-               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
+               Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
                self.angles = vectoangles(self.velocity);
                self.owner = world;
                self.projectiledeathtype |= HITTYPE_BOUNCE;
@@ -129,7 +129,7 @@ void W_Hagar_Attack(void)
 
        W_SetupShot(self, false, 2, W_Sound("hagar_fire"), CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage));
 
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -172,7 +172,7 @@ void W_Hagar_Attack2(void)
 
        W_SetupShot(self, false, 2, W_Sound("hagar_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
 
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -224,7 +224,7 @@ void W_Hagar_Attack2_Load_Release(void)
        weapon_prepareattack_do(1, WEP_CVAR_SEC(hagar, refire));
 
        W_SetupShot(self, false, 2, W_Sound("hagar_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        forward = v_forward;
        right = v_right;
@@ -533,7 +533,7 @@ bool W_Hagar(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                        {
                                if(w_random<0.15)
index ebcd5d2f179a776918891eaf8e572d0944468cc9..49685296a86385f6ffad495fff76356406be238f 100644 (file)
@@ -78,7 +78,7 @@ void W_HLAC_Attack(void)
         spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage));
-       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
        if(!autocvar_g_norecoil)
        {
                self.punchangle_x = random() - 0.5;
@@ -126,7 +126,7 @@ void W_HLAC_Attack2(void)
         spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
-       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -291,7 +291,7 @@ bool W_HLAC(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM);
 
index 3af3a486409bd1d3fc14b24f4915bcfcd83158c7..52b60e83bbf2549b5771f482efe3d64baa25de9c 100644 (file)
@@ -74,7 +74,7 @@ void W_HeavyMachineGun_Attack_Auto()
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -178,7 +178,7 @@ bool W_HeavyMachineGun(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                if(w_random < 0.05)
                                        sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_NORM);
index 068805cf31656814cd39ef3893e22603e0c94ff4..6c5519e60b5c8e5eab3768ed900426440c5e5deb 100644 (file)
@@ -345,7 +345,7 @@ bool W_Hook(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_HOOK_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("hookbomb_impact"), VOL_BASE, ATTN_NORM);
 
index cb87ad0725aa97b9f91a8ea6c63464b58c89dc5a..da1eb33a6046cf30fdda57a2a1d7d1de698ba60a 100644 (file)
@@ -119,7 +119,7 @@ void W_MachineGun_Attack(int deathtype)
        else
                fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), deathtype, 0);
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -192,7 +192,7 @@ void W_MachineGun_Attack_Auto(void)
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -215,7 +215,7 @@ void W_MachineGun_Attack_Burst(void)
 
        fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, 0);
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -378,7 +378,7 @@ bool W_MachineGun(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                if(w_random < 0.05)
                                        sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTN_NORM);
index d8f0a48e3be1d2689e448e0dc0514ae688d028fc..8048957bce8ab958dab25b557a0c55128b8daf86 100644 (file)
@@ -328,7 +328,7 @@ void W_MineLayer_Attack(void)
        W_DecreaseAmmo(WEP_CVAR(minelayer, ammo));
 
        W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 5, W_Sound("mine_fire"), CH_WEAPON_A, WEP_CVAR(minelayer, damage));
-       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        mine = WarpZone_RefSys_SpawnSameRefSys(self);
        mine.owner = mine.realowner = self;
@@ -600,7 +600,7 @@ bool W_MineLayer(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("mine_exp"), VOL_BASE, ATTN_NORM);
 
index 64bd3d97c93c7cc95f59f427fee07b3a8d891964..850a6c342fb4e2a6d0a4d47d552ab611e473bc9b 100644 (file)
@@ -151,7 +151,7 @@ void W_Mortar_Grenade_Touch1(void)
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce5"), VOL_BASE, ATTN_NORM);
                else
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce6"), VOL_BASE, ATTN_NORM);
-               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
+               Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
        }
@@ -196,7 +196,7 @@ void W_Mortar_Grenade_Touch2(void)
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce5"), VOL_BASE, ATTN_NORM);
                else
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce6"), VOL_BASE, ATTN_NORM);
-               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
+               Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
 
@@ -231,7 +231,7 @@ void W_Mortar_Attack(void)
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, W_Sound("grenade_fire"), CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.owner = gren.realowner = self;
@@ -280,7 +280,7 @@ void W_Mortar_Attack2(void)
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, W_Sound("grenade_fire"), CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.owner = gren.realowner = self;
@@ -468,7 +468,7 @@ bool W_Mortar(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_GRENADE_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("grenade_impact"), VOL_BASE, ATTN_NORM);
 
index 6d31708b43535fd7a08b2db741a72ecbb798543b..2d08c0fcfd2e553de3db16996b6eb07feb353ded 100644 (file)
@@ -243,7 +243,7 @@ void W_Porto_Attack(float type)
        w_shotdir = v_forward;
        w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
 
-       //Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       //Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.cnt = type;
@@ -411,7 +411,7 @@ bool W_Porto(int req)
        {
                case WR_IMPACTEFFECT:
                {
-                       print("Since when does Porto send DamageInfo?\n");
+                       LOG_INFO("Since when does Porto send DamageInfo?\n");
                        return true;
                }
                case WR_INIT:
index a879bf342330defec4aca88d858bf61446e6e577..ef3babd8723c24128b30f9a6ff813fb676c0c1b9 100644 (file)
@@ -59,7 +59,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolid
 
        W_SetupShot(self, true, 2, pSound, CH_WEAPON_A, pDamage * pShots);
 
-       Send_Effect("rifle_muzzleflash", w_shotorg, w_shotdir * 2000, 1);
+       Send_Effect(EFFECT_RIFLE_MUZZLEFLASH, w_shotorg, w_shotdir * 2000, 1);
 
        if(self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) // if zoomed, shoot from the eye
        {
@@ -96,7 +96,7 @@ void W_Rifle_BulletHail_Continue(void)
        af = ATTACK_FINISHED(self);
        self.switchweapon = self.weapon;
        ATTACK_FINISHED(self) = time;
-       print(ftos(self.WEP_AMMO(RIFLE)), "\n");
+       LOG_INFO(ftos(self.WEP_AMMO(RIFLE)), "\n");
        r = weapon_prepareattack(self.rifle_bullethail_frame == WFRAME_FIRE2, self.rifle_bullethail_refire);
        if(self.switchweapon == self.weapon)
                self.switchweapon = sw;
@@ -104,12 +104,12 @@ void W_Rifle_BulletHail_Continue(void)
        {
                self.rifle_bullethail_attackfunc();
                weapon_thinkf(self.rifle_bullethail_frame, self.rifle_bullethail_animtime, W_Rifle_BulletHail_Continue);
-               print("thinkf set\n");
+               LOG_INFO("thinkf set\n");
        }
        else
        {
                ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time
-               print("out of ammo... ", ftos(self.weaponentity.state), "\n");
+               LOG_INFO("out of ammo... ", ftos(self.weaponentity.state), "\n");
        }
 }
 
@@ -273,7 +273,7 @@ bool W_Rifle(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_RIFLE_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                        {
                                if(w_random < 0.2)
index de051d9870a00404af4e817b8be4a26d952ee1a3..8a34490e28c0760b91f07994c7dcde7907fb823a 100644 (file)
@@ -109,7 +109,7 @@ void W_RocketPropelledChainsaw_Attack (void)
 
        W_DecreaseAmmo(WEP_CVAR(rpc, ammo));
        W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', false, 5, W_Sound("rocket_fire"), CH_WEAPON_A, WEP_CVAR(rpc, damage));
-       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
        PROJECTILE_MAKETRIGGER(missile);
 
        missile.owner = missile.realowner = self;
@@ -241,7 +241,7 @@ bool W_RocketPropelledChainsaw(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
 
index 71938bfcc5d93b2644572fb53a4e41c33ad8c4f0..69c4974de666df4ac72f24dd5a759c4be0457f5a 100644 (file)
@@ -252,7 +252,7 @@ void W_Seeker_Fire_Missile(vector f_diff, entity m_target)
        makevectors(self.v_angle);
        W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, W_Sound("seeker_fire"), CH_WEAPON_A, 0);
        w_shotorg += f_diff;
-       Send_Effect("seeker_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_SEEKER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        //self.detornator         = false;
 
@@ -344,7 +344,7 @@ void W_Seeker_Fire_Flac(void)
        W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, W_Sound("flac_fire"), CH_WEAPON_A, WEP_CVAR(seeker, flac_damage));
        w_shotorg += f_diff;
 
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile                                 = spawn();
        missile.owner                   = missile.realowner = self;
@@ -743,7 +743,7 @@ bool W_Seeker(int req)
                                }
                                else
                                {
-                                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                                       pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
                                        if(!w_issilent)
                                        {
                                                if(w_random<0.15)
@@ -757,7 +757,7 @@ bool W_Seeker(int req)
                        }
                        else
                        {
-                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
                                if(!w_issilent)
                                {
                                        if(w_random<0.15)
index 40faf04025ea6fd51d60e2c4b5cac01ad3f9c518..3287ea3cb366e88a61cf9cca8d1a96fc67b81971 100644 (file)
@@ -189,7 +189,7 @@ void W_Shockwave_Melee_Think(void)
                                { accuracy_add(self.realowner, WEP_SHOCKWAVE.m_id, 0, swing_damage); }
 
                        #ifdef DEBUG_SHOCKWAVE
-                       print(sprintf(
+                       LOG_INFO(sprintf(
                                "MELEE: %s hitting %s with %f damage (factor: %f) at %f time.\n",
                                self.realowner.netname,
                                target_victim.netname,
@@ -462,7 +462,7 @@ void W_Shockwave_Attack(void)
                                );
 
                                #ifdef DEBUG_SHOCKWAVE
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "SELF HIT: multiplier = %f, damage = %f, force = %f... "
                                        "multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
                                        multiplier,
@@ -525,7 +525,7 @@ void W_Shockwave_Attack(void)
                                if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); }
 
                                #ifdef DEBUG_SHOCKWAVE
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "SPLASH HIT: multiplier = %f, damage = %f, force = %f... "
                                        "multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
                                        multiplier,
@@ -614,7 +614,7 @@ void W_Shockwave_Attack(void)
                                if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); }
 
                                #ifdef DEBUG_SHOCKWAVE
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "BLAST HIT: multiplier = %f, damage = %f, force = %f... "
                                        "multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
                                        multiplier,
@@ -647,12 +647,12 @@ void W_Shockwave_Attack(void)
 
                if(accuracy_isgooddamage(self.realowner, head))
                {
-                       print("wtf\n");
+                       LOG_INFO("wtf\n");
                        accuracy_add(self.realowner, WEP_SHOCKWAVE.m_id, 0, final_damage);
                }
 
                #ifdef DEBUG_SHOCKWAVE
-               print(sprintf(
+               LOG_INFO(sprintf(
                        "SHOCKWAVE by %s: damage = %f, force = %f.\n",
                        self.netname,
                        final_damage,
@@ -874,7 +874,7 @@ bool W_Shockwave(int req)
                        // handled by Net_ReadShockwaveParticle
                        //vector org2;
                        //org2 = w_org + w_backoff * 2;
-                       //pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                       //pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        return false;
                }
                case WR_INIT:
index 1c20423df3b4871551e57995599dbe36e785d363..9024bbfa1f70e36b57db17674bf6498f7c5e6d0a 100644 (file)
@@ -65,7 +65,7 @@ void W_Shotgun_Attack(float isprimary)
        for(sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1)
                fireBullet(w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN.m_id, 0);
 
-       Send_Effect("shotgun_muzzleflash", w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
+       Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
 
        // casing code
        if(autocvar_g_casings >= 1)
@@ -359,7 +359,7 @@ float W_Shotgun(float req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("shotgun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_SHOTGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent && time - self.prevric > 0.25)
                        {
                                if(w_random < 0.0165)
index bd9dff50e743e3703b2e75f21c22ef5bf379118c..686c89ec3a7f6f0dae6a0fe3ed8c0761735b6555 100644 (file)
@@ -363,7 +363,7 @@ void W_Tuba_NoteOn(float hittype)
        o = gettaginfo(self.exteriorweaponentity, 0);
        if(time > self.tuba_smoketime)
        {
-               Send_Effect("smoke_ring", o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
+               Send_Effect(EFFECT_SMOKE_RING, o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
                self.tuba_smoketime = time + 0.25;
        }
 }
@@ -454,7 +454,7 @@ bool W_Tuba(int req)
                                                break;
                                }
                                W_SetupShot(self, false, 0, "", 0, 0);
-                               Send_Effect("teleport", w_shotorg, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, w_shotorg, '0 0 0', 1);
                                self.weaponentity.state = WS_INUSE;
                                weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready);
                        }
index c5dd7826b6afa3cebf06773e09ad4de909deb3dc..f61960594a69cef4040fceb65694487c7bc700fe 100644 (file)
@@ -76,7 +76,7 @@ void W_Vaporizer_Attack(void)
 
        self.vaporizer_lasthit = damage_goodhits;
 
-       Send_Effect("nex_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        // teamcolor / hit beam effect
        vector v;
@@ -85,33 +85,33 @@ void W_Vaporizer_Attack(void)
        {
                case NUM_TEAM_1:   // Red
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3RED_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_RED_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3RED", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_RED, w_shotorg, v, 1);
                        break;
                case NUM_TEAM_2:   // Blue
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3BLUE_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_BLUE_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3BLUE", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_BLUE, w_shotorg, v, 1);
                        break;
                case NUM_TEAM_3:   // Yellow
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3YELLOW_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_YELLOW_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3YELLOW", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_YELLOW, w_shotorg, v, 1);
                        break;
                case NUM_TEAM_4:   // Pink
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3PINK_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_PINK_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3PINK", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_PINK, w_shotorg, v, 1);
                        break;
                default:
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3_HIT", w_shotorg, v, 1);
+                               Send_Effect_("TE_TEI_G3_HIT", w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3", w_shotorg, v, 1);
+                               Send_Effect_("TE_TEI_G3", w_shotorg, v, 1);
                        break;
        }
 
@@ -266,12 +266,12 @@ float W_Vaporizer(float req)
                        org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
                        }
                        else
                        {
-                               pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM); }
                        }
                        return true;
index d47cebde462504361bf615f0fcf20589f70e116c..3aa17e526d566f02734a72dd2d9cb7cbb753a35a 100644 (file)
@@ -327,7 +327,7 @@ bool W_Vortex(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM);
 
index 7cb3c2852244f53aa105f4d771864a4432990867..3d5f9a00cbc0679eb0cdc0234a87a3c43189e6db 100644 (file)
@@ -177,7 +177,7 @@ void CSQCPlayer_PredictTo(float endframe, float apply_error)
        {
                csqcplayer_moveframe = clientcommandframe;
                getinputstate(csqcplayer_moveframe-1);
-               print("the Weird code path got hit\n");
+               LOG_INFO("the Weird code path got hit\n");
                return;
        }
 #endif
index b42292c8523812c82b44a2c7df68e8b4e490ebc8..f48df8e5ccd3c1218334bd1bc825708f8382161c 100644 (file)
@@ -10,6 +10,8 @@
 
 #define spawn _spawn
 
+#define particleeffectnum _particleeffectnum
+
 #include "upstream/csprogsdefs.qc"
 
 #undef true
@@ -19,6 +21,8 @@
 
 #undef spawn
 
+#undef particleeffectnum
+
 #pragma noref 0
 
 #define ReadFloat() ReadCoord()
index 2487da4ff357a8751c3ab8e643ce0168ad02c47a..7b437082f191096ac3aadd7b2bfc6583b50c3eae 100644 (file)
@@ -3,13 +3,16 @@
 
 #pragma noref 1
 
+#define particleeffectnum __particleeffectnum
+
 #include "upstream/dpextensions.qc"
 
+#undef particleeffectnum
+
 int(entity ent, string tagname) _gettagindex = #451;
 #define gettagindex _gettagindex
 
 int(string effectname) _particleeffectnum = #335;
-#define particleeffectnum _particleeffectnum
 
 int(string s, string separator1, ...) _tokenizebyseparator = #479;
 #define tokenizebyseparator _tokenizebyseparator
diff --git a/qcsrc/lib/Bool.qh b/qcsrc/lib/Bool.qh
new file mode 100644 (file)
index 0000000..26169cd
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef BOOL_H
+#define BOOL_H
+
+#ifndef QCC_SUPPORT_BOOL
+    #define bool float
+
+    // Boolean Constants
+    const int true     = 1;
+    const int false = 0;
+#endif
+
+// Transitional aliases
+[[deprecated("use true")]] [[alias("true")]] const bool TRUE;
+[[deprecated("use false")]] [[alias("false")]] const bool FALSE;
+
+// get true/false value of a string with multiple different inputs
+float InterpretBoolean(string input)
+{
+    switch (strtolower(input))
+    {
+        case "yes":
+        case "true":
+        case "on":
+            return true;
+
+        case "no":
+        case "false":
+        case "off":
+            return false;
+
+        default: return stof(input);
+    }
+}
+
+float boolean(float value) { // if value is 0 return false (0), otherwise return true (1)
+    return (value == 0) ? false : true;
+}
+
+#endif
index ba432ad2a08cfa4f2b4833722ca1bc9190e6e018..4e0b12f255dbea477471c539aadd46dad8bdd648 100644 (file)
@@ -1,3 +1,5 @@
+#include "Bool.qh"
+
 #include "../warpzonelib/mathlib.qc"
 
 #include "Accumulate.qh"
index 975080a71a2de0f85c4857f1d6787f43c14e1121..4f588226912d92dbeba82543617734b952aa056a 100644 (file)
@@ -11,7 +11,7 @@ float prandom()
        prandom_seed = c;
 
 #ifdef USE_PRANDOM_DEBUG
-       dprint("RANDOM -> ", ftos(c), "\n");
+       LOG_TRACE("RANDOM -> ", ftos(c), "\n");
 #endif
 
        return c / 65536; // in [0..1[
@@ -36,14 +36,14 @@ void psrandom(float seed)
 {
        prandom_seed = seed;
 #ifdef USE_PRANDOM_DEBUG
-       dprint("SRANDOM ", ftos(seed), "\n");
+       LOG_TRACE("SRANDOM ", ftos(seed), "\n");
 #endif
 }
 
 #ifdef USE_PRANDOM_DEBUG
 void prandom_debug()
 {
-       dprint("Current random seed = ", ftos(prandom_seed), "\n");
+       LOG_TRACE("Current random seed = ", ftos(prandom_seed), "\n");
 }
 #endif
 #endif
index 04f9f68fe967356327968ae4d1d99168cee88c5d..23907fe5f15ed4106c69fae466807abd79fe2911 100644 (file)
@@ -5,7 +5,7 @@ float TEST_ok;
 
 void TEST_Fail(string cond)
 {
-       printf("Assertion failed: ", cond);
+       LOG_INFOF("Assertion failed: ", cond);
        //backtrace();
        ++TEST_failed;
 }
@@ -28,29 +28,29 @@ float TEST_RunAll()
        }
        if(f)
        {
-               printf("%d tests failed\n", f);
+               LOG_INFOF("%d tests failed\n", f);
                return 1;
        }
        else
        {
-               printf("All tests OK\n", f);
+               LOG_INFOF("All tests OK\n", f);
                return 0;
        }
 }
 
 float TEST_Run(string s)
 {
-       printf("%s: testing...\n", s);
+       LOG_INFOF("%s: testing...\n", s);
        TEST_failed = TEST_ok = 0;
        callfunction(strcat("_TEST_", s));
        if(TEST_failed > 0)
        {
-               printf("%s: %d items failed.\n", s, TEST_failed);
+               LOG_INFOF("%s: %d items failed.\n", s, TEST_failed);
                return 0;
        }
        else if(!TEST_ok)
        {
-               printf("%s: did not complete.\n", s);
+               LOG_INFOF("%s: did not complete.\n", s);
                return 0;
        }
        return 1;
index ce8de504b028f8c1ff654b632e196f1b86633512..9648b2080f5abb0cae734a96d3a220dcd93ae5c2 100644 (file)
@@ -35,7 +35,7 @@ float url_URI_Get_Callback(int id, float status, string data)
                return 0;
        if(e.url_rbuf >= 0 || e.url_wbuf >= 0)
        {
-               printf("WARNING: handle %d (%s) has already received data?!?\n", id + NUM_URL_ID, e.url_url);
+               LOG_INFOF("WARNING: handle %d (%s) has already received data?!?\n", id + NUM_URL_ID, e.url_url);
                return 0;
        }
 
@@ -54,7 +54,7 @@ float url_URI_Get_Callback(int id, float status, string data)
                e.url_rbuf = buf_create();
                if(e.url_rbuf < 0)
                {
-                       print("url_URI_Get_Callback: out of memory in buf_create\n");
+                       LOG_INFO("url_URI_Get_Callback: out of memory in buf_create\n");
                        e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
                        strunzone(e.url_url);
                        remove(e);
@@ -63,7 +63,7 @@ float url_URI_Get_Callback(int id, float status, string data)
                e.url_rbufpos = 0;
                if(e.url_rbuf < 0)
                {
-                       print("url_URI_Get_Callback: out of memory in buf_create\n");
+                       LOG_INFO("url_URI_Get_Callback: out of memory in buf_create\n");
                        e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
                        strunzone(e.url_url);
                        remove(e);
@@ -105,7 +105,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                e.url_wbuf = buf_create();
                                if(e.url_wbuf < 0)
                                {
-                                       print("url_single_fopen: out of memory in buf_create\n");
+                                       LOG_INFO("url_single_fopen: out of memory in buf_create\n");
                                        rdy(e, pass, URL_READY_ERROR);
                                        strunzone(e.url_url);
                                        remove(e);
@@ -132,7 +132,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                                        break;
                                        if(i >= autocvar__urllib_nextslot)
                                        {
-                                               print("url_single_fopen: too many concurrent requests\n");
+                                               LOG_INFO("url_single_fopen: too many concurrent requests\n");
                                                rdy(NULL, pass, URL_READY_ERROR);
                                                return;
                                        }
@@ -141,7 +141,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                // GET the data
                                if(!crypto_uri_postbuf(url, i + MIN_URL_ID, string_null, string_null, -1, 0))
                                {
-                                       print("url_single_fopen: failure in crypto_uri_postbuf\n");
+                                       LOG_INFO("url_single_fopen: failure in crypto_uri_postbuf\n");
                                        rdy(NULL, pass, URL_READY_ERROR);
                                        return;
                                }
@@ -179,7 +179,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                rdy(e, pass, URL_READY_CANWRITE);
                                break;
                        case FILE_READ:
-                               print("url_single_fopen: cannot open '-' for reading\n");
+                               LOG_INFO("url_single_fopen: cannot open '-' for reading\n");
                                rdy(NULL, pass, URL_READY_ERROR);
                                break;
                }
@@ -235,7 +235,7 @@ void url_fclose(entity e)
                                                break;
                                if(i >= autocvar__urllib_nextslot)
                                {
-                                       print("url_fclose: too many concurrent requests\n");
+                                       LOG_INFO("url_fclose: too many concurrent requests\n");
                                        e.url_ready(e,e.url_ready_pass, URL_READY_ERROR);
                                        buf_del(e.url_wbuf);
                                        strunzone(e.url_url);
@@ -247,7 +247,7 @@ void url_fclose(entity e)
                        // POST the data
                        if(!crypto_uri_postbuf(e.url_url, i + MIN_URL_ID, "text/plain", "", e.url_wbuf, 0))
                        {
-                               print("url_fclose: failure in crypto_uri_postbuf\n");
+                               LOG_INFO("url_fclose: failure in crypto_uri_postbuf\n");
                                e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
                                buf_del(e.url_wbuf);
                                strunzone(e.url_url);
@@ -328,7 +328,7 @@ void url_fputs(entity e, string s)
        else if(e.url_fh == URL_FH_STDOUT)
        {
                // stdout
-               print(s);
+               LOG_INFO(s);
        }
        else
        {
@@ -345,7 +345,7 @@ void url_multi_ready(entity fh, entity me, float status)
        {
                if(status == -422) // Unprocessable Entity
                {
-                       print("uri_multi_ready: got HTTP error 422, data is in unusable format - not continuing\n");
+                       LOG_INFO("uri_multi_ready: got HTTP error 422, data is in unusable format - not continuing\n");
                        me.url_ready(fh, me.url_ready_pass, status);
                        strunzone(me.url_url);
                        remove(me);
@@ -371,7 +371,7 @@ void url_multi_fopen(string url, int mode, url_ready_func rdy, entity pass)
        n = tokenize_console(url);
        if(n <= 0)
        {
-               print("url_multi_fopen: need at least one URL\n");
+               LOG_INFO("url_multi_fopen: need at least one URL\n");
                rdy(NULL, pass, URL_READY_ERROR);
                return;
        }
index 3f3f72f5753f61a291966d325f64ea0481d53bd3..8b12a7b7ddbe6289b0f722ed661ab468a954a9ea 100644 (file)
@@ -16,21 +16,21 @@ void _dumptree_open(entity pass, entity me)
                s = me.classname;
        else
                s = strcat(me.classname, ": ", s);
-       print(_dumptree_space, etos(me), " (", s, ")");
+       LOG_INFO(_dumptree_space, etos(me), " (", s, ")");
        if(me.firstChild)
        {
-               print(" {\n");
+               LOG_INFO(" {\n");
                _dumptree_space = strcat(_dumptree_space, "  ");
        }
        else
-               print("\n");
+               LOG_INFO("\n");
 }
 void _dumptree_close(entity pass, entity me)
 {
        if(me.firstChild)
        {
                _dumptree_space = substring(_dumptree_space, 0, strlen(_dumptree_space) - 2);
-               print(_dumptree_space, "}\n");
+               LOG_INFO(_dumptree_space, "}\n");
        }
 }
 
@@ -43,11 +43,11 @@ void GameCommand(string theCommand)
 
        if(argv(0) == "help" || argc == 0)
        {
-               print(_("Usage: menu_cmd command..., where possible commands are:\n"));
-               print(_("  sync - reloads all cvars on the current menu page\n"));
-               print(_("  directmenu ITEM - select a menu item as main item\n"));
+               LOG_INFO(_("Usage: menu_cmd command..., where possible commands are:\n"));
+               LOG_INFO(_("  sync - reloads all cvars on the current menu page\n"));
+               LOG_INFO(_("  directmenu ITEM - select a menu item as main item\n"));
 
-               print("\nGeneric commands shared by all programs:\n");
+               LOG_INFO("\nGeneric commands shared by all programs:\n");
                GenericCommand_macro_help();
 
                return;
@@ -76,7 +76,7 @@ void GameCommand(string theCommand)
 
                if(argc == 1)
                {
-                       print(_("Available options:\n"));
+                       LOG_INFO(_("Available options:\n"));
                        float i;
                        entity e;
                        string s;
@@ -91,7 +91,7 @@ void GameCommand(string theCommand)
                                                        continue;
                                                s = substring(s, strlen(filter), strlen(s) - strlen(filter));
                                        }
-                                       print(strcat(" ", s ,"\n"));
+                                       LOG_INFO(strcat(" ", s ,"\n"));
                                        ++i;
                                }
                }
@@ -130,5 +130,5 @@ void GameCommand(string theCommand)
                return;
        }
 
-       print(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));
+       LOG_INFO(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));
 }
index 2796c05706d0647662ebff6c4dafd88ac5c24b7b..7edc6eff50d8a4c172371d19c026e10fecba6b46 100644 (file)
@@ -281,7 +281,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
 void draw_Text(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz)
 {
        if(theSize.x <= 0 || theSize.y <= 0) {
-               dprint("Drawing zero size text?\n");
+               LOG_TRACE("Drawing zero size text?\n");
                return;
        }
 
index 45a5a7fac44461aefa6e9e5984d0f1ae80a22050..e02642f69d54da9d134db6acb898c470c87a237f 100644 (file)
@@ -81,7 +81,7 @@ void Label_recalcPositionWithText(entity me, string t)
                        me.realOrigin_x = me.keepspaceLeft;
                if(!me.overrideCondenseFactor)
                        me.condenseFactor = spaceAvail / spaceUsed;
-               dprintf("NOTE: label text %s too wide for label, condensed by factor %f\n", t, me.condenseFactor);
+               LOG_TRACEF("NOTE: label text %s too wide for label, condensed by factor %f\n", t, me.condenseFactor);
        }
 
        if(!me.overrideRealOrigin_y)
index d01f6f7d4d0d2f986a288f1de66b2948219ba777..89966dde15a41a017a70e7fef9b09e8bc8c50c5e 100644 (file)
@@ -63,7 +63,7 @@ void m_init()
        cvar_set("_menu_prvm_language", prvm_language);
 
 #ifdef WATERMARK
-       dprintf("^4MQC Build information: ^1%s\n", WATERMARK);
+       LOG_TRACEF("^4MQC Build information: ^1%s\n", WATERMARK);
 #endif
 
        // list all game dirs (TEST)
@@ -76,7 +76,7 @@ void m_init()
                        s = getgamedirinfo(i, GETGAMEDIRINFO_NAME);
                        if (!s)
                                break;
-                       dprint(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
+                       LOG_TRACE(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
                }
        }
 
@@ -252,7 +252,7 @@ void m_keyup (float key, float ascii)
                if(mouseButtonsPressed < 0)
                {
                        mouseButtonsPressed = 0;
-                       dprint("Warning: released an already released button\n");
+                       LOG_TRACE("Warning: released an already released button\n");
                }
        }
        if(key == K_ALT) menuShiftState -= (menuShiftState & S_ALT);
@@ -303,7 +303,7 @@ void m_keydown(float key, float ascii)
                if(mouseButtonsPressed > 10)
                {
                        mouseButtonsPressed = 10;
-                       dprint("Warning: pressed an already pressed button\n");
+                       LOG_TRACE("Warning: pressed an already pressed button\n");
                }
        }
        if(key == K_ALT) menuShiftState |= S_ALT;
index 10c81e7ef34bbec061df61789857970764025c1f..ebb622b0a1ecb89e9eb8c599362515576344a609 100644 (file)
@@ -20,7 +20,7 @@
 //#define SKINSTRING(name,def) case #name: break
 #define SKINSTRING(name,def) case #name: SKIN##name = strzone(_value); break
        // I know this leaks memory when skin is read multiple times. Screw it.
-#define SKINEND case "": break; case "//": break; default: dprint("Invalid key in skin file: ", key, "\n"); } }
+#define SKINEND case "": break; case "//": break; default: LOG_TRACE("Invalid key in skin file: ", key, "\n"); } }
 #include "skin-customizables.inc"
 #undef SKINEND
 #undef SKINSTRING
index a9379e7e83643a74d4c7d07fc0a3916cd47b4b00..843acad9082f9db87c3a828bbd70f145409eca3c 100644 (file)
@@ -345,7 +345,7 @@ void MapList_LoadMap(entity btn, entity me)
        m = MapInfo_BSPName_ByID(i);
        if (!m)
        {
-               print(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
+               LOG_INFO(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
                me.refilter(me);
                return;
        }
@@ -358,7 +358,7 @@ void MapList_LoadMap(entity btn, entity me)
        }
        else
        {
-               print(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
+               LOG_INFO(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
                me.refilter(me);
                return;
        }
index c72db26bbae9ab7c1730bbd2426714772e64352c..8aa5c105e895d097c955f787bb844b0349460848 100644 (file)
@@ -206,7 +206,7 @@ void RegisterSLCategories()
                                } \
                                else \
                                { \
-                                       printf( \
+                                       LOG_INFOF( \
                                                "RegisterSLCategories(): Improper override '%s' for category '%s'!\n", \
                                                s, \
                                                categories[i].cat_name \
@@ -373,7 +373,7 @@ int CheckCategoryForEntry(int entry)
                        case "cts":
                        case "xdf": { return CAT_DEFRAG; }
 
-                       default: { dprintf("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; }
+                       default: { LOG_TRACEF("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; }
                }
        }
 
index 1a5f754db83221e8f3e15bc8f55b788bb736097a..c849254e8b85c66a925a5f2d8bcdc28b1d285bbb 100644 (file)
@@ -111,7 +111,7 @@ void XonoticSkinList_getSkins(entity me)
                fh = fopen(language_filename(s), FILE_READ);
                if(fh < 0)
                {
-                       print("Warning: can't open skinvalues.txt file\n");
+                       LOG_INFO("Warning: can't open skinvalues.txt file\n");
                        continue;
                }
                while((s = fgets(fh)))
index b40488ef4b9b100247a672dce46ba1cd21549fb9..eabbaf16d5d5c6f376048a3df0bb51be1dcd2dbf 100644 (file)
@@ -98,7 +98,7 @@ void _TEST_XonoticDecibelsSlider()
                float v = fromDecibelOfSquare(db, -40);
                float dbv = toDecibelOfSquare(v, -40);
                float d = dbv - db;
-               printf("%f -> %f -> %f (diff: %f)\n", db, v, dbv, d);
+               LOG_INFOF("%f -> %f -> %f (diff: %f)\n", db, v, dbv, d);
                TEST_Check(fabs(d) > 0.02);
        }
        TEST_OK();
index 1857621b4902be90e9499c508a92c48328801c3c..93291ea1d35654fcea58258a24161c6a90ef1310 100644 (file)
@@ -57,8 +57,8 @@ float updateConwidths(float width, float height, float pixelheight)
 
        minfactor = min(1, 640 / c.x);            // can be > 1 only if c_x is <640
        maxfactor = max(1, r.x / c.x, r.y / c.y); // can be < 1 only if r_x < c_x and r_y < c_y
-       dprint("min factor: ", ftos(minfactor), "\n");
-       dprint("max factor: ", ftos(maxfactor), "\n");
+       LOG_TRACE("min factor: ", ftos(minfactor), "\n");
+       LOG_TRACE("max factor: ", ftos(maxfactor), "\n");
 
        if(sz < 0)
                f = 1 - (maxfactor - 1) * sz;
@@ -166,7 +166,7 @@ void XonoticResolutionSlider_loadResolutions(entity me, float fullscreen)
                r = getresolution(-1);
                if(r.x != 0 || r.y != 0)
                        me.addResolution(me, r.x, r.y, r.z);
-               dprint("Added system resolutions.\n");
+               LOG_TRACE("Added system resolutions.\n");
        }
 
        if(me.nValues == 0)
@@ -201,9 +201,9 @@ void XonoticResolutionSlider_loadResolutions(entity me, float fullscreen)
                me.addResolution(me, 1280, 960, 1); // pc res
                me.addResolution(me, 1280, 1024, 1); // pc res
                me.addResolution(me, 1920, 1080, 1); // 1080p
-               dprint("Added default resolutions.\n");
+               LOG_TRACE("Added default resolutions.\n");
        }
-       dprint("Total number of resolutions detected: ", ftos(me.nValues), "\n");
+       LOG_TRACE("Total number of resolutions detected: ", ftos(me.nValues), "\n");
 
        me.vid_fullscreen = fullscreen;
 
index 3c4b09e1463b6489ab69e04fa2bd2324b459a432..4a6e03f28e91c44314817782c3f0a20f5aa5576c 100644 (file)
@@ -81,7 +81,7 @@ string XonoticStatsList_convertDate(string input)
 
 void XonoticStatsList_getStats(entity me)
 {
-       dprint("XonoticStatsList_getStats() at time: ", ftos(time), "\n");
+       LOG_TRACE("XonoticStatsList_getStats() at time: ", ftos(time), "\n");
        // delete the old buffer if it exists
        if(me.listStats >= 0)
                buf_del(me.listStats);
index a5fa9da4760e89cea5a872aed9ef95e6ee9c0b8e..d2bf9c92023e67891226a2eef6d8a2ee4f8f1a32 100644 (file)
@@ -46,7 +46,7 @@ string getZonedTooltipForIdentifier(string s)
                if(t != "" && t != "custom cvar")
                        return strzone(t);
        }
-       dprint("WARNING: no tooltip set for ", s, "\n");
+       LOG_TRACE("WARNING: no tooltip set for ", s, "\n");
        return string_null;
 }
 
@@ -303,7 +303,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               printf("Received HTTP request data for an invalid id %d.\n", id);
+               LOG_INFOF("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
@@ -318,22 +318,22 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
 
        if(_Nex_ExtResponseSystem_UpdateTo)
        {
-               dprint("error: UpdateNotification_URI_Get_Callback has been called before\n");
+               LOG_TRACE("error: UpdateNotification_URI_Get_Callback has been called before\n");
                return;
        }
        if(status != 0)
        {
-               dprintf("error receiving update notification: status is %d\n", status);
+               LOG_TRACEF("error receiving update notification: status is %d\n", status);
                return;
        }
        if(substring(data, 0, 1) == "<")
        {
-               dprint("error: received HTML instead of an update notification\n");
+               LOG_TRACE("error: received HTML instead of an update notification\n");
                return;
        }
        if(strstrofs(data, "\r", 0) != -1)
        {
-               dprint("error: received carriage returns from update notification server\n");
+               LOG_TRACE("error: received carriage returns from update notification server\n");
                return;
        }
 
@@ -411,7 +411,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                {
                        // update needed
                        _Nex_ExtResponseSystem_UpdateTo = strzone(un_version);
-                       if(un_download) { printf(_("Update can be downloaded at:\n%s\n"), un_download); }
+                       if(un_download) { LOG_INFOF(_("Update can be downloaded at:\n%s\n"), un_download); }
                        if(un_url) { _Nex_ExtResponseSystem_UpdateToURL = strzone(un_url); }
                        DisableServerBackwardsCompatibility();
                }
@@ -642,7 +642,7 @@ float updateCompression()
                cvar_set("gl_texturecompression", "1");
                cvar_set("r_texture_dds_load", "1");
                if(!can_dds)
-                       print(_("^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems.\n"));
+                       LOG_INFO(_("^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems.\n"));
                return 0;
        }
        else
@@ -809,7 +809,7 @@ void CheckSendCvars(entity me, string cvarnamestring)
 {
        if(me.sendCvars)
        {
-               printf("Sending cvar: %s -> %s\n", cvarnamestring, cvar_string(cvarnamestring));
+               LOG_INFOF("Sending cvar: %s -> %s\n", cvarnamestring, cvar_string(cvarnamestring));
                if(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
                {
                        cmd(sprintf("\nsendcvar %s\n", cvarnamestring));
index 6ec1756ed643851ff2ed574822960e63a2e798f3..f874b616b25a8045311c028bf9abde739d1f84e7 100644 (file)
@@ -1,4 +1,4 @@
-void dprint(string s, ...) = #25;
+void LOG_TRACE(string s, ...) = #25;
 string ftos(float f) = #26;
 string vtos(vector v) = #27;
 void error(string e) = #10;
@@ -7,7 +7,7 @@ float test();
 void spawnfunc_worldspawn()
 {
        float r;
-       dprint("TESTCASE: START\n");
+       LOG_TRACE("TESTCASE: START\n");
        r = test();
        if(r == 1)
                error("TESTCASE: PASS");
index 9d226486921a994eb0100fb682aa350d75670a28..37d4bfdd8357e30283d1edb324ab3d0933f8d8c1 100644 (file)
@@ -686,6 +686,7 @@ bool autocvar_g_monsters_sounds;
 float autocvar_g_monsters_think_delay;
 int autocvar_g_monsters_max;
 int autocvar_g_monsters_max_perplayer;
+float autocvar_g_monsters_damageforcescale = 0.8;
 float autocvar_g_monsters_target_range;
 bool autocvar_g_monsters_target_infront;
 float autocvar_g_monsters_attack_range;
@@ -701,6 +702,8 @@ bool autocvar_g_monsters_teams;
 float autocvar_g_monsters_respawn_delay;
 bool autocvar_g_monsters_respawn;
 float autocvar_g_monsters_armor_blockpercent;
+float autocvar_g_monsters_healthbars;
+float autocvar_g_monsters_lineofsight;
 float autocvar_g_touchexplode_radius;
 float autocvar_g_touchexplode_damage;
 float autocvar_g_touchexplode_edgedamage;
index e0dbdae26875b5537345ccd77ad359ec56998e45..5549778be82c2f50ce7928b3e5fe5e6bd6f52557 100644 (file)
@@ -343,12 +343,12 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        shotspeedupward *= W_WeaponSpeedFactor();
        if (!shotspeed)
        {
-               dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
                shotspeed = 1000000;
        }
        if (!maxshottime)
        {
-               dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
                maxshottime = 1;
        }
        makevectors(self.v_angle);
index e42a50f6d4a9ccb8abad44d3b3db2511a13a06a6..64f5eb7d4ce3a026c7175631066dac3ae202419b 100644 (file)
@@ -156,7 +156,7 @@ void bot_setnameandstuff()
 
        if(file < 0)
        {
-               print(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
+               LOG_INFO(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
                readfile = "";
        }
        else
@@ -383,7 +383,7 @@ void bot_relinkplayerlist()
                }
                e = e.chain;
        }
-       dprint(strcat("relink: ", ftos(currentbots), " bots seen.\n"));
+       LOG_TRACE(strcat("relink: ", ftos(currentbots), " bots seen.\n"));
        bot_strategytoken = bot_list;
        bot_strategytoken_taken = true;
 }
@@ -524,18 +524,18 @@ void autoskill(float factor)
                        bestbot = max(bestbot, head.totalfrags - head.totalfrags_lastcheck);
        }
 
-       dprint("autoskill: best player got ", ftos(bestplayer), ", ");
-       dprint("best bot got ", ftos(bestbot), "; ");
+       LOG_TRACE("autoskill: best player got ", ftos(bestplayer), ", ");
+       LOG_TRACE("best bot got ", ftos(bestbot), "; ");
        if(bestbot < 0 || bestplayer < 0)
        {
-               dprint("not doing anything\n");
+               LOG_TRACE("not doing anything\n");
                // don't return, let it reset all counters below
        }
        else if(bestbot <= bestplayer * factor - 2)
        {
                if(autocvar_skill < 17)
                {
-                       dprint("2 frags difference, increasing skill\n");
+                       LOG_TRACE("2 frags difference, increasing skill\n");
                        cvar_set("skill", ftos(autocvar_skill + 1));
                        bprint("^2SKILL UP!^7 Now at level ", ftos(autocvar_skill), "\n");
                }
@@ -544,14 +544,14 @@ void autoskill(float factor)
        {
                if(autocvar_skill > 0)
                {
-                       dprint("2 frags difference, decreasing skill\n");
+                       LOG_TRACE("2 frags difference, decreasing skill\n");
                        cvar_set("skill", ftos(autocvar_skill - 1));
                        bprint("^1SKILL DOWN!^7 Now at level ", ftos(autocvar_skill), "\n");
                }
        }
        else
        {
-               dprint("not doing anything\n");
+               LOG_TRACE("not doing anything\n");
                return;
                // don't reset counters, wait for them to accumulate
        }
index fcf1c04d29cda938cd5f8e3454bf1fc2150a13e7..5796fe60163346a5023ede6a39b4b560dc6bfa88 100644 (file)
@@ -537,7 +537,7 @@ void havocbot_movetogoal()
                                threshold = maxspeed * 0.2;
                                if(sxy < threshold)
                                {
-                                       dprint("Warning: ", self.netname, " got stuck on a jumppad (velocity in xy is ", ftos(sxy), "), trying to get out of it now\n");
+                                       LOG_TRACE("Warning: ", self.netname, " got stuck on a jumppad (velocity in xy is ", ftos(sxy), "), trying to get out of it now\n");
                                        self.aistatus |= AI_STATUS_OUT_JUMPPAD;
                                }
                                return;
@@ -788,7 +788,7 @@ void havocbot_movetogoal()
                                                if(tracebox_hits_trigger_hurt(dst_ahead, self.mins, self.maxs, trace_endpos))
                                                {
                                                        // Remove dangerous dynamic goals from stack
-                                                       dprint("bot ", self.netname, " avoided the goal ", self.goalcurrent.classname, " ", etos(self.goalcurrent), " because it led to a dangerous path; goal stack cleared\n");
+                                                       LOG_TRACE("bot ", self.netname, " avoided the goal ", self.goalcurrent.classname, " ", etos(self.goalcurrent), " because it led to a dangerous path; goal stack cleared\n");
                                                        navigation_clearroute();
                                                        return;
                                                }
@@ -1117,7 +1117,7 @@ float havocbot_moveto(vector pos)
                // Step 4: Move to waypoint
                if(self.havocbot_personal_waypoint==world)
                {
-                       dprint("Error: ", self.netname, " trying to walk to a non existent personal waypoint\n");
+                       LOG_TRACE("Error: ", self.netname, " trying to walk to a non existent personal waypoint\n");
                        self.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_GOING;
                        return CMD_STATUS_ERROR;
                }
@@ -1128,7 +1128,7 @@ float havocbot_moveto(vector pos)
                        bot_strategytoken_taken = true;
                        if(havocbot_moveto_refresh_route())
                        {
-                               dprint(self.netname, " walking to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts)\n");
+                               LOG_TRACE(self.netname, " walking to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts)\n");
                                self.havocbot_personal_waypoint_searchtime = time + 10;
                                self.havocbot_personal_waypoint_failcounter = 0;
                        }
@@ -1138,13 +1138,13 @@ float havocbot_moveto(vector pos)
                                self.havocbot_personal_waypoint_searchtime = time + 2;
                                if(self.havocbot_personal_waypoint_failcounter >= 30)
                                {
-                                       dprint("Warning: can't walk to the personal waypoint located at ", vtos(self.havocbot_personal_waypoint.origin),"\n");
+                                       LOG_TRACE("Warning: can't walk to the personal waypoint located at ", vtos(self.havocbot_personal_waypoint.origin),"\n");
                                        self.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_LINKING;
                                        remove(self.havocbot_personal_waypoint);
                                        return CMD_STATUS_ERROR;
                                }
                                else
-                                       dprint(self.netname, " can't walk to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts), trying later\n");
+                                       LOG_TRACE(self.netname, " can't walk to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts), trying later\n");
                        }
                }
 
@@ -1162,7 +1162,7 @@ float havocbot_moveto(vector pos)
                if(self.aistatus & AI_STATUS_WAYPOINT_PERSONAL_REACHED)
                {
                        // Step 5: Waypoint reached
-                       dprint(self.netname, "'s personal waypoint reached\n");
+                       LOG_TRACE(self.netname, "'s personal waypoint reached\n");
                        remove(self.havocbot_personal_waypoint);
                        self.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_REACHED;
                        return CMD_STATUS_FINISHED;
@@ -1177,7 +1177,7 @@ float havocbot_moveto(vector pos)
                // Wait until it is linked
                if(!self.havocbot_personal_waypoint.wplinked)
                {
-                       dprint(self.netname, " waiting for personal waypoint to be linked\n");
+                       LOG_TRACE(self.netname, " waiting for personal waypoint to be linked\n");
                        return CMD_STATUS_EXECUTING;
                }
 
@@ -1186,7 +1186,7 @@ float havocbot_moveto(vector pos)
                self.aistatus |= AI_STATUS_WAYPOINT_PERSONAL_GOING;
 
                // Step 3: Route to waypoint
-               dprint(self.netname, " walking to its personal waypoint\n");
+               LOG_TRACE(self.netname, " walking to its personal waypoint\n");
 
                return CMD_STATUS_EXECUTING;
        }
@@ -1195,7 +1195,7 @@ float havocbot_moveto(vector pos)
        wp = waypoint_spawnpersonal(pos);
        if(wp==world)
        {
-               dprint("Error: Can't spawn personal waypoint at ",vtos(pos),"\n");
+               LOG_TRACE("Error: Can't spawn personal waypoint at ",vtos(pos),"\n");
                return CMD_STATUS_ERROR;
        }
 
index ea163f4efb56cdd0f9e67b339206573fbe48cedf..63888e45fc5f8d81af0ccf7734f91f02ce620b04 100644 (file)
@@ -50,7 +50,7 @@ void havocbot_role_kh_carrier()
 
        if (!(self.kh_next))
        {
-               dprint("changing role to freelancer\n");
+               LOG_TRACE("changing role to freelancer\n");
                self.havocbot_role = havocbot_role_kh_freelancer;
                self.havocbot_role_timeout = 0;
                return;
@@ -77,7 +77,7 @@ void havocbot_role_kh_defense()
 
        if (self.kh_next)
        {
-               dprint("changing role to carrier\n");
+               LOG_TRACE("changing role to carrier\n");
                self.havocbot_role = havocbot_role_kh_carrier;
                self.havocbot_role_timeout = 0;
                return;
@@ -87,7 +87,7 @@ void havocbot_role_kh_defense()
                self.havocbot_role_timeout = time + random() * 10 + 20;
        if (time > self.havocbot_role_timeout)
        {
-               dprint("changing role to freelancer\n");
+               LOG_TRACE("changing role to freelancer\n");
                self.havocbot_role = havocbot_role_kh_freelancer;
                self.havocbot_role_timeout = 0;
                return;
@@ -118,7 +118,7 @@ void havocbot_role_kh_offense()
 
        if (self.kh_next)
        {
-               dprint("changing role to carrier\n");
+               LOG_TRACE("changing role to carrier\n");
                self.havocbot_role = havocbot_role_kh_carrier;
                self.havocbot_role_timeout = 0;
                return;
@@ -128,7 +128,7 @@ void havocbot_role_kh_offense()
                self.havocbot_role_timeout = time + random() * 10 + 20;
        if (time > self.havocbot_role_timeout)
        {
-               dprint("changing role to freelancer\n");
+               LOG_TRACE("changing role to freelancer\n");
                self.havocbot_role = havocbot_role_kh_freelancer;
                self.havocbot_role_timeout = 0;
                return;
@@ -160,7 +160,7 @@ void havocbot_role_kh_freelancer()
 
        if (self.kh_next)
        {
-               dprint("changing role to carrier\n");
+               LOG_TRACE("changing role to carrier\n");
                self.havocbot_role = havocbot_role_kh_carrier;
                self.havocbot_role_timeout = 0;
                return;
@@ -172,12 +172,12 @@ void havocbot_role_kh_freelancer()
        {
                if (random() < 0.5)
                {
-                       dprint("changing role to offense\n");
+                       LOG_TRACE("changing role to offense\n");
                        self.havocbot_role = havocbot_role_kh_offense;
                }
                else
                {
-                       dprint("changing role to defense\n");
+                       LOG_TRACE("changing role to defense\n");
                        self.havocbot_role = havocbot_role_kh_defense;
                }
                self.havocbot_role_timeout = 0;
index bfa8f8436c3e5c30d47894ae5d0b51fa75806039..593488e4425e96259e15a2d2b228d0c7223da452 100644 (file)
@@ -239,7 +239,7 @@ void havocbot_chooserole_dm()
 
 void havocbot_chooserole()
 {
-       dprint("choosing a role...\n");
+       LOG_TRACE("choosing a role...\n");
        self.bot_strategytime = 0;
        if (MUTATOR_CALLHOOK(HavocBot_ChooseRole, self))
                return;
index ad0a8d761d4bdfff7a8aca640ebc8c6ddf8b8d51..72729ec8671bdbcf8a264295188ba89531f00b7d 100644 (file)
@@ -13,8 +13,8 @@ void bot_debug(string input)
 {
        switch(autocvar_bot_debug)
        {
-               case 1: dprint(input); break;
-               case 2: print(input); break;
+               case 1: LOG_TRACE(input); break;
+               case 2: LOG_INFO(input); break;
        }
 }
 
index b1425c1a821dadaf447b5d291c539079e3fc83bb..a8dc92171746325702c23c1676d26bfd78c53fab 100644 (file)
@@ -14,7 +14,7 @@ void bot_clearqueue(entity bot)
                return;
        buf_del(bot.bot_cmdqueuebuf);
        bot.bot_cmdqueuebuf_allocated = false;
-       dprint("bot ", bot.netname, " queue cleared\n");
+       LOG_TRACE("bot ", bot.netname, " queue cleared\n");
 }
 
 void bot_queuecommand(entity bot, string cmdstring)
@@ -123,7 +123,7 @@ entity bot_getplace(string placename)
                }
                e = find(world, targetname, s);
                if(!e)
-                       print("invalid place ", s, "\n");
+                       LOG_INFO("invalid place ", s, "\n");
                if(i < MAX_BOT_PLACES)
                {
                        self.(bot_placenames[i]) = strzone(placename);
@@ -136,7 +136,7 @@ entity bot_getplace(string placename)
        {
                e = find(world, targetname, placename);
                if(!e)
-                       print("invalid place ", placename, "\n");
+                       LOG_INFO("invalid place ", placename, "\n");
                return e;
        }
 }
@@ -292,7 +292,7 @@ float bot_decodecommand(string cmdstring)
 
                if(cmd_parm_type!=BOT_CMD_PARAMETER_NONE&&parm=="")
                {
-                       print("ERROR: A parameter is required for this command\n");
+                       LOG_INFO("ERROR: A parameter is required for this command\n");
                        return 0;
                }
 
@@ -318,7 +318,7 @@ float bot_decodecommand(string cmdstring)
                }
                return 1;
        }
-       print("ERROR: No such command '", cmdstring, "'\n");
+       LOG_INFO("ERROR: No such command '", cmdstring, "'\n");
        return 0;
 }
 
@@ -353,87 +353,87 @@ void bot_cmdhelp(string scmd)
                                break;
                }
 
-               print(strcat("Command: ",bot_cmd_string[i],"\nParameter: <",stype,"> \n"));
+               LOG_INFO(strcat("Command: ",bot_cmd_string[i],"\nParameter: <",stype,"> \n"));
 
-               print("Description: ");
+               LOG_INFO("Description: ");
                switch(i)
                {
                        case BOT_CMD_PAUSE:
-                               print("Stops the bot completely. Any command other than 'continue' will be ignored.");
+                               LOG_INFO("Stops the bot completely. Any command other than 'continue' will be ignored.");
                                break;
                        case BOT_CMD_CONTINUE:
-                               print("Disable paused status");
+                               LOG_INFO("Disable paused status");
                                break;
                        case BOT_CMD_WAIT:
-                               print("Pause command parsing and bot ai for N seconds. Pressed key will remain pressed");
+                               LOG_INFO("Pause command parsing and bot ai for N seconds. Pressed key will remain pressed");
                                break;
                        case BOT_CMD_WAIT_UNTIL:
-                               print("Pause command parsing and bot ai until time is N from the last barrier. Pressed key will remain pressed");
+                               LOG_INFO("Pause command parsing and bot ai until time is N from the last barrier. Pressed key will remain pressed");
                                break;
                        case BOT_CMD_BARRIER:
-                               print("Waits till all bots that have a command queue reach this command. Pressed key will remain pressed");
+                               LOG_INFO("Waits till all bots that have a command queue reach this command. Pressed key will remain pressed");
                                break;
                        case BOT_CMD_TURN:
-                               print("Look to the right or left N degrees. For turning to the left use positive numbers.");
+                               LOG_INFO("Look to the right or left N degrees. For turning to the left use positive numbers.");
                                break;
                        case BOT_CMD_MOVETO:
-                               print("Walk to an specific coordinate on the map. Usage: moveto \"x y z\"");
+                               LOG_INFO("Walk to an specific coordinate on the map. Usage: moveto \"x y z\"");
                                break;
                        case BOT_CMD_MOVETOTARGET:
-                               print("Walk to the specific target on the map");
+                               LOG_INFO("Walk to the specific target on the map");
                                break;
                        case BOT_CMD_RESETGOAL:
-                               print("Resets the goal stack");
+                               LOG_INFO("Resets the goal stack");
                                break;
                        case BOT_CMD_CC:
-                               print("Execute client command. Examples: cc \"say something\"; cc god; cc \"name newnickname\"; cc kill;");
+                               LOG_INFO("Execute client command. Examples: cc \"say something\"; cc god; cc \"name newnickname\"; cc kill;");
                                break;
                        case BOT_CMD_IF:
-                               print("Perform simple conditional execution.\n");
-                               print("Syntax: \n");
-                               print("        sv_cmd .. if \"condition\"\n");
-                               print("        sv_cmd ..        <instruction if true>\n");
-                               print("        sv_cmd ..        <instruction if true>\n");
-                               print("        sv_cmd .. else\n");
-                               print("        sv_cmd ..        <instruction if false>\n");
-                               print("        sv_cmd ..        <instruction if false>\n");
-                               print("        sv_cmd .. fi\n");
-                               print("Conditions: a=b, a>b, a<b, a\t\t(spaces not allowed)\n");
-                               print("            Values in conditions can be numbers, cvars in the form cvar.cvar_string or special fields\n");
-                               print("Fields: health, speed, flagcarrier\n");
-                               print("Examples: if health>50; if health>cvar.g_balance_laser_primary_damage; if flagcarrier;");
+                               LOG_INFO("Perform simple conditional execution.\n");
+                               LOG_INFO("Syntax: \n");
+                               LOG_INFO("        sv_cmd .. if \"condition\"\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if true>\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if true>\n");
+                               LOG_INFO("        sv_cmd .. else\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if false>\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if false>\n");
+                               LOG_INFO("        sv_cmd .. fi\n");
+                               LOG_INFO("Conditions: a=b, a>b, a<b, a\t\t(spaces not allowed)\n");
+                               LOG_INFO("            Values in conditions can be numbers, cvars in the form cvar.cvar_string or special fields\n");
+                               LOG_INFO("Fields: health, speed, flagcarrier\n");
+                               LOG_INFO("Examples: if health>50; if health>cvar.g_balance_laser_primary_damage; if flagcarrier;");
                                break;
                        case BOT_CMD_RESETAIM:
-                               print("Points the aim to the coordinates x,y 0,0");
+                               LOG_INFO("Points the aim to the coordinates x,y 0,0");
                                break;
                        case BOT_CMD_AIM:
-                               print("Move the aim x/y (horizontal/vertical) degrees relatives to the bot\n");
-                               print("There is a 3rd optional parameter telling in how many seconds the aim has to reach the new position\n");
-                               print("Examples: aim \"90 0\"   // Turn 90 degrees inmediately (positive numbers move to the left/up)\n");
-                               print("          aim \"0 90 2\" // Will gradually look to the sky in the next two seconds");
+                               LOG_INFO("Move the aim x/y (horizontal/vertical) degrees relatives to the bot\n");
+                               LOG_INFO("There is a 3rd optional parameter telling in how many seconds the aim has to reach the new position\n");
+                               LOG_INFO("Examples: aim \"90 0\"        // Turn 90 degrees inmediately (positive numbers move to the left/up)\n");
+                               LOG_INFO("          aim \"0 90 2\"      // Will gradually look to the sky in the next two seconds");
                                break;
                        case BOT_CMD_AIMTARGET:
-                               print("Points the aim to given target");
+                               LOG_INFO("Points the aim to given target");
                                break;
                        case BOT_CMD_PRESSKEY:
-                               print("Press one of the following keys: forward, backward, left, right, jump, crouch, attack1, attack2, use\n");
-                               print("Multiple keys can be pressed at time (with many presskey calls) and it will remain pressed until the command \"releasekey\" is called");
-                               print("Note: The script will not return the control to the bot ai until all keys are released");
+                               LOG_INFO("Press one of the following keys: forward, backward, left, right, jump, crouch, attack1, attack2, use\n");
+                               LOG_INFO("Multiple keys can be pressed at time (with many presskey calls) and it will remain pressed until the command \"releasekey\" is called");
+                               LOG_INFO("Note: The script will not return the control to the bot ai until all keys are released");
                                break;
                        case BOT_CMD_RELEASEKEY:
-                               print("Release previoulsy used keys. Use the parameter \"all\" to release all keys");
+                               LOG_INFO("Release previoulsy used keys. Use the parameter \"all\" to release all keys");
                                break;
                        case BOT_CMD_SOUND:
-                               print("play sound file at bot location");
+                               LOG_INFO("play sound file at bot location");
                                break;
                        case BOT_CMD_DEBUG_ASSERT_CANFIRE:
-                               print("verify the state of the weapon entity");
+                               LOG_INFO("verify the state of the weapon entity");
                                break;
                        default:
-                               print("This command has no description yet.");
+                               LOG_INFO("This command has no description yet.");
                                break;
                }
-               print("\n");
+               LOG_INFO("\n");
        }
 }
 
@@ -445,8 +445,8 @@ void bot_list_commands()
        if(!bot_cmds_initialized)
                bot_commands_init();
 
-       print("List of all available commands:\n");
-       print("  Command - Parameter Type\n");
+       LOG_INFO("List of all available commands:\n");
+       LOG_INFO("  Command - Parameter Type\n");
 
        for(i=1;i<BOT_CMD_COUNTER;++i)
        {
@@ -465,7 +465,7 @@ void bot_list_commands()
                                ptype = "none";
                                break;
                }
-               print(strcat("  ",bot_cmd_string[i]," - <",ptype,"> \n"));
+               LOG_INFO(strcat("  ",bot_cmd_string[i]," - <",ptype,"> \n"));
        }
 }
 
@@ -617,7 +617,7 @@ float bot_cmd_eval(string expr)
                        return ((self.flagcarried!=world));
        }
 
-       print(strcat("ERROR: Unable to convert the expression '",expr,"' into a numeric value\n"));
+       LOG_INFO(strcat("ERROR: Unable to convert the expression '",expr,"' into a numeric value\n"));
        return 0;
 }
 
@@ -629,7 +629,7 @@ float bot_cmd_if()
        if(self.bot_cmd_condition_status != CMD_CONDITION_NONE)
        {
                // Only one "if" block is allowed at time
-               print("ERROR: Only one conditional block can be processed at time");
+               LOG_INFO("ERROR: Only one conditional block can be processed at time");
                bot_clearqueue(self);
                return CMD_STATUS_ERROR;
        }
@@ -1066,7 +1066,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '0 8 8';
-                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by weaponentity state\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by weaponentity state\n");
                }
        }
        else if(ATTACK_FINISHED(self) > time)
@@ -1074,7 +1074,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '8 0 8';
-                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by ATTACK_FINISHED (", ftos(ATTACK_FINISHED(self) - time), " seconds left)\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by ATTACK_FINISHED (", ftos(ATTACK_FINISHED(self) - time), " seconds left)\n");
                }
        }
        else if(self.tuba_note)
@@ -1082,7 +1082,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '8 0 0';
-                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, bot still has an active tuba note\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " wants to fire, bot still has an active tuba note\n");
                }
        }
        else
@@ -1090,7 +1090,7 @@ float bot_cmd_debug_assert_canfire()
                if(!f)
                {
                        self.colormod = '8 8 0';
-                       print("Bot ", self.netname, " using ", self.weaponname, " thinks it has fired, but apparently did not; ATTACK_FINISHED says ", ftos(ATTACK_FINISHED(self) - time), " seconds left\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " thinks it has fired, but apparently did not; ATTACK_FINISHED says ", ftos(ATTACK_FINISHED(self) - time), " seconds left\n");
                }
        }
 
@@ -1191,7 +1191,7 @@ float bot_execute_commands_once()
                if(bot_cmd.bot_cmd_type!=BOT_CMD_NULL)
                {
                        bot_command_executed(true);
-                       print( "WARNING: Commands are ignored while the bot is paused. Use the command 'continue' instead.\n");
+                       LOG_INFO( "WARNING: Commands are ignored while the bot is paused. Use the command 'continue' instead.\n");
                }
                return 1;
        }
@@ -1289,12 +1289,12 @@ float bot_execute_commands_once()
                        status = bot_cmd_debug_assert_canfire();
                        break;
                default:
-                       print(strcat("ERROR: Invalid command on queue with id '",ftos(bot_cmd.bot_cmd_type),"'\n"));
+                       LOG_INFO(strcat("ERROR: Invalid command on queue with id '",ftos(bot_cmd.bot_cmd_type),"'\n"));
                        return 0;
        }
 
        if (status==CMD_STATUS_ERROR)
-               print(strcat("ERROR: The command '",bot_cmd_string[bot_cmd.bot_cmd_type],"' returned an error status\n"));
+               LOG_INFO(strcat("ERROR: The command '",bot_cmd_string[bot_cmd.bot_cmd_type],"' returned an error status\n"));
 
        // Move execution pointer
        if(status==CMD_STATUS_EXECUTING)
index 627c622d2554de6f9b3a6015f5d8ffaebb2e7066..ca209f9ca7ab4877c3ef0036c2d3756cf076a06f 100644 (file)
@@ -43,7 +43,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
                {
                        if(!(f & WAYPOINTFLAG_GENERATED))
                        {
-                               dprint("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n");
+                               LOG_TRACE("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n");
                                remove(w);
                                return world;
                        }
@@ -51,7 +51,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
                        {
                                if(autocvar_developer)
                                {
-                                       print("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n");
+                                       LOG_INFO("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n");
                                        backtrace("Waypoint stuck");
                                }
                        }
@@ -381,9 +381,9 @@ float waypoint_load_links()
 
        if (file < 0)
        {
-               dprint("waypoint links load from ");
-               dprint(filename);
-               dprint(" failed\n");
+               LOG_TRACE("waypoint links load from ");
+               LOG_TRACE(filename);
+               LOG_TRACE(" failed\n");
                return false;
        }
 
@@ -419,7 +419,7 @@ float waypoint_load_links()
 
                        if(!found)
                        {
-                               dprint("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n");
+                               LOG_TRACE("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n");
                                continue;
                        }
 
@@ -441,7 +441,7 @@ float waypoint_load_links()
 
                if(!found)
                {
-                       dprint("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n");
+                       LOG_TRACE("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n");
                        continue;
                }
 
@@ -451,11 +451,11 @@ float waypoint_load_links()
 
        fclose(file);
 
-       dprint("loaded ");
-       dprint(ftos(c));
-       dprint(" waypoint links from maps/");
-       dprint(mapname);
-       dprint(".waypoints.cache\n");
+       LOG_TRACE("loaded ");
+       LOG_TRACE(ftos(c));
+       LOG_TRACE(" waypoint links from maps/");
+       LOG_TRACE(mapname);
+       LOG_TRACE(".waypoints.cache\n");
 
        botframe_cachedwaypointlinks = true;
        return true;
@@ -475,9 +475,9 @@ void waypoint_load_links_hardwired()
 
        if (file < 0)
        {
-               dprint("waypoint links load from ");
-               dprint(filename);
-               dprint(" failed\n");
+               LOG_TRACE("waypoint links load from ");
+               LOG_TRACE(filename);
+               LOG_TRACE(" failed\n");
                return;
        }
 
@@ -515,7 +515,7 @@ void waypoint_load_links_hardwired()
 
                        if(!found)
                        {
-                               print(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n"));
+                               LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n"));
                                continue;
                        }
                }
@@ -536,7 +536,7 @@ void waypoint_load_links_hardwired()
 
                if(!found)
                {
-                       print(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n"));
+                       LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n"));
                        continue;
                }
 
@@ -548,11 +548,11 @@ void waypoint_load_links_hardwired()
 
        fclose(file);
 
-       dprint("loaded ");
-       dprint(ftos(c));
-       dprint(" waypoint links from maps/");
-       dprint(mapname);
-       dprint(".waypoints.hardwired\n");
+       LOG_TRACE("loaded ");
+       LOG_TRACE(ftos(c));
+       LOG_TRACE(" waypoint links from maps/");
+       LOG_TRACE(mapname);
+       LOG_TRACE(".waypoints.hardwired\n");
 }
 
 entity waypoint_get_link(entity w, float i)
@@ -606,9 +606,9 @@ void waypoint_save_links()
        file = fopen(filename, FILE_WRITE);
        if (file < 0)
        {
-               print("waypoint links save to ");
-               print(filename);
-               print(" failed\n");
+               LOG_INFO("waypoint links save to ");
+               LOG_INFO(filename);
+               LOG_INFO(" failed\n");
        }
        c = 0;
        w = findchain(classname, "waypoint");
@@ -630,11 +630,11 @@ void waypoint_save_links()
        fclose(file);
        botframe_cachedwaypointlinks = true;
 
-       print("saved ");
-       print(ftos(c));
-       print(" waypoints links to maps/");
-       print(mapname);
-       print(".waypoints.cache\n");
+       LOG_INFO("saved ");
+       LOG_INFO(ftos(c));
+       LOG_INFO(" waypoints links to maps/");
+       LOG_INFO(mapname);
+       LOG_INFO(".waypoints.cache\n");
 }
 
 // save waypoints to gamedir/data/maps/mapname.waypoints
@@ -712,19 +712,19 @@ float waypoint_loadall()
                                cwb = cwb + 1;
                }
                fclose(file);
-               dprint("loaded ");
-               dprint(ftos(cwp));
-               dprint(" waypoints and ");
-               dprint(ftos(cwb));
-               dprint(" wayboxes from maps/");
-               dprint(mapname);
-               dprint(".waypoints\n");
+               LOG_TRACE("loaded ");
+               LOG_TRACE(ftos(cwp));
+               LOG_TRACE(" waypoints and ");
+               LOG_TRACE(ftos(cwb));
+               LOG_TRACE(" wayboxes from maps/");
+               LOG_TRACE(mapname);
+               LOG_TRACE(".waypoints\n");
        }
        else
        {
-               dprint("waypoint load from ");
-               dprint(filename);
-               dprint(" failed\n");
+               LOG_TRACE("waypoint load from ");
+               LOG_TRACE(filename);
+               LOG_TRACE(" failed\n");
        }
        return cwp + cwb;
 }
@@ -967,7 +967,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en
                }
                if(bestdist < maxdist)
                {
-                       print("update chain to new nearest WP ", etos(p.(fld)), "\n");
+                       LOG_INFO("update chain to new nearest WP ", etos(p.(fld)), "\n");
                        return 0;
                }
 
@@ -1046,7 +1046,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en
                tmax = t;
        }
 
-       print("spawning a waypoint for connecting to ", etos(wp), "\n");
+       LOG_INFO("spawning a waypoint for connecting to ", etos(wp), "\n");
        botframe_autowaypoints_createwp(o, p, fld, 0);
        return 1;
 }
@@ -1062,7 +1062,7 @@ void botframe_autowaypoints_fix(entity p, float walkfromwp, .entity fld)
        if(r != -1)
                return;
 
-       print("emergency: got no good nearby WP to build a link from, starting a new chain\n");
+       LOG_INFO("emergency: got no good nearby WP to build a link from, starting a new chain\n");
        if(!botframe_autowaypoints_fixdown(p.origin))
                return; // shouldn't happen, caught above
        botframe_autowaypoints_createwp(trace_endpos, p, fld, WAYPOINTFLAG_PROTECTED);
@@ -1140,7 +1140,7 @@ void botframe_deleteuselesswaypoints()
        {
                if (!(w.wpflags & (WAYPOINTFLAG_USEFUL | WAYPOINTFLAG_DEAD_END)))
                {
-                       printf("Removed a waypoint at %v. Try again for more!\n", w.origin);
+                       LOG_INFOF("Removed a waypoint at %v. Try again for more!\n", w.origin);
                        te_explosion(w.origin);
                        waypoint_remove(w);
                        break;
index 650855989edebccc0ee31cf1aba8984b6a634b2f..825b9bfc179d71a4787f6f2a89fb22756c28b8be 100644 (file)
@@ -22,7 +22,7 @@ float CampaignBailout(string s)
        cvar_string = cvar_string_normal;
        cvar_set = cvar_set_normal;
        cvar_set("g_campaign", "0");
-       print("^4campaign initialization failed: ", s, "\n");
+       LOG_INFO("^4campaign initialization failed: ", s, "\n");
        if(autocvar__campaign_testrun)
                error("CAMPAIGN FAIL AHAHAHAHAHAHAHAHAH))");
        return 1;
@@ -265,7 +265,7 @@ void CampaignPostIntermission()
        if(campaign_won && campaign_entries < 2)
        {
                // last map won!
-               print("^2test run: campaign looks GOOD\n");
+               LOG_INFO("^2test run: campaign looks GOOD\n");
                localcmd("togglemenu 1\n");
                CampaignFile_Unload();
                return;
index 502340fd99e398f35946b9e8adc0194224065efa..4d5821c811c5ef5fda2db59fd6fb4a9db4d33ed6 100644 (file)
@@ -282,7 +282,7 @@ float CheatImpulse(float i)
                        else
                                e = self;
 
-                       Send_Effect("rocket_explode", e.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_ROCKET_EXPLODE, e.origin, '0 0 0', 1);
                        sound(e, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
 
                        e2 = spawn();
@@ -290,7 +290,7 @@ float CheatImpulse(float i)
                        RadiusDamage(e2, self, 1000, 0, 128, world, world, 500, DEATH_CHEAT, e);
                        remove(e2);
 
-                       print("404 Sportsmanship not found.\n");
+                       LOG_INFO("404 Sportsmanship not found.\n");
                        DID_CHEAT();
                        break;
        }
@@ -326,7 +326,7 @@ float CheatCommand(float argc)
                                start = (1-f) * self.origin + f * trace_endpos;
                                end = stov(argv(3));
                                f = stof(argv(4));
-                               Send_Effect(argv(1), start, end, f);
+                               Send_Effect_(argv(1), start, end, f);
                                DID_CHEAT();
                                break;
                        }
@@ -338,7 +338,7 @@ float CheatCommand(float argc)
                        {
                                // arguments:
                                //   effectname
-                               effectnum = particleeffectnum(argv(1));
+                               effectnum = _particleeffectnum(argv(1));
                                W_SetupShot(self, false, false, "", CH_WEAPON_A, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self);
                                trailparticles(self, effectnum, w_shotorg, trace_endpos);
index 40775abee330a29a25ae781017f49e27aaec92dc..6d804149725cd560a773f4a42bc8db788d3fcb04 100644 (file)
@@ -190,7 +190,7 @@ void PutObserverInServer (void)
        entity  spot;
     self.hud = HUD_NORMAL;
 
-       if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
+       if(IS_PLAYER(self)) { Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1); }
 
        spot = SelectSpawnPoint (true);
        if(!spot)
@@ -362,6 +362,9 @@ void FixPlayermodel()
                }
        }
 
+       MUTATOR_CALLHOOK(FixPlayermodel, defaultmodel);
+       defaultmodel = ret_string;
+
        if(defaultmodel != "")
        {
                if (defaultmodel != self.model)
@@ -1072,7 +1075,7 @@ void ClientConnect (void)
 
        if(IS_CLIENT(self))
        {
-               print("Warning: ClientConnect, but already connected!\n");
+               LOG_INFO("Warning: ClientConnect, but already connected!\n");
                return;
        }
 
@@ -1092,7 +1095,7 @@ void ClientConnect (void)
 
        if(player_count<0)
        {
-               dprint("BUG player count is lower than zero, this cannot happen!\n");
+               LOG_TRACE("BUG player count is lower than zero, this cannot happen!\n");
                player_count = 0;
        }
 
@@ -1294,7 +1297,7 @@ void ClientDisconnect (void)
 
        if (!IS_CLIENT(self))
        {
-               print("Warning: ClientDisconnect without ClientConnect\n");
+               LOG_INFO("Warning: ClientDisconnect without ClientConnect\n");
                return;
        }
 
@@ -1303,7 +1306,7 @@ void ClientDisconnect (void)
        if ( self.active_minigame )
                part_minigame(self);
 
-       if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
+       if(IS_PLAYER(self)) { Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1); }
 
        CheatShutdownClient();
 
@@ -1446,7 +1449,7 @@ void respawn(void)
                self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
                self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
                self.effects |= CSQCMODEL_EF_RESPAWNGHOST;
-               Send_Effect("respawn_ghost", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_RESPAWN_GHOST, self.origin, '0 0 0', 1);
                if(autocvar_g_respawn_ghosts_maxtime)
                        SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
        }
@@ -1632,13 +1635,22 @@ void player_regen (void)
 {
        float max_mod, regen_mod, rot_mod, limit_mod;
        max_mod = regen_mod = rot_mod = limit_mod = 1;
-       if(!MUTATOR_CALLHOOK(PlayerRegen, max_mod, regen_mod, rot_mod, limit_mod))
+       regen_mod_max = max_mod;
+       regen_mod_regen = regen_mod;
+       regen_mod_rot = rot_mod;
+       regen_mod_limit = limit_mod;
+
+       regen_health = autocvar_g_balance_health_regen;
+       regen_health_linear = autocvar_g_balance_health_regenlinear;
+       regen_health_rot = autocvar_g_balance_health_rot;
+       regen_health_rotlinear = autocvar_g_balance_health_rotlinear;
+       regen_health_stable = autocvar_g_balance_health_regenstable;
+       regen_health_rotstable = autocvar_g_balance_health_rotstable;
+       if(!MUTATOR_CALLHOOK(PlayerRegen))
        if(!self.frozen)
        {
-               float minh, mina, maxh, maxa, limith, limita;
-               maxh = autocvar_g_balance_health_rotstable;
+               float mina, maxa, limith, limita;
                maxa = autocvar_g_balance_armor_rotstable;
-               minh = autocvar_g_balance_health_regenstable;
                mina = autocvar_g_balance_armor_regenstable;
                limith = autocvar_g_balance_health_limit;
                limita = autocvar_g_balance_armor_limit;
@@ -1648,13 +1660,13 @@ void player_regen (void)
                rot_mod = regen_mod_rot;
                limit_mod = regen_mod_limit;
 
-               maxh = maxh * max_mod;
-               minh = minh * max_mod;
+               regen_health_rotstable = regen_health_rotstable * max_mod;
+               regen_health_stable = regen_health_stable * max_mod;
                limith = limith * limit_mod;
                limita = limita * limit_mod;
 
                self.armorvalue = CalcRotRegen(self.armorvalue, mina, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxa, autocvar_g_balance_armor_rot, autocvar_g_balance_armor_rotlinear, rot_mod * frametime * (time > self.pauserotarmor_finished), limita);
-               self.health = CalcRotRegen(self.health, minh, autocvar_g_balance_health_regen, autocvar_g_balance_health_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxh, autocvar_g_balance_health_rot, autocvar_g_balance_health_rotlinear, rot_mod * frametime * (time > self.pauserothealth_finished), limith);
+               self.health = CalcRotRegen(self.health, regen_health_stable, regen_health, regen_health_linear, regen_mod * frametime * (time > self.pauseregen_finished), regen_health_rotstable, regen_health_rot, regen_health_rotlinear, rot_mod * frametime * (time > self.pauserothealth_finished), limith);
        }
 
        // if player rotted to death...  die!
@@ -2323,7 +2335,7 @@ void PlayerPreThink (void)
                                        if(strstr(autocvar_g_xonoticversion, "git", 0) >= 0 || strstr(autocvar_g_xonoticversion, "autobuild", 0) >= 0)
                                        {
                                                // notify release users if connecting to git
-                                               dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                               LOG_TRACE("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
                                                Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_BETA, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                        }
                                        else
@@ -2333,13 +2345,13 @@ void PlayerPreThink (void)
                                                if(r < 0)
                                                {
                                                        // give users new version
-                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n");
+                                                       LOG_TRACE("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n");
                                                        Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OUTDATED, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                                }
                                                else if(r > 0)
                                                {
                                                        // notify users about old server version
-                                                       print("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                                       LOG_INFO("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
                                                        Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OLD, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                                }
                                        }
index 45174f2c6008e2c8f914088b8bd9b83090f4c0a5..dd010214e589a57cbbfc70033bf22e87f67e25bc 100644 (file)
@@ -311,7 +311,7 @@ void ImpulseCommands (void)
                                        {
                                                if(e.wpcost >= 10000000)
                                                {
-                                                       print("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.colormod_z = 8;
                                                        e.effects |= EF_NODEPTHTEST | EF_BLUE;
                                                        ++i;
@@ -319,14 +319,14 @@ void ImpulseCommands (void)
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " waypoints cannot be reached from here in any way (marked with blue light)\n");
+                                               LOG_INFO(ftos(i), " waypoints cannot be reached from here in any way (marked with blue light)\n");
                                        navigation_markroutes_inverted(e2);
                                        i = 0;
                                        for(e = findchain(classname, "waypoint"); e; e = e.chain)
                                        {
                                                if(e.wpcost >= 10000000)
                                                {
-                                                       print("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.colormod_x = 8;
                                                        if(!(e.effects & EF_NODEPTHTEST)) // not already reported before
                                                                ++m;
@@ -335,9 +335,9 @@ void ImpulseCommands (void)
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " waypoints cannot walk to here in any way (marked with red light)\n");
+                                               LOG_INFO(ftos(i), " waypoints cannot walk to here in any way (marked with red light)\n");
                                        if(m)
-                                               print(ftos(m), " waypoints have been marked total\n");
+                                               LOG_INFO(ftos(m), " waypoints have been marked total\n");
                                        i = 0;
                                        for(e = findchain(classname, "info_player_deathmatch"); e; e = e.chain)
                                        {
@@ -353,7 +353,7 @@ void ImpulseCommands (void)
                                                else
                                                {
                                                        setorigin(e, org);
-                                                       print("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.effects |= EF_NODEPTHTEST;
                                                        setmodel(e, self.model);
                                                        e.frame = self.frame;
@@ -364,7 +364,7 @@ void ImpulseCommands (void)
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " spawnpoints have no nearest waypoint (marked by player model)\n");
+                                               LOG_INFO(ftos(i), " spawnpoints have no nearest waypoint (marked by player model)\n");
                                        i = 0;
                                        entity start;
                                        start = findchainflags(flags, FL_ITEM);
@@ -380,14 +380,14 @@ void ImpulseCommands (void)
                                                }
                                                else
                                                {
-                                                       print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.effects |= EF_NODEPTHTEST | EF_RED;
                                                        e.colormod_x = 8;
                                                        ++i;
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
+                                               LOG_INFO(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
                                        i = 0;
                                        for(e = start; e; e = e.chain)
                                        {
@@ -397,14 +397,14 @@ void ImpulseCommands (void)
                                                }
                                                else
                                                {
-                                                       print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.effects |= EF_NODEPTHTEST | EF_BLUE;
                                                        e.colormod_z = 8;
                                                        ++i;
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");
+                                               LOG_INFO(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");
                                        break;
                        }
                }
index 9ba3b27cb0bafb4fca55e7264cddec5bf0353462..8ed9619d540f7cdcc6beeefee22e11f596c63c98 100644 (file)
@@ -531,7 +531,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, int deathtyp
                        if(deathtype == DEATH_KILL)
                        {
                                // for the lemmings fans, a small harmless explosion
-                               Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
+                               Send_Effect(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
                        }
                }
 
@@ -828,7 +828,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
        }
 
        if(flood)
-               print("NOTE: ", playername(source), "^7 is flooding.\n");
+               LOG_INFO("NOTE: ", playername(source), "^7 is flooding.\n");
 
        // build sourcemsgstr by cutting off a prefix and replacing it by the other one
        if(privatesay)
@@ -978,7 +978,7 @@ void PrecachePlayerSounds(string f)
        {
                if(tokenize_console(s) != 3)
                {
-                       dprint("Invalid sound info line: ", s, "\n");
+                       LOG_TRACE("Invalid sound info line: ", s, "\n");
                        continue;
                }
                PrecacheGlobalSound(strcat(argv(1), " ", argv(2)));
@@ -1010,7 +1010,7 @@ float LoadPlayerSounds(string f, float first)
        fh = fopen(f, FILE_READ);
        if(fh < 0)
        {
-               dprint("Player sound file not found: ", f, "\n");
+               LOG_TRACE("Player sound file not found: ", f, "\n");
                return 0;
        }
        while((s = fgets(fh)))
index e3d3c67591f9888de119f0a3bc1f344156ae689f..add929004c0cece3df6467b8f2ec64e931acbea8 100644 (file)
@@ -37,14 +37,14 @@ void BanCommand_ban(float request, float argc, string command)
                }
 
                default:
-                       print("Incorrect parameters for ^2ban^7\n");
+                       LOG_INFO("Incorrect parameters for ^2ban^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd ban address [bantime] [reason]\n");
-                       print("  'address' is the IP address or range of the player to ban,\n");
-                       print("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
-                       print("  and 'reason' is the string to label the ban with as reason for banning.\n");
-                       print("See also: ^2banlist, kickban, unban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd ban address [bantime] [reason]\n");
+                       LOG_INFO("  'address' is the IP address or range of the player to ban,\n");
+                       LOG_INFO("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
+                       LOG_INFO("  and 'reason' is the string to label the ban with as reason for banning.\n");
+                       LOG_INFO("See also: ^2banlist, kickban, unban^7\n");
                        return;
                }
        }
@@ -63,9 +63,9 @@ void BanCommand_banlist(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd banlist\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2ban, kickban, unban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd banlist\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2ban, kickban, unban^7\n");
                        return;
                }
        }
@@ -98,21 +98,21 @@ void BanCommand_kickban(float request, float argc, string command)
                                }
                                else
                                {
-                                       print("kickban: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("kickban: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2kickban^7\n");
+                       LOG_INFO("Incorrect parameters for ^2kickban^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd kickban client [bantime] [masksize] [reason]\n");
-                       print("  'client' is the entity number or name of the player to ban,\n");
-                       print("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
-                       print("  'masksize' is the range of the IP address (1-thru-4, default if not provided),\n");
-                       print("  and 'reason' is the string to label the ban with as reason for banning.\n");
-                       print("See also: ^2ban, banlist, unban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd kickban client [bantime] [masksize] [reason]\n");
+                       LOG_INFO("  'client' is the entity number or name of the player to ban,\n");
+                       LOG_INFO("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
+                       LOG_INFO("  'masksize' is the range of the IP address (1-thru-4, default if not provided),\n");
+                       LOG_INFO("  and 'reason' is the string to label the ban with as reason for banning.\n");
+                       LOG_INFO("See also: ^2ban, banlist, unban^7\n");
                        return;
                }
        }
@@ -136,18 +136,18 @@ void BanCommand_mute(float request, float argc, string command) // TODO: Add a s
                                }
                                else
                                {
-                                       print("mute: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("mute: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2mute^7\n");
+                       LOG_INFO("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd mute client\n");
-                       print("  'client' is the entity number or name of the player to mute.\n");
-                       print("See also: ^2unmute^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd mute client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player to mute.\n");
+                       LOG_INFO("See also: ^2unmute^7\n");
                        return;
                }
        }
@@ -198,9 +198,9 @@ void BanCommand_unban(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd unban banid\n");
-                       print("  Where 'banid' is the ID of the ban of which to remove.\n");
-                       print("See also: ^2ban, banlist, kickban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd unban banid\n");
+                       LOG_INFO("  Where 'banid' is the ID of the ban of which to remove.\n");
+                       LOG_INFO("See also: ^2ban, banlist, kickban^7\n");
                        return;
                }
        }
@@ -224,18 +224,18 @@ void BanCommand_unmute(float request, float argc)
                                }
                                else
                                {
-                                       print("unmute: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("unmute: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2mute^7\n");
+                       LOG_INFO("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd unmute client\n");
-                       print("  'client' is the entity number or name of the player to unmute.\n");
-                       print("See also: ^2mute^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd unmute client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player to unmute.\n");
+                       LOG_INFO("See also: ^2mute^7\n");
                        return;
                }
        }
@@ -282,7 +282,7 @@ void BanCommand_(float request)
 void BanCommand_macro_help()
 {
        #define BAN_COMMAND(name,function,description) \
-               { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
+               { if(strtolower(description) != "") { LOG_INFO("  ^2", name, "^7: ", description, "\n"); } }
 
        BAN_COMMANDS(0, 0, "");
        #undef BAN_COMMAND
index f955730336ceb4c271a79a4638d3ee012fee1a09..d38baf784a49ebac0ff823fb3f789edba57dda29 100644 (file)
@@ -93,7 +93,7 @@ void ClientCommand_checkfail(float request, string command) // internal command,
        {
                case CMD_REQUEST_COMMAND:
                {
-                       printf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
+                       LOG_INFOF("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
                        self.checkfail = 1;
                        return; // never fall through to usage
                }
@@ -220,163 +220,6 @@ void ClientCommand_join(float request)
        }
 }
 
-void ClientCommand_mobedit(float request, float argc)
-{
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       if(argv(1) && argv(2))
-                       {
-                               makevectors(self.v_angle);
-                               WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
-
-                               if(!autocvar_g_monsters_edit) { sprint(self, "Monster property editing is not enabled.\n"); return; }
-                               if(IS_MONSTER(trace_ent))
-                               {
-                                       if(trace_ent.realowner != self) { sprint(self, "That monster does not belong to you.\n"); return; }
-                                       switch(argv(1))
-                                       {
-                                               case "skin":
-                                               {
-                                                       if(trace_ent.monsterid != MON_MAGE.monsterid)
-                                                               trace_ent.skin = stof(argv(2));
-                                                       return;
-                                               }
-                                               case "movetarget":
-                                               {
-                                                       trace_ent.monster_moveflags = stof(argv(2));
-                                                       return;
-                                               }
-                                       }
-                               }
-                       }
-               }
-               default:
-                       sprint(self, "Incorrect parameters for ^2mobedit^7\n");
-               case CMD_REQUEST_USAGE:
-               {
-                       sprint(self, "\nUsage:^3 cmd mobedit [argument]\n");
-                       sprint(self, "  Where 'argument' can be skin or movetarget.\n");
-                       sprint(self, "  Aim at your monster to edit its properties.\n");
-                       return;
-               }
-       }
-}
-
-void ClientCommand_mobkill(float request)
-{
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       makevectors(self.v_angle);
-                       WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
-
-                       if(IS_MONSTER(trace_ent))
-                       {
-                               if(trace_ent.realowner != self)
-                               {
-                                       sprint(self, "That monster does not belong to you.\n");
-                                       return;
-                               }
-                               sprint(self, strcat("Your pet '", trace_ent.monster_name, "' has been brutally mutilated.\n"));
-                               Damage (trace_ent, world, world, trace_ent.health + trace_ent.max_health + 200, DEATH_KILL, trace_ent.origin, '0 0 0');
-                               return;
-                       }
-               }
-
-               default:
-                       sprint(self, "Incorrect parameters for ^2mobkill^7\n");
-               case CMD_REQUEST_USAGE:
-               {
-                       sprint(self, "\nUsage:^3 cmd mobkill\n");
-                       sprint(self, "  Aim at your monster to kill it.\n");
-                       return;
-               }
-       }
-}
-
-void ClientCommand_mobspawn(float request, float argc)
-{
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       entity e;
-                       string tospawn;
-                       float moveflag, monstercount = 0;
-
-                       moveflag = (argv(2) ? stof(argv(2)) : 1); // follow owner if not defined
-                       tospawn = strtolower(argv(1));
-
-                       if(tospawn == "list")
-                       {
-                               sprint(self, monsterlist_reply);
-                               return;
-                       }
-
-                       FOR_EACH_MONSTER(e)
-                       {
-                               if(e.realowner == self)
-                                       ++monstercount;
-                       }
-
-                       if(autocvar_g_monsters_max <= 0 || autocvar_g_monsters_max_perplayer <= 0) { sprint(self, "Monster spawning is disabled.\n"); return; }
-                       else if(!IS_PLAYER(self)) { sprint(self, "You can't spawn monsters while spectating.\n"); return; }
-                       else if(MUTATOR_CALLHOOK(AllowMobSpawning)) { sprint(self, "Monster spawning is currently disabled by a mutator.\n"); return; }
-                       else if(!autocvar_g_monsters) { Send_Notification(NOTIF_ONE, self, MSG_INFO, INFO_MONSTERS_DISABLED); return; }
-                       else if(self.vehicle) { sprint(self, "You can't spawn monsters while driving a vehicle.\n"); return; }
-                       else if(self.frozen) { sprint(self, "You can't spawn monsters while frozen.\n"); return; }
-                       else if(autocvar_g_campaign) { sprint(self, "You can't spawn monsters in campaign mode.\n"); return; }
-                       else if(self.deadflag != DEAD_NO) { sprint(self, "You can't spawn monsters while dead.\n"); return; }
-                       else if(monstercount >= autocvar_g_monsters_max_perplayer) { sprint(self, "You have spawned too many monsters, kill some before trying to spawn any more.\n"); return; }
-                       else if(totalspawned >= autocvar_g_monsters_max) { sprint(self, "The global maximum monster count has been reached, kill some before trying to spawn any more.\n"); return; }
-                       else if(tospawn != "")
-                       {
-                               float found = 0, i;
-                               entity mon;
-
-                               for(i = MON_FIRST; i <= MON_LAST; ++i)
-                               {
-                                       mon = get_monsterinfo(i);
-                                       if(mon.netname == tospawn)
-                                       {
-                                               found = true;
-                                               break;
-                                       }
-                               }
-
-                               if(found || tospawn == "random")
-                               {
-                                       totalspawned += 1;
-
-                                       makevectors(self.v_angle);
-                                       WarpZone_TraceBox (CENTER_OR_VIEWOFS(self), PL_MIN, PL_MAX, CENTER_OR_VIEWOFS(self) + v_forward * 150, true, self);
-                                       //WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 150, MOVE_NORMAL, self);
-
-                                       e = spawnmonster(tospawn, 0, self, self, trace_endpos, false, false, moveflag);
-
-                                       sprint(self, strcat("Spawned ", e.monster_name, "\n"));
-
-                                       return;
-                               }
-                       }
-               }
-
-               default:
-                       sprint(self, "Incorrect parameters for ^2mobspawn^7\n");
-               case CMD_REQUEST_USAGE:
-               {
-                       sprint(self, "\nUsage:^3 cmd mobspawn <random> <monster> [movetype]\n");
-                       sprint(self, "  See 'cmd mobspawn list' for available monsters.\n");
-                       sprint(self, "  Argument 'random' spawns a random monster.\n");
-                       sprint(self, "  Monster will follow the owner if second argument is not defined.\n");
-                       return;
-               }
-       }
-}
-
 void ClientCommand_physics(float request, float argc)
 {
        switch(request)
@@ -817,9 +660,6 @@ void ClientCommand_(float request)
        CLIENT_COMMAND("clientversion", ClientCommand_clientversion(request, arguments), "Release version of the game") \
        CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(request, arguments), "Retrieve mapshot picture from the server") \
        CLIENT_COMMAND("join", ClientCommand_join(request), "Become a player in the game") \
-       CLIENT_COMMAND("mobedit", ClientCommand_mobedit(request, arguments), "Edit your monster's properties") \
-       CLIENT_COMMAND("mobkill", ClientCommand_mobkill(request), "Kills your monster") \
-       CLIENT_COMMAND("mobspawn", ClientCommand_mobspawn(request, arguments), "Spawn monsters infront of yourself") \
        CLIENT_COMMAND("physics", ClientCommand_physics(request, arguments), "Change physics set") \
        CLIENT_COMMAND("ready", ClientCommand_ready(request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
        CLIENT_COMMAND("say", ClientCommand_say(request, arguments, command), "Print a message to chat to all players") \
index b303f4b33c2c5dae668d9ffd59ef496c23d4e6da..ee832bcc8529d3ec9ef3e104a96209c39fc588c4 100644 (file)
@@ -169,7 +169,7 @@ void print_to(entity to, string input)
     if(to)
         sprint(to, strcat(input, "\n"));
     else
-        print(input, "\n");
+        LOG_INFO(input, "\n");
 }
 
 // ==========================================
@@ -311,6 +311,147 @@ void CommonCommand_cvar_purechanges(float request, entity caller)
        }
 }
 
+void CommonCommand_editmob(int request, entity caller, int argc)
+{
+       switch(request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                       if(autocvar_g_campaign) { print_to(caller, "Monster editing is disabled in singleplayer"); return; }
+                       // no checks for g_monsters here, as it may be toggled mid match which existing monsters
+
+                       if(caller)
+                       {
+                               makevectors(self.v_angle);
+                               WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
+                       }
+
+                       entity mon = trace_ent;
+                       bool is_visible = IS_MONSTER(mon);
+                       string argument = argv(2);
+
+                       switch(argv(1))
+                       {
+                               case "name":
+                               {
+                                       if(!caller) { print_to(caller, "Only players can edit monsters"); return; }
+                                       if(!argument) { break; } // escape to usage
+                                       if(!autocvar_g_monsters_edit) { print_to(caller, "Monster editing is disabled"); return; }
+                                       if(mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
+                                       if(!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
+
+                                       string mon_oldname = mon.monster_name;
+
+                                       mon.monster_name = argument;
+                                       if(mon.sprite) { WaypointSprite_UpdateSprites(mon.sprite, WP_Monster, WP_Null, WP_Null); }
+                                       print_to(caller, sprintf("Your pet '%s' is now known as '%s'", mon_oldname, mon.monster_name));
+                                       return;
+                               }
+                               case "spawn":
+                               {
+                                       if(!caller) { print_to(caller, "Only players can spawn monsters"); return; }
+                                       if(!argv(2)) { break; } // escape to usage
+
+                                       int moveflag, tmp_moncount = 0;
+                                       string arg_lower = strtolower(argument);
+                                       moveflag = (argv(3)) ? stof(argv(3)) : 1; // follow owner if not defined
+                                       ret_string = "Monster spawning is currently disabled by a mutator";
+
+                                       if(arg_lower == "list") { print_to(caller, monsterlist_reply); return; }
+
+                                       FOR_EACH_MONSTER(mon) { if(mon.realowner == caller) ++tmp_moncount; }
+
+                                       if(!autocvar_g_monsters) { print_to(caller, "Monsters are disabled"); return; }
+                                       if(autocvar_g_monsters_max <= 0 || autocvar_g_monsters_max_perplayer <= 0) { print_to(caller, "Monster spawning is disabled"); return; }
+                                       if(!IS_PLAYER(caller)) { print_to(caller, "You must be playing to spawn a monster"); return; }
+                                       if(MUTATOR_CALLHOOK(AllowMobSpawning)) { print_to(caller, ret_string); return; }
+                                       if(caller.vehicle) { print_to(caller, "You can't spawn monsters while driving a vehicle"); return; }
+                                       if(caller.frozen) { print_to(caller, "You can't spawn monsters while frozen"); return; }
+                                       if(caller.deadflag != DEAD_NO) { print_to(caller, "You can't spawn monsters while dead"); return; }
+                                       if(tmp_moncount >= autocvar_g_monsters_max) { print_to(caller, "The maximum monster count has been reached"); return; }
+                                       if(tmp_moncount >= autocvar_g_monsters_max_perplayer) { print_to(caller, "You can't spawn any more monsters"); return; }
+
+                                       bool found = false;
+                                       for(int i = MON_FIRST; i <= MON_LAST; ++i)
+                                       {
+                                               mon = get_monsterinfo(i);
+                                               if(mon.netname == arg_lower) { found = true; break; }
+                                       }
+
+                                       if(!found && arg_lower != "random") { print_to(caller, "Invalid monster"); return; }
+
+                                       totalspawned += 1;
+                                       WarpZone_TraceBox (CENTER_OR_VIEWOFS(caller), caller.mins, caller.maxs, CENTER_OR_VIEWOFS(caller) + v_forward * 150, true, caller);
+                                       mon = spawnmonster(arg_lower, 0, caller, caller, trace_endpos, false, false, moveflag);
+                                       print_to(caller, strcat("Spawned ", mon.monster_name));
+                                       return;
+                               }
+                               case "kill":
+                               {
+                                       if(!caller) { print_to(caller, "Only players can kill monsters"); return; }
+                                       if(mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
+                                       if(!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
+
+                                       Damage (mon, world, world, mon.health + mon.max_health + 200, DEATH_KILL, mon.origin, '0 0 0');
+                                       print_to(caller, strcat("Your pet '", mon.monster_name, "' has been brutally mutilated"));
+                                       return;
+                               }
+                               case "skin":
+                               {
+                                       if(!caller) { print_to(caller, "Only players can edit monsters"); return; }
+                                       if(!argument) { break; } // escape to usage
+                                       if(!autocvar_g_monsters_edit) { print_to(caller, "Monster editing is disabled"); return; }
+                                       if(!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
+                                       if(mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
+                                       if(mon.monsterid == MON_MAGE.monsterid) { print_to(caller, "Mage skins can't be changed"); return; } // TODO
+
+                                       mon.skin = stof(argument);
+                                       print_to(caller, strcat("Monster skin successfully changed to ", ftos(mon.skin)));
+                                       return;
+                               }
+                               case "movetarget":
+                               {
+                                       if(!caller) { print_to(caller, "Only players can edit monsters"); return; }
+                                       if(!argument) { break; } // escape to usage
+                                       if(!autocvar_g_monsters_edit) { print_to(caller, "Monster editing is disabled"); return; }
+                                       if(!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
+                                       if(mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
+
+                                       mon.monster_moveflags = stof(argument);
+                                       print_to(caller, strcat("Monster move target successfully changed to ", ftos(mon.monster_moveflags)));
+                                       return;
+                               }
+                               case "butcher":
+                               {
+                                       if(caller) { print_to(caller, "This command is not available to players"); return; }
+                                       if(g_invasion) { print_to(caller, "This command does not work during an invasion!"); return; }
+
+                                       int tmp_remcount = 0;
+                                       entity tmp_entity;
+
+                                       FOR_EACH_MONSTER(tmp_entity) { Monster_Remove(tmp_entity); ++tmp_remcount; }
+
+                                       monsters_total = monsters_killed = totalspawned = 0;
+
+                                       print_to(caller, (tmp_remcount) ? sprintf("Killed %d monster%s", tmp_remcount, (tmp_remcount == 1) ? "" : "s") : "No monsters to kill");
+                                       return;
+                               }
+                       }
+               }
+
+               default:
+               case CMD_REQUEST_USAGE:
+               {
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " editmob command [arguments]"));
+                       print_to(caller, "  Where 'command' can be butcher spawn skin movetarget kill name");
+                       print_to(caller, "  spawn, skin, movetarget and name require 'arguments'");
+                       print_to(caller, "  spawn also takes arguments list and random");
+                       print_to(caller, "  Monster will follow owner if third argument of spawn command is not defined");
+                       return;
+               }
+       }
+}
+
 void CommonCommand_info(float request, entity caller, float argc)
 {
        switch(request)
@@ -518,7 +659,7 @@ void CommonCommand_timein(float request, entity caller)
                                                        return;
                                                }
 
-                                               default: dprint("timeout status was inactive, but this code was executed anyway?"); return;
+                                               default: LOG_TRACE("timeout status was inactive, but this code was executed anyway?"); return;
                                        }
                                }
                        }
@@ -559,7 +700,8 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAN
                                {
                                        if(caller) { caller.allowed_timeouts -= 1; }
 
-                                       bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : ""), "!\n"); // write a bprint who started the timeout (and how many they have left)
+                                       // write a bprint who started the timeout (and how many they have left)
+                                       bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : ""), "!\n");
 
                                        timeout_status = TIMEOUT_LEADTIME;
                                        timeout_caller = caller;
index 0925d7137855c000e51017f720f057e2ded902c3..9a011fb851b6442262feff31b6fc9bc2579655a5 100644 (file)
@@ -2,6 +2,7 @@
 #define COMMAND_COMMON_H
 
 #include "vote.qh"
+#include "../../common/monsters/spawn.qh"
 
 #include "../../common/command/generic.qh"
 #include "../../common/command/command.qh"
@@ -92,6 +93,8 @@ void CommonCommand_cvar_changes(float request, entity caller);
 
 void CommonCommand_cvar_purechanges(float request, entity caller);
 
+void CommonCommand_editmob(float request, entity caller, float argc);
+
 void CommonCommand_info(float request, entity caller, float argc);
 
 void CommonCommand_ladder(float request, entity caller);
@@ -123,6 +126,7 @@ void CommonCommand_who(float request, entity caller, float argc);
 #define COMMON_COMMANDS(request,caller,arguments,command) \
        COMMON_COMMAND("cvar_changes", CommonCommand_cvar_changes(request, caller), "Prints a list of all changed server cvars") \
        COMMON_COMMAND("cvar_purechanges", CommonCommand_cvar_purechanges(request, caller), "Prints a list of all changed gameplay cvars") \
+       COMMON_COMMAND("editmob", CommonCommand_editmob(request, caller, arguments), "Modifies a monster or all monsters") \
        COMMON_COMMAND("info", CommonCommand_info(request, caller, arguments), "Request for unique server information set up by admin") \
        COMMON_COMMAND("ladder", CommonCommand_ladder(request, caller), "Get information about top players if supported") \
        COMMON_COMMAND("lsmaps", CommonCommand_lsmaps(request, caller), "List maps which can be used with the current game mode") \
index 53cab574729d7f524639222433f4fb6c1f4c3529..396337a1871572ba9a9797652389943010aed35b 100644 (file)
@@ -45,7 +45,7 @@ float FullTraceFraction(vector a, vector mi, vector ma, vector b)
        }
 
        if(n > 200)
-               dprint("HOLY SHIT! FullTraceFraction: ", ftos(n), " total traces, ", ftos(m), " iterations\n");
+               LOG_TRACE("HOLY SHIT! FullTraceFraction: ", ftos(n), " total traces, ", ftos(m), " iterations\n");
 
        return white / (black + white);
 }
@@ -245,7 +245,7 @@ void RadarMap_Think()
                self.maxs_x = (mi_picmax.x - mi_picmin.x) / self.size.x;
                self.maxs_y = (mi_picmax.y - mi_picmin.y) / self.size.y;
                self.maxs_z = mi_max.z - mi_min.z;
-               print("Picture mins/maxs: ", ftos(self.maxs.x), " and ", ftos(self.maxs.y), " should match\n");
+               LOG_INFO("Picture mins/maxs: ", ftos(self.maxs.x), " and ", ftos(self.maxs.y), " should match\n");
                self.netname = strzone(strcat("gfx/", mi_shortname, "_radar.xpm"));
                if(!(self.count & 1))
                {
@@ -266,7 +266,7 @@ void RadarMap_Think()
                        {
                                fclose(self.cnt);
 
-                               print(self.netname, " already exists, aborting (you may want to specify --force)\n");
+                               LOG_INFO(self.netname, " already exists, aborting (you may want to specify --force)\n");
                                RadarMap_Next();
                                return;
                        }
@@ -274,12 +274,12 @@ void RadarMap_Think()
                self.cnt = fopen(self.netname, FILE_WRITE);
                if(self.cnt < 0)
                {
-                       print("Error writing ", self.netname, "\n");
+                       LOG_INFO("Error writing ", self.netname, "\n");
                        remove(self);
                        radarmapper = world;
                        return;
                }
-               print("Writing to ", self.netname, "...\n");
+               LOG_INFO("Writing to ", self.netname, "...\n");
                fputs(self.cnt, "/* XPM */\n");
                fputs(self.cnt, "static char *RadarMap[] = {\n");
                fputs(self.cnt, "/* columns rows colors chars-per-pixel */\n");
@@ -347,7 +347,7 @@ void RadarMap_Think()
                        else
                        {
                                fputs(self.cnt, "\",\n");
-                               print(ftos(self.size.y - self.frame), " lines left\n");
+                               LOG_INFO(ftos(self.size.y - self.frame), " lines left\n");
                        }
                }
 
@@ -367,7 +367,7 @@ void RadarMap_Think()
                        else
                        {
                                fputs(self.cnt, "\",\n");
-                               print(ftos(self.size.y - self.frame), " lines left\n");
+                               LOG_INFO(ftos(self.size.y - self.frame), " lines left\n");
                        }
                }
 
@@ -379,7 +379,7 @@ void RadarMap_Think()
                // close the file
                fputs(self.cnt, "};\n");
                fclose(self.cnt);
-               print("Finished. Please edit data/", self.netname, " with an image editing application and place it in the TGA format in the gfx folder.\n");
+               LOG_INFO("Finished. Please edit data/", self.netname, " with an image editing application and place it in the TGA format in the gfx folder.\n");
                RadarMap_Next();
        }
 }
@@ -425,7 +425,7 @@ float RadarMap_Make(float argc)
 
                if(radarmapper) // after doing the arguments, see if we successfully went forward.
                {
-                       print("Radarmap entity spawned.\n");
+                       LOG_INFO("Radarmap entity spawned.\n");
                        return true; // if so, don't print usage.
                }
        }
index 29e75b63b2a0121c1a62e336acc3ebda2ae2e6c3..de36b375410b9e8426fe0e7eef7fe3319c8a0080 100644 (file)
@@ -44,7 +44,7 @@ void make_mapinfo_Think()
 {
        if(MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
        {
-               print("Done rebuiling mapinfos.\n");
+               LOG_INFO("Done rebuiling mapinfos.\n");
                MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
                remove(self);
        }
@@ -131,7 +131,7 @@ void GameCommand_adminmsg(float request, float argc)
 
                                        if(accepted <= 0)
                                        {
-                                               print("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
+                                               LOG_INFO("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
                                                continue;
                                        }
 
@@ -147,70 +147,29 @@ void GameCommand_adminmsg(float request, float argc)
                                        }
 
                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
-                                       dprint("Message sent to ", client.netname, "\n");
+                                       LOG_TRACE("Message sent to ", client.netname, "\n");
                                        continue;
                                }
 
                                if(successful)
                                        bprint("Successfully sent message '", admin_message, "' to ", successful, ".\n");
                                else
-                                       print("No players given (", original_targets, ") could receive the message.\n");
+                                       LOG_INFO("No players given (", original_targets, ") could receive the message.\n");
 
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2adminmsg^7\n");
+                       LOG_INFO("Incorrect parameters for ^2adminmsg^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd adminmsg clients \"message\" [infobartime]\n");
-                       print("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
-                       print("  If infobartime is provided, the message will be sent to infobar.\n");
-                       print("  Otherwise, it will just be sent as a centerprint message.\n");
-                       print("Examples: adminmsg 2,4 \"this infomessage will last for ten seconds\" 10\n");
-                       print("          adminmsg 2,5 \"this message will be a centerprint\"\n");
-                       return;
-               }
-       }
-}
-
-void GameCommand_mobbutcher(float request)
-{
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       if(autocvar_g_campaign) { print("This command doesn't work in campaign mode.\n"); return; }
-                       if(g_invasion) { print("This command doesn't work during an invasion.\n"); return; }
-
-                       float removed_count = 0;
-                       entity head;
-
-                       FOR_EACH_MONSTER(head)
-                       {
-                               monster_remove(head);
-                               ++removed_count;
-                       }
-
-                       monsters_total = 0; // reset stats?
-                       monsters_killed = 0;
-
-                       totalspawned = 0;
-
-                       if(removed_count <= 0)
-                               print("No monsters to kill\n");
-                       else
-                               printf("Killed %d monster%s\n", removed_count, ((removed_count == 1) ? "" : "s"));
-
-                       return; // never fall through to usage
-               }
-
-               default:
-               case CMD_REQUEST_USAGE:
-               {
-                       print("\nUsage:^3 sv_cmd mobbutcher\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd adminmsg clients \"message\" [infobartime]\n");
+                       LOG_INFO("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
+                       LOG_INFO("  If infobartime is provided, the message will be sent to infobar.\n");
+                       LOG_INFO("  Otherwise, it will just be sent as a centerprint message.\n");
+                       LOG_INFO("Examples: adminmsg 2,4 \"this infomessage will last for ten seconds\" 10\n");
+                       LOG_INFO("          adminmsg 2,5 \"this message will be a centerprint\"\n");
                        return;
                }
        }
@@ -229,8 +188,8 @@ void GameCommand_allready(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd allready\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd allready\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -255,16 +214,16 @@ void GameCommand_allspec(float request, float argc)
                                ++i;
                        }
                        if(i) { bprint(strcat("Successfully forced all (", ftos(i), ") players to spectate", (reason ? strcat(" for reason: '", reason, "'") : ""), ".\n")); }
-                       else { print("No players found to spectate.\n"); }
+                       else { LOG_INFO("No players found to spectate.\n"); }
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd allspec [reason]\n");
-                       print("  Where 'reason' is an optional argument for explanation of allspec command.\n");
-                       print("See also: ^2moveplayer, shuffleteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd allspec [reason]\n");
+                       LOG_INFO("  Where 'reason' is an optional argument for explanation of allspec command.\n");
+                       LOG_INFO("See also: ^2moveplayer, shuffleteams^7\n");
                        return;
                }
        }
@@ -287,16 +246,16 @@ void GameCommand_anticheat(float request, float argc)
                        }
                        else
                        {
-                               print("anticheat: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                               LOG_INFO("anticheat: ", GetClientErrorString(accepted, argv(1)), ".\n");
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2anticheat^7\n");
+                       LOG_INFO("Incorrect parameters for ^2anticheat^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd anticheat client\n");
-                       print("  'client' is the entity number or name of the player.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd anticheat client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player.\n");
                        return;
                }
        }
@@ -308,11 +267,11 @@ void GameCommand_bbox(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       print("Original size: ", ftos(world.absmin.x), " ", ftos(world.absmin.y), " ", ftos(world.absmin.z));
-                       print(" ", ftos(world.absmax.x), " ", ftos(world.absmax.y), " ", ftos(world.absmax.z), "\n");
-                       print("Currently set size: ", ftos(world.mins.x), " ", ftos(world.mins.y), " ", ftos(world.mins.z));
-                       print(" ", ftos(world.maxs.x), " ", ftos(world.maxs.y), " ", ftos(world.maxs.z), "\n");
-                       print("Solid bounding box size:");
+                       LOG_INFO("Original size: ", ftos(world.absmin.x), " ", ftos(world.absmin.y), " ", ftos(world.absmin.z));
+                       LOG_INFO(" ", ftos(world.absmax.x), " ", ftos(world.absmax.y), " ", ftos(world.absmax.z), "\n");
+                       LOG_INFO("Currently set size: ", ftos(world.mins.x), " ", ftos(world.mins.y), " ", ftos(world.mins.z));
+                       LOG_INFO(" ", ftos(world.maxs.x), " ", ftos(world.maxs.y), " ", ftos(world.maxs.z), "\n");
+                       LOG_INFO("Solid bounding box size:");
 
                        tracebox('1 0 0' * world.absmin.x,
                                                        '0 1 0' * world.absmin.y + '0 0 1' * world.absmin.z,
@@ -321,9 +280,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmin.x));
+                               LOG_INFO(" ", ftos(world.absmin.x));
                        else
-                               print(" ", ftos(trace_endpos.x));
+                               LOG_INFO(" ", ftos(trace_endpos.x));
 
                        tracebox('0 1 0' * world.absmin.y,
                                                        '1 0 0' * world.absmin.x + '0 0 1' * world.absmin.z,
@@ -332,9 +291,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmin.y));
+                               LOG_INFO(" ", ftos(world.absmin.y));
                        else
-                               print(" ", ftos(trace_endpos.y));
+                               LOG_INFO(" ", ftos(trace_endpos.y));
 
                        tracebox('0 0 1' * world.absmin.z,
                                                        '1 0 0' * world.absmin.x + '0 1 0' * world.absmin.y,
@@ -343,9 +302,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmin.z));
+                               LOG_INFO(" ", ftos(world.absmin.z));
                        else
-                               print(" ", ftos(trace_endpos.z));
+                               LOG_INFO(" ", ftos(trace_endpos.z));
 
                        tracebox('1 0 0' * world.absmax.x,
                                                        '0 1 0' * world.absmin.y + '0 0 1' * world.absmin.z,
@@ -354,9 +313,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmax.x));
+                               LOG_INFO(" ", ftos(world.absmax.x));
                        else
-                               print(" ", ftos(trace_endpos.x));
+                               LOG_INFO(" ", ftos(trace_endpos.x));
 
                        tracebox('0 1 0' * world.absmax.y,
                                                        '1 0 0' * world.absmin.x + '0 0 1' * world.absmin.z,
@@ -365,9 +324,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmax.y));
+                               LOG_INFO(" ", ftos(world.absmax.y));
                        else
-                               print(" ", ftos(trace_endpos.y));
+                               LOG_INFO(" ", ftos(trace_endpos.y));
 
                        tracebox('0 0 1' * world.absmax.z,
                                                        '1 0 0' * world.absmin.x + '0 1 0' * world.absmin.y,
@@ -376,20 +335,20 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmax.z));
+                               LOG_INFO(" ", ftos(world.absmax.z));
                        else
-                               print(" ", ftos(trace_endpos.z));
+                               LOG_INFO(" ", ftos(trace_endpos.z));
 
-                       print("\n");
+                       LOG_INFO("\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd bbox\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2gettaginfo, trace^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd bbox\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2gettaginfo, trace^7\n");
                        return;
                }
        }
@@ -416,7 +375,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                bot_fixcount();
                                cvar_settemp("bot_number", argv(2));
                                if(!bot_fixcount())
-                                       print("Sorry, could not set requested bot count\n");
+                                       LOG_INFO("Sorry, could not set requested bot count\n");
                                return;
                        }
                        else if(argv(1) == "load" && argc == 3)
@@ -426,7 +385,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                fh = fopen(argv(2), FILE_READ);
                                if(fh < 0)
                                {
-                                       print("cannot open the file\n");
+                                       LOG_INFO("cannot open the file\n");
                                        return;
                                }
 
@@ -449,7 +408,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                                        bot_fixcount();
                                                        cvar_settemp("bot_number", argv(3));
                                                        if(!bot_fixcount())
-                                                               print("Sorry, could not set requested bot count\n");
+                                                               LOG_INFO("Sorry, could not set requested bot count\n");
                                                }
                                                else
                                                {
@@ -466,7 +425,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
 
                                        ++i;
                                }
-                               print(ftos(i), " commands read\n");
+                               LOG_INFO(ftos(i), " commands read\n");
                                fclose(fh);
                                return;
                        }
@@ -485,24 +444,24 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                        bot = find_bot_by_name(argv(1));
                                if(bot)
                                {
-                                       print(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
+                                       LOG_INFO(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
                                        bot_queuecommand(bot, substring(command, argv_start_index(2), -1));
                                        return;
                                }
                                else
-                                       print(strcat("Error: Can't find bot with the name or id '", argv(1),"' - Did you mistype the command?\n")); // don't return so that usage is shown
+                                       LOG_INFO(strcat("Error: Can't find bot with the name or id '", argv(1),"' - Did you mistype the command?\n")); // don't return so that usage is shown
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2bot_cmd^7\n");
+                       LOG_INFO("Incorrect parameters for ^2bot_cmd^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd bot_cmd client command [argument]\n");
-                       print("  'client' can be either the name or entity id of the bot\n");
-                       print("  For full list of commands, see bot_cmd help [command].\n");
-                       print("Examples: sv_cmd bot_cmd client cc \"say something\"\n");
-                       print("          sv_cmd bot_cmd client presskey jump\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd bot_cmd client command [argument]\n");
+                       LOG_INFO("  'client' can be either the name or entity id of the bot\n");
+                       LOG_INFO("  For full list of commands, see bot_cmd help [command].\n");
+                       LOG_INFO("Examples: sv_cmd bot_cmd client cc \"say something\"\n");
+                       LOG_INFO("          sv_cmd bot_cmd client presskey jump\n");
                        return;
                }
        }
@@ -525,8 +484,8 @@ void GameCommand_cointoss(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd cointoss [result1 result2]\n");
-                       print("  Where 'result1' and 'result2' are user created options.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd cointoss [result1 result2]\n");
+                       LOG_INFO("  Where 'result1' and 'result2' are user created options.\n");
                        return;
                }
        }
@@ -543,33 +502,33 @@ void GameCommand_database(float request, float argc)
                                if(argv(1) == "save")
                                {
                                        db_save(ServerProgsDB, argv(2));
-                                       print(strcat("Copied serverprogs database to '", argv(2), "' in the data directory.\n"));
+                                       LOG_INFO(strcat("Copied serverprogs database to '", argv(2), "' in the data directory.\n"));
                                        return;
                                }
                                else if(argv(1) == "dump")
                                {
                                        db_dump(ServerProgsDB, argv(2));
-                                       print("DB dumped.\n"); // wtf does this do?
+                                       LOG_INFO("DB dumped.\n"); // wtf does this do?
                                        return;
                                }
                                else if(argv(1) == "load")
                                {
                                        db_close(ServerProgsDB);
                                        ServerProgsDB = db_load(argv(2));
-                                       print(strcat("Loaded '", argv(2), "' as new serverprogs database.\n"));
+                                       LOG_INFO(strcat("Loaded '", argv(2), "' as new serverprogs database.\n"));
                                        return;
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2database^7\n");
+                       LOG_INFO("Incorrect parameters for ^2database^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd database action filename\n");
-                       print("  Where 'action' is the command to complete,\n");
-                       print("  and 'filename' is what it acts upon.\n");
-                       print("  Full list of commands here: \"save, dump, load.\"\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd database action filename\n");
+                       LOG_INFO("  Where 'action' is the command to complete,\n");
+                       LOG_INFO("  and 'filename' is what it acts upon.\n");
+                       LOG_INFO("  Full list of commands here: \"save, dump, load.\"\n");
                        return;
                }
        }
@@ -592,21 +551,21 @@ void GameCommand_defer_clear(float request, float argc)
                                if(accepted > 0)
                                {
                                        stuffcmd(client, "defer clear\n");
-                                       print("defer clear stuffed to ", client.netname, "\n");
+                                       LOG_INFO("defer clear stuffed to ", client.netname, "\n");
                                }
-                               else { print("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
+                               else { LOG_INFO("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
 
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2defer_clear^7\n");
+                       LOG_INFO("Incorrect parameters for ^2defer_clear^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd defer_clear client\n");
-                       print("  'client' is the entity number or name of the player.\n");
-                       print("See also: ^2defer_clear_all^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd defer_clear client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player.\n");
+                       LOG_INFO("See also: ^2defer_clear_all^7\n");
                        return;
                }
        }
@@ -628,16 +587,16 @@ void GameCommand_defer_clear_all(float request)
                                GameCommand_defer_clear(CMD_REQUEST_COMMAND, argc);
                                ++i;
                        }
-                       if(i) { print(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found?
+                       if(i) { LOG_INFO(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found?
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd defer_clear_all\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2defer_clear^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd defer_clear_all\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2defer_clear^7\n");
                        return;
                }
        }
@@ -660,13 +619,13 @@ void GameCommand_delrec(float request, float argc)  // perhaps merge later with
                }
 
                default:
-                       print("Incorrect parameters for ^2delrec^7\n");
+                       LOG_INFO("Incorrect parameters for ^2delrec^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd delrec ranking [map]\n");
-                       print("  'ranking' is which ranking level to clear up to, \n");
-                       print("  it will clear all records up to nth place.\n");
-                       print("  if 'map' is not provided it will use current map.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd delrec ranking [map]\n");
+                       LOG_INFO("  'ranking' is which ranking level to clear up to, \n");
+                       LOG_INFO("  it will clear all records up to nth place.\n");
+                       LOG_INFO("  if 'map' is not provided it will use current map.\n");
                        return;
                }
        }
@@ -682,43 +641,43 @@ void GameCommand_effectindexdump(float request)
                        string s;
 
                        d = db_create();
-                       print("begin of effects list\n");
-                       db_put(d, "TE_GUNSHOT", "1"); print("effect TE_GUNSHOT is ", ftos(particleeffectnum("TE_GUNSHOT")), "\n");
-                       db_put(d, "TE_GUNSHOTQUAD", "1"); print("effect TE_GUNSHOTQUAD is ", ftos(particleeffectnum("TE_GUNSHOTQUAD")), "\n");
-                       db_put(d, "TE_SPIKE", "1"); print("effect TE_SPIKE is ", ftos(particleeffectnum("TE_SPIKE")), "\n");
-                       db_put(d, "TE_SPIKEQUAD", "1"); print("effect TE_SPIKEQUAD is ", ftos(particleeffectnum("TE_SPIKEQUAD")), "\n");
-                       db_put(d, "TE_SUPERSPIKE", "1"); print("effect TE_SUPERSPIKE is ", ftos(particleeffectnum("TE_SUPERSPIKE")), "\n");
-                       db_put(d, "TE_SUPERSPIKEQUAD", "1"); print("effect TE_SUPERSPIKEQUAD is ", ftos(particleeffectnum("TE_SUPERSPIKEQUAD")), "\n");
-                       db_put(d, "TE_WIZSPIKE", "1"); print("effect TE_WIZSPIKE is ", ftos(particleeffectnum("TE_WIZSPIKE")), "\n");
-                       db_put(d, "TE_KNIGHTSPIKE", "1"); print("effect TE_KNIGHTSPIKE is ", ftos(particleeffectnum("TE_KNIGHTSPIKE")), "\n");
-                       db_put(d, "TE_EXPLOSION", "1"); print("effect TE_EXPLOSION is ", ftos(particleeffectnum("TE_EXPLOSION")), "\n");
-                       db_put(d, "TE_EXPLOSIONQUAD", "1"); print("effect TE_EXPLOSIONQUAD is ", ftos(particleeffectnum("TE_EXPLOSIONQUAD")), "\n");
-                       db_put(d, "TE_TAREXPLOSION", "1"); print("effect TE_TAREXPLOSION is ", ftos(particleeffectnum("TE_TAREXPLOSION")), "\n");
-                       db_put(d, "TE_TELEPORT", "1"); print("effect TE_TELEPORT is ", ftos(particleeffectnum("TE_TELEPORT")), "\n");
-                       db_put(d, "TE_LAVASPLASH", "1"); print("effect TE_LAVASPLASH is ", ftos(particleeffectnum("TE_LAVASPLASH")), "\n");
-                       db_put(d, "TE_SMALLFLASH", "1"); print("effect TE_SMALLFLASH is ", ftos(particleeffectnum("TE_SMALLFLASH")), "\n");
-                       db_put(d, "TE_FLAMEJET", "1"); print("effect TE_FLAMEJET is ", ftos(particleeffectnum("TE_FLAMEJET")), "\n");
-                       db_put(d, "EF_FLAME", "1"); print("effect EF_FLAME is ", ftos(particleeffectnum("EF_FLAME")), "\n");
-                       db_put(d, "TE_BLOOD", "1"); print("effect TE_BLOOD is ", ftos(particleeffectnum("TE_BLOOD")), "\n");
-                       db_put(d, "TE_SPARK", "1"); print("effect TE_SPARK is ", ftos(particleeffectnum("TE_SPARK")), "\n");
-                       db_put(d, "TE_PLASMABURN", "1"); print("effect TE_PLASMABURN is ", ftos(particleeffectnum("TE_PLASMABURN")), "\n");
-                       db_put(d, "TE_TEI_G3", "1"); print("effect TE_TEI_G3 is ", ftos(particleeffectnum("TE_TEI_G3")), "\n");
-                       db_put(d, "TE_TEI_SMOKE", "1"); print("effect TE_TEI_SMOKE is ", ftos(particleeffectnum("TE_TEI_SMOKE")), "\n");
-                       db_put(d, "TE_TEI_BIGEXPLOSION", "1"); print("effect TE_TEI_BIGEXPLOSION is ", ftos(particleeffectnum("TE_TEI_BIGEXPLOSION")), "\n");
-                       db_put(d, "TE_TEI_PLASMAHIT", "1"); print("effect TE_TEI_PLASMAHIT is ", ftos(particleeffectnum("TE_TEI_PLASMAHIT")), "\n");
-                       db_put(d, "EF_STARDUST", "1"); print("effect EF_STARDUST is ", ftos(particleeffectnum("EF_STARDUST")), "\n");
-                       db_put(d, "TR_ROCKET", "1"); print("effect TR_ROCKET is ", ftos(particleeffectnum("TR_ROCKET")), "\n");
-                       db_put(d, "TR_GRENADE", "1"); print("effect TR_GRENADE is ", ftos(particleeffectnum("TR_GRENADE")), "\n");
-                       db_put(d, "TR_BLOOD", "1"); print("effect TR_BLOOD is ", ftos(particleeffectnum("TR_BLOOD")), "\n");
-                       db_put(d, "TR_WIZSPIKE", "1"); print("effect TR_WIZSPIKE is ", ftos(particleeffectnum("TR_WIZSPIKE")), "\n");
-                       db_put(d, "TR_SLIGHTBLOOD", "1"); print("effect TR_SLIGHTBLOOD is ", ftos(particleeffectnum("TR_SLIGHTBLOOD")), "\n");
-                       db_put(d, "TR_KNIGHTSPIKE", "1"); print("effect TR_KNIGHTSPIKE is ", ftos(particleeffectnum("TR_KNIGHTSPIKE")), "\n");
-                       db_put(d, "TR_VORESPIKE", "1"); print("effect TR_VORESPIKE is ", ftos(particleeffectnum("TR_VORESPIKE")), "\n");
-                       db_put(d, "TR_NEHAHRASMOKE", "1"); print("effect TR_NEHAHRASMOKE is ", ftos(particleeffectnum("TR_NEHAHRASMOKE")), "\n");
-                       db_put(d, "TR_NEXUIZPLASMA", "1"); print("effect TR_NEXUIZPLASMA is ", ftos(particleeffectnum("TR_NEXUIZPLASMA")), "\n");
-                       db_put(d, "TR_GLOWTRAIL", "1"); print("effect TR_GLOWTRAIL is ", ftos(particleeffectnum("TR_GLOWTRAIL")), "\n");
-                       db_put(d, "TR_SEEKER", "1"); print("effect TR_SEEKER is ", ftos(particleeffectnum("TR_SEEKER")), "\n");
-                       db_put(d, "SVC_PARTICLE", "1"); print("effect SVC_PARTICLE is ", ftos(particleeffectnum("SVC_PARTICLE")), "\n");
+                       LOG_INFO("begin of effects list\n");
+                       db_put(d, "TE_GUNSHOT", "1"); LOG_INFO("effect TE_GUNSHOT is ", ftos(_particleeffectnum("TE_GUNSHOT")), "\n");
+                       db_put(d, "TE_GUNSHOTQUAD", "1"); LOG_INFO("effect TE_GUNSHOTQUAD is ", ftos(_particleeffectnum("TE_GUNSHOTQUAD")), "\n");
+                       db_put(d, "TE_SPIKE", "1"); LOG_INFO("effect TE_SPIKE is ", ftos(_particleeffectnum("TE_SPIKE")), "\n");
+                       db_put(d, "TE_SPIKEQUAD", "1"); LOG_INFO("effect TE_SPIKEQUAD is ", ftos(_particleeffectnum("TE_SPIKEQUAD")), "\n");
+                       db_put(d, "TE_SUPERSPIKE", "1"); LOG_INFO("effect TE_SUPERSPIKE is ", ftos(_particleeffectnum("TE_SUPERSPIKE")), "\n");
+                       db_put(d, "TE_SUPERSPIKEQUAD", "1"); LOG_INFO("effect TE_SUPERSPIKEQUAD is ", ftos(_particleeffectnum("TE_SUPERSPIKEQUAD")), "\n");
+                       db_put(d, "TE_WIZSPIKE", "1"); LOG_INFO("effect TE_WIZSPIKE is ", ftos(_particleeffectnum("TE_WIZSPIKE")), "\n");
+                       db_put(d, "TE_KNIGHTSPIKE", "1"); LOG_INFO("effect TE_KNIGHTSPIKE is ", ftos(_particleeffectnum("TE_KNIGHTSPIKE")), "\n");
+                       db_put(d, "TE_EXPLOSION", "1"); LOG_INFO("effect TE_EXPLOSION is ", ftos(_particleeffectnum("TE_EXPLOSION")), "\n");
+                       db_put(d, "TE_EXPLOSIONQUAD", "1"); LOG_INFO("effect TE_EXPLOSIONQUAD is ", ftos(_particleeffectnum("TE_EXPLOSIONQUAD")), "\n");
+                       db_put(d, "TE_TAREXPLOSION", "1"); LOG_INFO("effect TE_TAREXPLOSION is ", ftos(_particleeffectnum("TE_TAREXPLOSION")), "\n");
+                       db_put(d, "TE_TELEPORT", "1"); LOG_INFO("effect TE_TELEPORT is ", ftos(_particleeffectnum("TE_TELEPORT")), "\n");
+                       db_put(d, "TE_LAVASPLASH", "1"); LOG_INFO("effect TE_LAVASPLASH is ", ftos(_particleeffectnum("TE_LAVASPLASH")), "\n");
+                       db_put(d, "TE_SMALLFLASH", "1"); LOG_INFO("effect TE_SMALLFLASH is ", ftos(_particleeffectnum("TE_SMALLFLASH")), "\n");
+                       db_put(d, "TE_FLAMEJET", "1"); LOG_INFO("effect TE_FLAMEJET is ", ftos(_particleeffectnum("TE_FLAMEJET")), "\n");
+                       db_put(d, "EF_FLAME", "1"); LOG_INFO("effect EF_FLAME is ", ftos(_particleeffectnum("EF_FLAME")), "\n");
+                       db_put(d, "TE_BLOOD", "1"); LOG_INFO("effect TE_BLOOD is ", ftos(_particleeffectnum("TE_BLOOD")), "\n");
+                       db_put(d, "TE_SPARK", "1"); LOG_INFO("effect TE_SPARK is ", ftos(_particleeffectnum("TE_SPARK")), "\n");
+                       db_put(d, "TE_PLASMABURN", "1"); LOG_INFO("effect TE_PLASMABURN is ", ftos(_particleeffectnum("TE_PLASMABURN")), "\n");
+                       db_put(d, "TE_TEI_G3", "1"); LOG_INFO("effect TE_TEI_G3 is ", ftos(_particleeffectnum("TE_TEI_G3")), "\n");
+                       db_put(d, "TE_TEI_SMOKE", "1"); LOG_INFO("effect TE_TEI_SMOKE is ", ftos(_particleeffectnum("TE_TEI_SMOKE")), "\n");
+                       db_put(d, "TE_TEI_BIGEXPLOSION", "1"); LOG_INFO("effect TE_TEI_BIGEXPLOSION is ", ftos(_particleeffectnum("TE_TEI_BIGEXPLOSION")), "\n");
+                       db_put(d, "TE_TEI_PLASMAHIT", "1"); LOG_INFO("effect TE_TEI_PLASMAHIT is ", ftos(_particleeffectnum("TE_TEI_PLASMAHIT")), "\n");
+                       db_put(d, "EF_STARDUST", "1"); LOG_INFO("effect EF_STARDUST is ", ftos(_particleeffectnum("EF_STARDUST")), "\n");
+                       db_put(d, "TR_ROCKET", "1"); LOG_INFO("effect TR_ROCKET is ", ftos(_particleeffectnum("TR_ROCKET")), "\n");
+                       db_put(d, "TR_GRENADE", "1"); LOG_INFO("effect TR_GRENADE is ", ftos(_particleeffectnum("TR_GRENADE")), "\n");
+                       db_put(d, "TR_BLOOD", "1"); LOG_INFO("effect TR_BLOOD is ", ftos(_particleeffectnum("TR_BLOOD")), "\n");
+                       db_put(d, "TR_WIZSPIKE", "1"); LOG_INFO("effect TR_WIZSPIKE is ", ftos(_particleeffectnum("TR_WIZSPIKE")), "\n");
+                       db_put(d, "TR_SLIGHTBLOOD", "1"); LOG_INFO("effect TR_SLIGHTBLOOD is ", ftos(_particleeffectnum("TR_SLIGHTBLOOD")), "\n");
+                       db_put(d, "TR_KNIGHTSPIKE", "1"); LOG_INFO("effect TR_KNIGHTSPIKE is ", ftos(_particleeffectnum("TR_KNIGHTSPIKE")), "\n");
+                       db_put(d, "TR_VORESPIKE", "1"); LOG_INFO("effect TR_VORESPIKE is ", ftos(_particleeffectnum("TR_VORESPIKE")), "\n");
+                       db_put(d, "TR_NEHAHRASMOKE", "1"); LOG_INFO("effect TR_NEHAHRASMOKE is ", ftos(_particleeffectnum("TR_NEHAHRASMOKE")), "\n");
+                       db_put(d, "TR_NEXUIZPLASMA", "1"); LOG_INFO("effect TR_NEXUIZPLASMA is ", ftos(_particleeffectnum("TR_NEXUIZPLASMA")), "\n");
+                       db_put(d, "TR_GLOWTRAIL", "1"); LOG_INFO("effect TR_GLOWTRAIL is ", ftos(_particleeffectnum("TR_GLOWTRAIL")), "\n");
+                       db_put(d, "TR_SEEKER", "1"); LOG_INFO("effect TR_SEEKER is ", ftos(_particleeffectnum("TR_SEEKER")), "\n");
+                       db_put(d, "SVC_PARTICLE", "1"); LOG_INFO("effect SVC_PARTICLE is ", ftos(_particleeffectnum("SVC_PARTICLE")), "\n");
 
                        fh = fopen("effectinfo.txt", FILE_READ);
                        while((s = fgets(fh)))
@@ -728,13 +687,14 @@ void GameCommand_effectindexdump(float request)
                                {
                                        if(db_get(d, argv(1)) != "1")
                                        {
-                                               if(particleeffectnum(argv(1)) >= 0)
-                                                       print("effect ", argv(1), " is ", ftos(particleeffectnum(argv(1))), "\n");
+                                               int i = _particleeffectnum(argv(1));
+                                               if(i >= 0)
+                                                       LOG_INFO("effect ", argv(1), " is ", ftos(i), "\n");
                                                db_put(d, argv(1), "1");
                                        }
                                }
                        }
-                       print("end of effects list\n");
+                       LOG_INFO("end of effects list\n");
 
                        db_close(d);
                        return;
@@ -743,8 +703,8 @@ void GameCommand_effectindexdump(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd effectindexdump\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd effectindexdump\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -763,9 +723,9 @@ void GameCommand_extendmatchtime(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd extendmatchtime\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2reducematchtime^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd extendmatchtime\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2reducematchtime^7\n");
                        return;
                }
        }
@@ -780,17 +740,17 @@ void GameCommand_find(float request, float argc)  // is this even needed? We hav
                        entity client;
 
                        for(client = world; (client = find(client, classname, argv(1))); )
-                               print(etos(client), "\n");
+                               LOG_INFO(etos(client), "\n");
 
                        return;
                }
 
                default:
-                       print("Incorrect parameters for ^2find^7\n");
+                       LOG_INFO("Incorrect parameters for ^2find^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd find classname\n");
-                       print("  Where 'classname' is the classname to search for.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd find classname\n");
+                       LOG_INFO("  Where 'classname' is the classname to search for.\n");
                        return;
                }
        }
@@ -833,12 +793,12 @@ void GameCommand_gametype(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2gametype^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gametype^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gametype mode\n");
-                       print("  Where 'mode' is the gametype mode to switch to.\n");
-                       print("See also: ^2gotomap^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gametype mode\n");
+                       LOG_INFO("  Where 'mode' is the gametype mode to switch to.\n");
+                       LOG_INFO("See also: ^2gotomap^7\n");
                        return;
                }
        }
@@ -872,13 +832,13 @@ void GameCommand_gettaginfo(float request, float argc)
                                if(i)
                                {
                                        v = gettaginfo(tmp_entity, i);
-                                       print("model ", tmp_entity.model, " frame ", ftos(tmp_entity.frame), " tag ", gettaginfo_name);
-                                       print(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
-                                       print(" vector = ", ftos(v.x), " ", ftos(v.y), " ", ftos(v.z), "\n");
-                                       print(" offset = ", ftos(gettaginfo_offset.x), " ", ftos(gettaginfo_offset.y), " ", ftos(gettaginfo_offset.z), "\n");
-                                       print(" forward = ", ftos(gettaginfo_forward.x), " ", ftos(gettaginfo_forward.y), " ", ftos(gettaginfo_forward.z), "\n");
-                                       print(" right = ", ftos(gettaginfo_right.x), " ", ftos(gettaginfo_right.y), " ", ftos(gettaginfo_right.z), "\n");
-                                       print(" up = ", ftos(gettaginfo_up.x), " ", ftos(gettaginfo_up.y), " ", ftos(gettaginfo_up.z), "\n");
+                                       LOG_INFO("model ", tmp_entity.model, " frame ", ftos(tmp_entity.frame), " tag ", gettaginfo_name);
+                                       LOG_INFO(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
+                                       LOG_INFO(" vector = ", ftos(v.x), " ", ftos(v.y), " ", ftos(v.z), "\n");
+                                       LOG_INFO(" offset = ", ftos(gettaginfo_offset.x), " ", ftos(gettaginfo_offset.y), " ", ftos(gettaginfo_offset.z), "\n");
+                                       LOG_INFO(" forward = ", ftos(gettaginfo_forward.x), " ", ftos(gettaginfo_forward.y), " ", ftos(gettaginfo_forward.z), "\n");
+                                       LOG_INFO(" right = ", ftos(gettaginfo_right.x), " ", ftos(gettaginfo_right.y), " ", ftos(gettaginfo_right.z), "\n");
+                                       LOG_INFO(" up = ", ftos(gettaginfo_up.x), " ", ftos(gettaginfo_up.y), " ", ftos(gettaginfo_up.z), "\n");
                                        if(argc >= 6)
                                        {
                                                v.y = -v.y;
@@ -886,7 +846,7 @@ void GameCommand_gettaginfo(float request, float argc)
                                        }
                                }
                                else
-                                       print("bone not found\n");
+                                       LOG_INFO("bone not found\n");
 
                                remove(tmp_entity);
                                return;
@@ -894,11 +854,11 @@ void GameCommand_gettaginfo(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2gettaginfo^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gettaginfo^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
-                       print("See also: ^2bbox, trace^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
+                       LOG_INFO("See also: ^2bbox, trace^7\n");
                        return;
                }
        }
@@ -941,8 +901,8 @@ void GameCommand_animbench(float request, float argc)
                                        t2 += gettime(GETTIME_HIRES) - t0;
                                        n += 1;
                                }
-                               print("model ", tmp_entity.model, " frame ", ftos(f1), " animtime ", ftos(n / t1), "/s\n");
-                               print("model ", tmp_entity.model, " frame ", ftos(f2), " animtime ", ftos(n / t2), "/s\n");
+                               LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f1), " animtime ", ftos(n / t1), "/s\n");
+                               LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f2), " animtime ", ftos(n / t2), "/s\n");
 
                                remove(tmp_entity);
                                return;
@@ -950,11 +910,11 @@ void GameCommand_animbench(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2gettaginfo^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gettaginfo^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
-                       print("See also: ^2bbox, trace^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
+                       LOG_INFO("See also: ^2bbox, trace^7\n");
                        return;
                }
        }
@@ -968,18 +928,18 @@ void GameCommand_gotomap(float request, float argc)
                {
                        if(argv(1))
                        {
-                               print(GotoMap(argv(1)), "\n");
+                               LOG_INFO(GotoMap(argv(1)), "\n");
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2gotomap^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gotomap^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gotomap map\n");
-                       print("  Where 'map' is the *.bsp file to change to.\n");
-                       print("See also: ^2gametype^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gotomap map\n");
+                       LOG_INFO("  Where 'map' is the *.bsp file to change to.\n");
+                       LOG_INFO("See also: ^2gametype^7\n");
                        return;
                }
        }
@@ -1006,9 +966,9 @@ void GameCommand_lockteams(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd lockteams\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2unlockteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd lockteams\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2unlockteams^7\n");
                        return;
                }
        }
@@ -1033,9 +993,9 @@ void GameCommand_make_mapinfo(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd make_mapinfo\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2radarmap^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd make_mapinfo\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2radarmap^7\n");
                        return;
                }
        }
@@ -1070,7 +1030,7 @@ void GameCommand_moveplayer(float request, float argc)
 
                                        if(accepted <= 0)
                                        {
-                                               print("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
+                                               LOG_INFO("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
                                                continue;
                                        }
 
@@ -1088,7 +1048,7 @@ void GameCommand_moveplayer(float request, float argc)
                                                }
                                                else
                                                {
-                                                       print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already spectating.\n");
+                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already spectating.\n");
                                                }
                                                continue;
                                        }
@@ -1108,7 +1068,7 @@ void GameCommand_moveplayer(float request, float argc)
                                                                if(team_id == client.team) // already on the destination team
                                                                {
                                                                        // keep the forcing undone
-                                                                       print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
+                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
                                                                        continue;
                                                                }
                                                                else if(team_id == 0)  // auto team
@@ -1125,30 +1085,30 @@ void GameCommand_moveplayer(float request, float argc)
                                                                // Check to see if the destination team is even available
                                                                switch(team_id)
                                                                {
-                                                                       case NUM_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
-                                                                       case NUM_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
-                                                                       case NUM_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
-                                                                       case NUM_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_1: if(c1 == -1) { LOG_INFO("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_2: if(c2 == -1) { LOG_INFO("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_3: if(c3 == -1) { LOG_INFO("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_4: if(c4 == -1) { LOG_INFO("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
 
-                                                                       default: print("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
+                                                                       default: LOG_INFO("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
                                                                }
 
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
                                                                MoveToTeam(client, team_id, 6);
                                                                successful = strcat(successful, (successful ? ", " : ""), client.netname);
-                                                               print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
+                                                               LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
                                                                continue;
                                                        }
                                                        else
                                                        {
-                                                               print("Can't change teams when currently not playing a team game.\n");
+                                                               LOG_INFO("Can't change teams when currently not playing a team game.\n");
                                                                return;
                                                        }
                                                }
                                                else
                                                {
-                                                       print("Can't change teams if the player isn't in the game.\n"); // well technically we could, but should we allow that? :P
+                                                       LOG_INFO("Can't change teams if the player isn't in the game.\n"); // well technically we could, but should we allow that? :P
                                                        return;
                                                }
                                        }
@@ -1157,23 +1117,23 @@ void GameCommand_moveplayer(float request, float argc)
                                if(successful)
                                        bprint("Successfully moved players ", successful, " to destination ", destination, ".\n");
                                else
-                                       print("No players given (", original_targets, ") are able to move.\n");
+                                       LOG_INFO("No players given (", original_targets, ") are able to move.\n");
 
                                return; // still correct parameters so return to avoid usage print
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2moveplayer^7\n");
+                       LOG_INFO("Incorrect parameters for ^2moveplayer^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd moveplayer clients destination\n");
-                       print("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
-                       print("  'destination' is what to send the player to, be it team or spectating\n");
-                       print("  Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
-                       print("Examples: sv_cmd moveplayer 1,3,5 red 3\n");
-                       print("          sv_cmd moveplayer 2 spec \n");
-                       print("See also: ^2allspec, shuffleteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd moveplayer clients destination\n");
+                       LOG_INFO("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
+                       LOG_INFO("  'destination' is what to send the player to, be it team or spectating\n");
+                       LOG_INFO("  Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
+                       LOG_INFO("Examples: sv_cmd moveplayer 1,3,5 red 3\n");
+                       LOG_INFO("          sv_cmd moveplayer 2 spec \n");
+                       LOG_INFO("See also: ^2allspec, shuffleteams^7\n");
                        return;
                }
        }
@@ -1203,8 +1163,8 @@ void GameCommand_nospectators(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd nospectators\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd nospectators\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -1230,7 +1190,7 @@ void GameCommand_playerdemo(float request, float argc)
 
                                                if(accepted <= 0)
                                                {
-                                                       print("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n");
+                                                       LOG_INFO("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n");
                                                        return;
                                                }
 
@@ -1246,7 +1206,7 @@ void GameCommand_playerdemo(float request, float argc)
 
                                                if(accepted <= 0)
                                                {
-                                                       print("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n");
+                                                       LOG_INFO("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n");
                                                        return;
                                                }
 
@@ -1281,11 +1241,11 @@ void GameCommand_playerdemo(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2playerdemo^7\n");
+                       LOG_INFO("Incorrect parameters for ^2playerdemo^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)\n");
-                       print("  Full list of commands here: \"read, write, auto_read_and_write, auto_read.\"\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)\n");
+                       LOG_INFO("  Full list of commands here: \"read, write, auto_read_and_write, auto_read.\"\n");
                        return;
                }
        }
@@ -1298,15 +1258,15 @@ void GameCommand_printstats(float request)
                case CMD_REQUEST_COMMAND:
                {
                        DumpStats(false);
-                       print("stats dumped.\n");
+                       LOG_INFO("stats dumped.\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd printstats\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd printstats\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -1323,13 +1283,13 @@ void GameCommand_radarmap(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2radarmap^7\n");
+                       LOG_INFO("Incorrect parameters for ^2radarmap^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
-                       print("  The quality factor Q is roughly proportional to the time taken.\n");
-                       print("  trace supports no quality factor; its result should look like --block with infinite quality factor.\n");
-                       print("See also: ^2make_mapinfo^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
+                       LOG_INFO("  The quality factor Q is roughly proportional to the time taken.\n");
+                       LOG_INFO("  trace supports no quality factor; its result should look like --block with infinite quality factor.\n");
+                       LOG_INFO("See also: ^2make_mapinfo^7\n");
                        return;
                }
        }
@@ -1348,9 +1308,9 @@ void GameCommand_reducematchtime(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd reducematchtime\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2extendmatchtime^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd reducematchtime\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2extendmatchtime^7\n");
                        return;
                }
        }
@@ -1372,12 +1332,12 @@ void GameCommand_setbots(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2setbots^7\n");
+                       LOG_INFO("Incorrect parameters for ^2setbots^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd setbots botnumber\n");
-                       print("  Where 'botnumber' is the amount of bots to set bot_number cvar to.\n");
-                       print("See also: ^2bot_cmd^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd setbots botnumber\n");
+                       LOG_INFO("  Where 'botnumber' is the amount of bots to set bot_number cvar to.\n");
+                       LOG_INFO("See also: ^2bot_cmd^7\n");
                        return;
                }
        }
@@ -1475,7 +1435,7 @@ void GameCommand_shuffleteams(float request)
                        }
                        else
                        {
-                               print("Can't shuffle teams when currently not playing a team game.\n");
+                               LOG_INFO("Can't shuffle teams when currently not playing a team game.\n");
                        }
 
                        return;
@@ -1484,9 +1444,9 @@ void GameCommand_shuffleteams(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd shuffleteams\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2moveplayer, allspec^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd shuffleteams\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2moveplayer, allspec^7\n");
                        return;
                }
        }
@@ -1512,29 +1472,29 @@ void GameCommand_stuffto(float request, float argc)
                                if(accepted > 0)
                                {
                                        stuffcmd(client, strcat("\n", argv(next_token), "\n"));
-                                       print(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1) ,").\n"));
+                                       LOG_INFO(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1) ,").\n"));
                                }
                                else
-                                       print("stuffto: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("stuffto: ", GetClientErrorString(accepted, argv(1)), ".\n");
 
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2stuffto^7\n");
+                       LOG_INFO("Incorrect parameters for ^2stuffto^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd stuffto client \"command\"\n");
-                       print("  'client' is the entity number or name of the player,\n");
-                       print("  and 'command' is the command to be sent to that player.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd stuffto client \"command\"\n");
+                       LOG_INFO("  'client' is the entity number or name of the player,\n");
+                       LOG_INFO("  and 'command' is the command to be sent to that player.\n");
                        return;
                }
        }
        #else
        if(request)
        {
-               print("stuffto command is not enabled on this server.\n");
+               LOG_INFO("stuffto command is not enabled on this server.\n");
                return;
        }
        #endif
@@ -1555,7 +1515,7 @@ void GameCommand_trace(float request, float argc)
                                case "debug":
                                {
                                        float hitcount = 0;
-                                       print("TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.\n");
+                                       LOG_INFO("TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.\n");
                                        float worst_endpos_bug = 0;
                                        for (;;)
                                        {
@@ -1604,14 +1564,14 @@ void GameCommand_trace(float request, float argc)
                                                                        }
                                                                }
 
-                                                               print("safe distance to back off: ", ftos(safe * vlen(p - start)), "qu\n");
-                                                               print("unsafe distance to back off: ", ftos(unsafe * vlen(p - start)), "qu\n");
+                                                               LOG_INFO("safe distance to back off: ", ftos(safe * vlen(p - start)), "qu\n");
+                                                               LOG_INFO("unsafe distance to back off: ", ftos(unsafe * vlen(p - start)), "qu\n");
 
                                                                tracebox(p, PL_MIN + '0.1 0.1 0.1', PL_MAX - '0.1 0.1 0.1', p, MOVE_NOMONSTERS, world);
                                                                if(trace_startsolid)
-                                                                       print("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
+                                                                       LOG_INFO("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
                                                                else
-                                                                       print("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
+                                                                       LOG_INFO("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
                                                                if (++hitcount >= 10)
                                                                        break;
                                                        }
@@ -1636,8 +1596,8 @@ void GameCommand_trace(float request, float argc)
                                                                if(dq > worst_endpos_bug)
                                                                {
                                                                        worst_endpos_bug = dq;
-                                                                       print("trace_endpos still before solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
-                                                                       print("could go ", ftos(dq), " units further to ", vtos(q), "\n");
+                                                                       LOG_INFO("trace_endpos still before solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
+                                                                       LOG_INFO("could go ", ftos(dq), " units further to ", vtos(q), "\n");
                                                                        if (++hitcount >= 10)
                                                                                break;
                                                                }
@@ -1654,7 +1614,7 @@ void GameCommand_trace(float request, float argc)
                                        vv = trace_endpos;
                                        if(trace_fraction == 1)
                                        {
-                                               print("not above ground, aborting\n");
+                                               LOG_INFO("not above ground, aborting\n");
                                                return;
                                        }
                                        f = 0;
@@ -1665,16 +1625,16 @@ void GameCommand_trace(float request, float argc)
                                                        dv = -1 * dv;
                                                tracebox(vv, e.mins, e.maxs, vv + dv, MOVE_NORMAL, e);
                                                if(trace_startsolid)
-                                                       print("bug 1\n");
+                                                       LOG_INFO("bug 1\n");
                                                if(trace_fraction == 1)
                                                if(dv.z < f)
                                                {
-                                                       print("bug 2: ", ftos(dv.x), " ", ftos(dv.y), " ", ftos(dv.z));
-                                                       print(" (", ftos(asin(dv.z / vlen(dv)) * 180 / M_PI), " degrees)\n");
+                                                       LOG_INFO("bug 2: ", ftos(dv.x), " ", ftos(dv.y), " ", ftos(dv.z));
+                                                       LOG_INFO(" (", ftos(asin(dv.z / vlen(dv)) * 180 / M_PI), " degrees)\n");
                                                        f = dv.z;
                                                }
                                        }
-                                       print("highest possible dist: ", ftos(f), "\n");
+                                       LOG_INFO("highest possible dist: ", ftos(f), "\n");
                                        return;
                                }
 
@@ -1684,9 +1644,9 @@ void GameCommand_trace(float request, float argc)
                                        {
                                                e = nextent(world);
                                                if(tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), MOVE_NORMAL))
-                                                       print("can walk\n");
+                                                       LOG_INFO("can walk\n");
                                                else
-                                                       print("cannot walk\n");
+                                                       LOG_INFO("cannot walk\n");
                                                return;
                                        }
                                }
@@ -1698,8 +1658,8 @@ void GameCommand_trace(float request, float argc)
                                                vv = stov(argv(2));
                                                dv = stov(argv(3));
                                                traceline(vv, dv, MOVE_NORMAL, world);
-                                               trailparticles(world, particleeffectnum("TR_NEXUIZPLASMA"), vv, trace_endpos);
-                                               trailparticles(world, particleeffectnum("TR_CRYLINKPLASMA"), trace_endpos, dv);
+                                               trailparticles(world, particleeffectnum(EFFECT_TR_NEXUIZPLASMA), vv, trace_endpos);
+                                               trailparticles(world, particleeffectnum(EFFECT_TR_CRYLINKPLASMA), trace_endpos, dv);
                                                return;
                                        }
                                }
@@ -1709,12 +1669,12 @@ void GameCommand_trace(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2trace^7\n");
+                       LOG_INFO("Incorrect parameters for ^2trace^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd trace command (startpos endpos)\n");
-                       print("  Full list of commands here: \"debug, debug2, walk, showline.\"\n");
-                       print("See also: ^2bbox, gettaginfo^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd trace command (startpos endpos)\n");
+                       LOG_INFO("  Full list of commands here: \"debug, debug2, walk, showline.\"\n");
+                       LOG_INFO("See also: ^2bbox, gettaginfo^7\n");
                        return;
                }
        }
@@ -1741,9 +1701,9 @@ void GameCommand_unlockteams(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd unlockteams\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2lockteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd unlockteams\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2lockteams^7\n");
                        return;
                }
        }
@@ -1760,25 +1720,25 @@ void GameCommand_warp(float request, float argc)
                                if(argc >= 2)
                                {
                                        CampaignLevelWarp(stof(argv(1)));
-                                       print("Successfully warped to campaign level ", stof(argv(1)), ".\n");
+                                       LOG_INFO("Successfully warped to campaign level ", stof(argv(1)), ".\n");
                                }
                                else
                                {
                                        CampaignLevelWarp(-1);
-                                       print("Successfully warped to next campaign level.\n");
+                                       LOG_INFO("Successfully warped to next campaign level.\n");
                                }
                        }
                        else
-                               print("Not in campaign, can't level warp\n");
+                               LOG_INFO("Not in campaign, can't level warp\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd warp [level]\n");
-                       print("  'level' is the level to change campaign mode to.\n");
-                       print("  if 'level' is not provided it will change to the next level.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd warp [level]\n");
+                       LOG_INFO("  'level' is the level to change campaign mode to.\n");
+                       LOG_INFO("  if 'level' is not provided it will change to the next level.\n");
                        return;
                }
        }
@@ -1815,7 +1775,6 @@ void GameCommand_(float request)
 // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
 #define SERVER_COMMANDS(request,arguments,command) \
        SERVER_COMMAND("adminmsg", GameCommand_adminmsg(request, arguments), "Send an admin message to a client directly") \
-       SERVER_COMMAND("mobbutcher", GameCommand_mobbutcher(request), "Instantly removes all monsters on the map") \
        SERVER_COMMAND("allready", GameCommand_allready(request), "Restart the server and reset the players") \
        SERVER_COMMAND("allspec", GameCommand_allspec(request, arguments), "Force all players to spectate") \
        SERVER_COMMAND("anticheat", GameCommand_anticheat(request, arguments), "Create an anticheat report for a client") \
@@ -1852,7 +1811,7 @@ void GameCommand_(float request)
 void GameCommand_macro_help()
 {
        #define SERVER_COMMAND(name,function,description) \
-               { print("  ^2", name, "^7: ", description, "\n"); }
+               { LOG_INFO("  ^2", name, "^7: ", description, "\n"); }
 
        SERVER_COMMANDS(0, 0, "");
        #undef SERVER_COMMAND
@@ -1912,20 +1871,20 @@ void GameCommand(string command)
        {
                if(argc == 1)
                {
-                       print("\nServer console commands:\n");
+                       LOG_INFO("\nServer console commands:\n");
                        GameCommand_macro_help();
 
-                       print("\nBanning commands:\n");
+                       LOG_INFO("\nBanning commands:\n");
                        BanCommand_macro_help();
 
-                       print("\nCommon networked commands:\n");
+                       LOG_INFO("\nCommon networked commands:\n");
                        CommonCommand_macro_help(world);
 
-                       print("\nGeneric commands shared by all programs:\n");
+                       LOG_INFO("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
 
-                       print("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
-                       print("For help about a specific command, type sv_cmd help COMMAND\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
+                       LOG_INFO("For help about a specific command, type sv_cmd help COMMAND\n");
 
                        return;
                }
@@ -1964,7 +1923,7 @@ void GameCommand(string command)
        }
 
        // nothing above caught the command, must be invalid
-       print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
+       LOG_INFO(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
 
        return;
 }
index 52b15b0953fabc047fcefb668db5c6143bb6221f..40dbf1aefa9f99822433ffbdae96ddd2fbf3cd6e 100644 (file)
@@ -22,7 +22,7 @@
 
 void entcs_init()
 {
-       print("Initializing ClientSide information entities\n");
+       LOG_INFO("Initializing ClientSide information entities\n");
 }
 
 float entcs_customize()
index 967a475e17c577e3929bed7a10e0307f1bda0627..39ad85c6dbabf69e93ab8b97b645effbaea93e8b 100644 (file)
@@ -297,7 +297,7 @@ float Obituary_WeaponDeath(
                }
                else
                {
-                       dprintf(
+                       LOG_TRACEF(
                                "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
                                deathtype,
                                death_weapon
@@ -758,7 +758,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        {
                                Unfreeze(targ);
                                targ.health = autocvar_g_freezetag_revive_falldamage_health;
-                               Send_Effect("iceorglass", targ.origin, '0 0 0', 3);
+                               Send_Effect(EFFECT_ICEORGLASS, targ.origin, '0 0 0', 3);
                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, targ.netname);
                                Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);
                        }
@@ -769,7 +769,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
 
                if(targ.frozen && deathtype == DEATH_HURTTRIGGER && !autocvar_g_freezetag_frozen_damage_trigger)
                {
-                       Send_Effect("teleport", targ.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_TELEPORT, targ.origin, '0 0 0', 1);
 
                        entity oldself = self;
                        self = targ;
@@ -799,7 +799,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                self.oldorigin = self.origin;
                                self.prevorigin = self.origin;
 
-                               Send_Effect("teleport", self.origin, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, self.origin, '0 0 0', 1);
                        }
 
                        self = oldself;
@@ -1040,13 +1040,13 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                mininv_f = (vlen(force) * (1-tfloorforce)) / autocvar_g_throughfloor_force_max_stddev;
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f);
+                                                       LOG_INFOF("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f);
 
 
                                                total = 0.25 * pow(max(mininv_f, mininv_d), 2);
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf(" steps=%f", total);
+                                                       LOG_INFOF(" steps=%f", total);
 
 
                                                if (IS_PLAYER(targ))
@@ -1055,7 +1055,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                        total = ceil(bound(autocvar_g_throughfloor_min_steps_other, total, autocvar_g_throughfloor_max_steps_other));
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total)));
+                                                       LOG_INFOF(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total)));
 
                                                for(c = 0; c < total; ++c)
                                                {
@@ -1082,7 +1082,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                force = force * a;
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf(" D=%f F=%f\n", finaldmg, vlen(force));
+                                                       LOG_INFOF(" D=%f F=%f\n", finaldmg, vlen(force));
                                        }
 
                                        //if (targ == attacker)
index 866f71f72e0e3fa6674a8e0ea9af48f5e316cde9..a9b16d002f567c7edb91852f666826f8c7fd4c0a 100644 (file)
@@ -90,7 +90,7 @@ void GrapplingHookReset(void)
 void GrapplingHookThink();
 void GrapplingHook_Stop()
 {
-       Send_Effect("grapple_impact", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_HOOK_IMPACT, self.origin, '0 0 0', 1);
        sound (self, CH_SHOTS, W_Sound("hook_impact"), VOL_BASE, ATTEN_NORM);
 
        self.state = 1;
@@ -333,7 +333,7 @@ void FireGrapplingHook (void)
        tracebox(self.origin + self.view_ofs, '-3 -3 -3', '3 3 3', org, MOVE_NORMAL, self);
        org = trace_endpos;
 
-       Send_Effect("grapple_muzzleflash", org, '0 0 0', 1);
+       Send_Effect(EFFECT_HOOK_MUZZLEFLASH, org, '0 0 0', 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
index 01bf62f82ba37591ecfa10ba47ddc0fe74a7eccb..3a242dcf32a81f157220ee8f95446589193aeaec 100644 (file)
@@ -187,10 +187,10 @@ float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomon
 
                if(c == 50)
                {
-                       dprint("HOLY SHIT! When tracing from ", vtos(v1), " to ", vtos(v2), "\n");
-                       dprint("  Nudging gets us nowhere at ", vtos(pos), "\n");
-                       dprint("  trace_endpos is ", vtos(trace_endpos), "\n");
-                       dprint("  trace distance is ", ftos(vlen(pos - trace_endpos)), "\n");
+                       LOG_TRACE("HOLY SHIT! When tracing from ", vtos(v1), " to ", vtos(v2), "\n");
+                       LOG_TRACE("  Nudging gets us nowhere at ", vtos(pos), "\n");
+                       LOG_TRACE("  trace_endpos is ", vtos(trace_endpos), "\n");
+                       LOG_TRACE("  trace distance is ", ftos(vlen(pos - trace_endpos)), "\n");
                }
 
                stopentity = trace_ent;
index 70a316386e83d89458bca578c84284acb725eb5c..54577eca7429b9fe726d8edc3d12a0172a2ff9b4 100644 (file)
@@ -305,8 +305,8 @@ void PieceMinsMaxs(float rot, float pc)
                // TODO OPTIMIZE
        }
 #ifdef VERIFY
-       print(vtos(tet_piecemins), "-");
-       print(vtos(tet_piecemaxs), "\n");
+       LOG_INFO(vtos(tet_piecemins), "-");
+       LOG_INFO(vtos(tet_piecemaxs), "\n");
        if(tet_piecemins.x > tet_piecemaxs.x)
                error("inconsistent mins/maxs");
        if(tet_piecemins.y > tet_piecemaxs.y)
@@ -548,12 +548,12 @@ void PrintField()
        for(r = 1; r <= TET_LINES; ++r)
        {
                l = GetLine(r);
-               print(">");
+               LOG_INFO(">");
                for(c = 1; c <= TET_WIDTH; ++c)
                {
-                       print(ftos(GetXBlock(c, l)));
+                       LOG_INFO(ftos(GetXBlock(c, l)));
                }
-               print("\n");
+               LOG_INFO("\n");
        }
 }
 
@@ -706,7 +706,7 @@ float BastetPiece()
        b = buf_create(); bastet_piece[6] = 7; bastet_score[6] = BastetSearch(b, 7, TET_START_PIECE_POS_x, 1+TET_START_PIECE_POS_y, TET_START_PIECE_POS_y, TET_WIDTH) + 100 * random() + bastet_piecetime[6]; buf_del(b);
 
        float t2 = gettime(GETTIME_HIRES);
-       dprintf("Time taken: %.6f seconds (of this, ev = %.2f%%, cm = %.2f%%)\n", t2 - t1, 100 * bastet_profile_evaluate_time / (t2 - t1), 100 * bastet_profile_checkmetrics_time / (t2 - t1));
+       LOG_TRACEF("Time taken: %.6f seconds (of this, ev = %.2f%%, cm = %.2f%%)\n", t2 - t1, 100 * bastet_profile_evaluate_time / (t2 - t1), 100 * bastet_profile_checkmetrics_time / (t2 - t1));
 
        // sort
        float i, j, k, p, s;
@@ -1256,7 +1256,7 @@ float TetrisPostFrame()
        if (autocvar_g_bastet)
        {
                cvar_set("g_bastet", "0");
-               print("The useless cvar has been toggled.\n");
+               LOG_INFO("The useless cvar has been toggled.\n");
        }
        return 0;
 }
index 722a8da753cd7158b72cb5d4cca6e47968b6ddaa..15c1ae68deebc79c6ede8126f218c3f4febb7c59 100644 (file)
@@ -146,7 +146,7 @@ void GotoFirstMap()
        else
        {
                self.nextthink = time + 1;
-               print("Waiting for _sv_init being set to 1 by initialization scripts...\n");
+               LOG_INFO("Waiting for _sv_init being set to 1 by initialization scripts...\n");
        }
 }
 
@@ -350,6 +350,8 @@ void cvar_changes_init()
                BADPREFIX("timelimit_");
                BADCVAR("gameversion");
                BADPREFIX("gameversion_");
+               BADCVAR("sv_minigames");
+               BADPREFIX("sv_minigames_");
                BADCVAR("sv_namechangetimer");
 
                // allowed changes to server admins (please sync this to server.cfg)
@@ -501,7 +503,7 @@ void detect_maptype()
                        tracebox(o, '-1 -1 -1' * i, '1 1 1' * i, o - '0 0 32768', MOVE_WORLDONLY, world);
        if(trace_fraction == 1)
                continue;
-                       print(ftos(i), " -> ", vtos(trace_endpos), "\n");
+                       LOG_INFO(ftos(i), " -> ", vtos(trace_endpos), "\n");
                }
 
                break;
@@ -562,7 +564,6 @@ void spawnfunc___init_dedicated_server(void)
        CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
-       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
@@ -610,7 +611,6 @@ void spawnfunc_worldspawn (void)
        CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
-       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        initialize_minigames();
 
@@ -755,23 +755,23 @@ void spawnfunc_worldspawn (void)
                                        continue;
                                if(argv(0) == "cd")
                                {
-                                       print("Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n");
-                                       print("  cdtrack ", argv(2), "\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n");
+                                       LOG_INFO("  cdtrack ", argv(2), "\n");
                                }
                                else if(argv(0) == "fog")
                                {
-                                       print("Found ^1UNSUPPORTED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n");
-                                       print("  \"fog\" \"", s, "\"\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n");
+                                       LOG_INFO("  \"fog\" \"", s, "\"\n");
                                }
                                else if(argv(0) == "set")
                                {
-                                       print("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
-                                       print("  clientsettemp_for_type all ", argv(1), " ", argv(2), "\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
+                                       LOG_INFO("  clientsettemp_for_type all ", argv(1), " ", argv(2), "\n");
                                }
                                else if(argv(0) != "//")
                                {
-                                       print("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
-                                       print("  clientsettemp_for_type all ", argv(0), " ", argv(1), "\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
+                                       LOG_INFO("  clientsettemp_for_type all ", argv(0), " ", argv(1), "\n");
                                }
                        }
                        fclose(fd);
@@ -972,39 +972,39 @@ float MapHasRightSize(string map)
        if(currentbots || autocvar_bot_number || player_count < autocvar_minplayers)
        if(autocvar_g_maplist_check_waypoints)
        {
-               dprint("checkwp "); dprint(map);
+               LOG_TRACE("checkwp "); LOG_TRACE(map);
                if(!fexists(strcat("maps/", map, ".waypoints")))
                {
-                       dprint(": no waypoints\n");
+                       LOG_TRACE(": no waypoints\n");
                        return false;
                }
-               dprint(": has waypoints\n");
+               LOG_TRACE(": has waypoints\n");
        }
 
        // open map size restriction file
-       dprint("opensize "); dprint(map);
+       LOG_TRACE("opensize "); LOG_TRACE(map);
        fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
        if(fh >= 0)
        {
                float mapmin, mapmax;
-               dprint(": ok, ");
+               LOG_TRACE(": ok, ");
                mapmin = stof(fgets(fh));
                mapmax = stof(fgets(fh));
                fclose(fh);
                if(player_count < mapmin)
                {
-                       dprint("not enough\n");
+                       LOG_TRACE("not enough\n");
                        return false;
                }
                if(player_count > mapmax)
                {
-                       dprint("too many\n");
+                       LOG_TRACE("too many\n");
                        return false;
                }
-               dprint("right size\n");
+               LOG_TRACE("right size\n");
                return true;
        }
-       dprint(": not found\n");
+       LOG_TRACE(": not found\n");
        return true;
 }
 
@@ -1059,7 +1059,7 @@ float Map_Check(float position, float pass)
                return 0;
        }
        else
-               dprint( "Couldn't select '", filename, "'..\n" );
+               LOG_TRACE( "Couldn't select '", filename, "'..\n" );
 
        return 0;
 }
@@ -1092,7 +1092,7 @@ float() MaplistMethod_Iterate = // usual method
 {
        float pass, i;
 
-       dprint("Trying MaplistMethod_Iterate\n");
+       LOG_TRACE("Trying MaplistMethod_Iterate\n");
 
        for(pass = 1; pass <= 2; ++pass)
        {
@@ -1109,7 +1109,7 @@ float() MaplistMethod_Iterate = // usual method
 
 float() MaplistMethod_Repeat = // fallback method
 {
-       dprint("Trying MaplistMethod_Repeat\n");
+       LOG_TRACE("Trying MaplistMethod_Repeat\n");
 
        if(Map_Check(Map_Current, 2))
                return Map_Current;
@@ -1120,7 +1120,7 @@ float() MaplistMethod_Random = // random map selection
 {
        float i, imax;
 
-       dprint("Trying MaplistMethod_Random\n");
+       LOG_TRACE("Trying MaplistMethod_Random\n");
 
        imax = 42;
 
@@ -1140,7 +1140,7 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
 {
        float i, j, imax, insertpos;
 
-       dprint("Trying MaplistMethod_Shuffle\n");
+       LOG_TRACE("Trying MaplistMethod_Shuffle\n");
 
        imax = 42;
 
@@ -1152,7 +1152,7 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
                insertpos = pow(random(), 1 / exponent);       // ]0, 1]
                insertpos = insertpos * (Map_Count - 1);       // ]0, Map_Count - 1]
                insertpos = ceil(insertpos) + 1;               // {2, 3, 4, ..., Map_Count}
-               dprint("SHUFFLE: insert pos = ", ftos(insertpos), "\n");
+               LOG_TRACE("SHUFFLE: insert pos = ", ftos(insertpos), "\n");
 
                // insert the current map there
                newlist = "";
@@ -1428,7 +1428,7 @@ void DumpStats(float final)
        s = strcat(s, GetGametype(), "_", GetMapname(), ":", ftos(rint(time)));
 
        if(to_console)
-               print(s, "\n");
+               LOG_INFO(s, "\n");
        if(to_eventlog)
                GameLogEcho(s);
 
@@ -1444,7 +1444,7 @@ void DumpStats(float final)
 
        s = strcat(":labels:player:", GetPlayerScoreString(world, 0));
        if(to_console)
-               print(s, "\n");
+               LOG_INFO(s, "\n");
        if(to_eventlog)
                GameLogEcho(s);
        if(to_file)
@@ -1462,7 +1462,7 @@ void DumpStats(float final)
                                s = strcat(s, "spectator:");
 
                        if(to_console)
-                               print(s, other.netname, "\n");
+                               LOG_INFO(s, other.netname, "\n");
                        if(to_eventlog)
                                GameLogEcho(strcat(s, ftos(other.playerid), ":", other.netname));
                        if(to_file)
@@ -1474,7 +1474,7 @@ void DumpStats(float final)
        {
                s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0));
                if(to_console)
-                       print(s, "\n");
+                       LOG_INFO(s, "\n");
                if(to_eventlog)
                        GameLogEcho(s);
                if(to_file)
@@ -1485,7 +1485,7 @@ void DumpStats(float final)
                        s = strcat(":teamscores:see-labels:", GetTeamScoreString(i, 0));
                        s = strcat(s, ":", ftos(i));
                        if(to_console)
-                               print(s, "\n");
+                               LOG_INFO(s, "\n");
                        if(to_eventlog)
                                GameLogEcho(s);
                        if(to_file)
@@ -1494,7 +1494,7 @@ void DumpStats(float final)
        }
 
        if(to_console)
-               print(":end\n");
+               LOG_INFO(":end\n");
        if(to_eventlog)
                GameLogEcho(":end");
        if(to_file)
@@ -1799,7 +1799,7 @@ float WinningCondition_LMS()
                {
                        // SNAFU (maybe a draw game?)
                        ClearWinners();
-                       dprint("No players, ending game.\n");
+                       LOG_TRACE("No players, ending game.\n");
                        return WINNING_YES;
                }
        }
@@ -1855,7 +1855,7 @@ float WinningCondition_Scores(float limit, float leadlimit)
        if(WinningConditionHelper_zeroisworst)
                leadlimit = 0; // not supported in this mode
 
-       if(g_dm || g_tdm || g_ca || g_freezetag || (g_race && !g_race_qualifying) || g_nexball)
+       if(MUTATOR_CALLHOOK(Scores_CountFragsRemaining))
        // these modes always score in increments of 1, thus this makes sense
        {
                if(leaderfrags != WinningConditionHelper_topscore)
@@ -2266,7 +2266,7 @@ float RedirectionThink()
        FOR_EACH_REALCLIENT(self)
        {
                // TODO add timer
-               print("Redirecting: sending connect command to ", self.netname, "\n");
+               LOG_INFO("Redirecting: sending connect command to ", self.netname, "\n");
                if(redirection_target == "self")
                        stuffcmd(self, "\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " reconnect\n");
                else
@@ -2274,7 +2274,7 @@ float RedirectionThink()
                ++clients_found;
        }
 
-       print("Redirecting: ", ftos(clients_found), " clients left.\n");
+       LOG_INFO("Redirecting: ", ftos(clients_found), " clients left.\n");
 
        if(time > redirection_timeout || clients_found == 0)
                localcmd("\nwait; wait; wait; quit\n");
@@ -2307,7 +2307,7 @@ void Shutdown()
        if(world_initialized > 0)
        {
                world_initialized = 0;
-               print("Saving persistent data...\n");
+               LOG_INFO("Saving persistent data...\n");
                Ban_SaveBans();
 
                // playerstats with unfinished match
@@ -2330,7 +2330,7 @@ void Shutdown()
                CheatShutdown(); // must be after cheatcount check
                db_close(ServerProgsDB);
                db_close(TemporaryDB);
-               print("done!\n");
+               LOG_INFO("done!\n");
                // tell the bot system the game is ending now
                bot_endgame();
 
@@ -2339,6 +2339,6 @@ void Shutdown()
        }
        else if(world_initialized == 0)
        {
-               print("NOTE: crashed before even initializing the world, not saving persistent data\n");
+               LOG_INFO("NOTE: crashed before even initializing the world, not saving persistent data\n");
        }
 }
index db758a8e6d41bab7300654d865c6bef18b982eb7..671137a645f37ae20583d838732205f1304f29e4 100644 (file)
@@ -94,18 +94,18 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if(id >= MAX_IPBAN_URIS)
        {
-               print("Received ban list for invalid ID\n");
+               LOG_INFO("Received ban list for invalid ID\n");
                return;
        }
 
        tokenize_console(autocvar_g_ban_sync_uri);
        uri = argv(id);
 
-       print("Received ban list from ", uri, ": ");
+       LOG_INFO("Received ban list from ", uri, ": ");
 
        if(OnlineBanList_RequestWaiting[id] == 0)
        {
-               print("rejected (unexpected)\n");
+               LOG_INFO("rejected (unexpected)\n");
                return;
        }
 
@@ -113,14 +113,14 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if(time > OnlineBanList_Timeout)
        {
-               print("rejected (too late)\n");
+               LOG_INFO("rejected (too late)\n");
                return;
        }
 
        syncinterval = autocvar_g_ban_sync_interval;
        if(syncinterval == 0)
        {
-               print("rejected (syncing disabled)\n");
+               LOG_INFO("rejected (syncing disabled)\n");
                return;
        }
        if(syncinterval > 0)
@@ -128,19 +128,19 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if(status != 0)
        {
-               print("error: status is ", ftos(status), "\n");
+               LOG_INFO("error: status is ", ftos(status), "\n");
                return;
        }
 
        if(substring(data, 0, 1) == "<")
        {
-               print("error: received HTML instead of a ban list\n");
+               LOG_INFO("error: received HTML instead of a ban list\n");
                return;
        }
 
        if(strstrofs(data, "\r", 0) != -1)
        {
-               print("error: received carriage returns\n");
+               LOG_INFO("error: received carriage returns\n");
                return;
        }
 
@@ -151,11 +151,11 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if((n % 4) != 0)
        {
-               print("error: received invalid item count: ", ftos(n), "\n");
+               LOG_INFO("error: received invalid item count: ", ftos(n), "\n");
                return;
        }
 
-       print("OK, ", ftos(n / 4), " items\n");
+       LOG_INFO("OK, ", ftos(n / 4), " items\n");
 
        for(i = 0; i < n; i += 4)
        {
@@ -164,9 +164,9 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
                reason = argv(i + 2);
                serverip = argv(i + 3);
 
-               dprint("received ban list item ", ftos(i / 4), ": ip=", ip);
-               dprint(" timeleft=", ftos(timeleft), " reason=", reason);
-               dprint(" serverip=", serverip, "\n");
+               LOG_TRACE("received ban list item ", ftos(i / 4), ": ip=", ip);
+               LOG_TRACE(" timeleft=", ftos(timeleft), " reason=", reason);
+               LOG_TRACE(" serverip=", serverip, "\n");
 
                timeleft -= 1.5 * autocvar_g_ban_sync_timeout;
                if(timeleft < 0)
@@ -178,7 +178,7 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
                        for(j = 0; j < l; ++j)
                                if(strstrofs("0123456789.", substring(ip, j, 1), 0) == -1)
                                {
-                                       print("Invalid character ", substring(ip, j, 1), " in IP address ", ip, ". Skipping this ban.\n");
+                                       LOG_INFO("Invalid character ", substring(ip, j, 1), " in IP address ", ip, ". Skipping this ban.\n");
                                        goto skip;
                                }
                }
@@ -192,8 +192,8 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
                        // the ban will be prolonged on the next sync
                        // or expire 5 seconds after the next timeout
                Ban_Insert(ip, timeleft, strcat("ban synced from ", serverip, " at ", uri), 0);
-               print("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ");
-               print(reason, "\n");
+               LOG_INFO("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ");
+               LOG_INFO(reason, "\n");
 
 :skip
        }
@@ -333,7 +333,7 @@ void Ban_View()
        float i, n;
        string msg;
 
-       print("^2Listing all existing active bans:\n");
+       LOG_INFO("^2Listing all existing active bans:\n");
 
        n = 0;
        for(i = 0; i < ban_count; ++i)
@@ -347,10 +347,10 @@ void Ban_View()
                msg = strcat(msg, ban_ip[i], " is still banned for ");
                msg = strcat(msg, ftos(ban_expire[i] - time), " seconds");
 
-               print("  ", msg, "\n");
+               LOG_INFO("  ", msg, "\n");
        }
 
-       print("^2Done listing all active (", ftos(n), ") bans.\n");
+       LOG_INFO("^2Done listing all active (", ftos(n), ") bans.\n");
 }
 
 float Ban_GetClientIP(entity client)
@@ -514,10 +514,10 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync)
                        if(time + bantime > ban_expire[i])
                        {
                                ban_expire[i] = time + bantime;
-                               dprint(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now\n");
+                               LOG_TRACE(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now\n");
                        }
                        else
-                               dprint(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now\n");
+                               LOG_TRACE(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now\n");
 
                        // and enforce
                        reason = Ban_Enforce(i, reason);
@@ -554,12 +554,12 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync)
        if(i < ban_count)
        if(ban_expire[i] > time + bantime)
        {
-               print(ip, " could not get banned due to no free ban slot\n");
+               LOG_INFO(ip, " could not get banned due to no free ban slot\n");
                return false;
        }
        // okay, insert our new victim as i
        Ban_Delete(i);
-       dprint(ip, " has been banned for ", ftos(bantime), " seconds\n");
+       LOG_TRACE(ip, " has been banned for ", ftos(bantime), " seconds\n");
        ban_expire[i] = time + bantime;
        ban_ip[i] = strzone(ip);
        ban_count = max(ban_count, i + 1);
index 952ce5bd0595ff40273229587503bf58403717a3..d453606d3946419c660cd4693d98730010b3f874 100644 (file)
@@ -748,7 +748,7 @@ float GameTypeVote_Finished(float pos)
 
        if ( !GameTypeVote_SetGametype(GameTypeVote_Type_FromString(mapvote_maps[pos])) )
        {
-               dprint("Selected gametype is not supported by any map");
+               LOG_TRACE("Selected gametype is not supported by any map");
        }
 
        localcmd("sv_vote_gametype_hook_all\n");
index 0dabbf0fa38df393b90c894315ffc61028144a3f..a19b62ba8463151dae9b856b83d0106f2f331789 100644 (file)
@@ -62,8 +62,8 @@ void DistributeEvenly_Init(float amount, float totalweight)
 {
     if (DistributeEvenly_amount)
     {
-        dprint("DistributeEvenly_Init: UNFINISHED DISTRIBUTION (", ftos(DistributeEvenly_amount), " for ");
-        dprint(ftos(DistributeEvenly_totalweight), " left!)\n");
+        LOG_TRACE("DistributeEvenly_Init: UNFINISHED DISTRIBUTION (", ftos(DistributeEvenly_amount), " for ");
+        LOG_TRACE(ftos(DistributeEvenly_totalweight), " left!)\n");
     }
     if (totalweight == 0)
         DistributeEvenly_amount = 0;
@@ -122,7 +122,7 @@ void GameLogEcho(string s)
     }
     if (autocvar_sv_eventlog_console)
     {
-        print(s, "\n");
+        LOG_INFO(s, "\n");
     }
 }
 
@@ -195,9 +195,9 @@ entity findnearest(vector point, .string field, string value, vector axismod)
         {
             if (i != 0)
             {
-                dprint("Nearest point (");
-                dprint(nearest_entity[0].netname);
-                dprint(") is not visible, using a visible one.\n");
+                LOG_TRACE("Nearest point (");
+                LOG_TRACE(nearest_entity[0].netname);
+                LOG_TRACE(") is not visible, using a visible one.\n");
             }
             return nearest_entity[i];
         }
@@ -206,7 +206,7 @@ entity findnearest(vector point, .string field, string value, vector axismod)
     if (num_nearest == 0)
         return world;
 
-    dprint("Not seeing any location point, using nearest as fallback.\n");
+    LOG_TRACE("Not seeing any location point, using nearest as fallback.\n");
     /* DEBUGGING CODE:
     dprint("Candidates were: ");
     for(j = 0; j < num_nearest; ++j)
@@ -312,10 +312,6 @@ string formatmessage(string msg)
        return msg;
 }
 
-float boolean(float value) { // if value is 0 return false (0), otherwise return true (1)
-       return (value == 0) ? false : true;
-}
-
 /*
 =============
 GetCvars
@@ -605,7 +601,7 @@ void readplayerstartcvars()
                        }
                        if (j > WEP_LAST)
                        {
-                               print("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n");
+                               LOG_INFO("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n");
                        }
                }
                g_weaponarena_list = strzone(substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3));
@@ -1394,7 +1390,7 @@ float SUB_NoImpactCheck()
        if(trace_dphitcontents == 0)
        {
                //dprint("A hit happened with zero hit contents... DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct.\n");
-               dprintf("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Profectile will self-destruct. (edict: %d, classname: %s, origin: %s)\n", num_for_edict(self), self.classname, vtos(self.origin));
+               LOG_TRACEF("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Profectile will self-destruct. (edict: %d, classname: %s, origin: %s)\n", num_for_edict(self), self.classname, vtos(self.origin));
                checkclient();
        }
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
@@ -1407,11 +1403,11 @@ float SUB_NoImpactCheck()
         traceline(self.origin - tic, self.origin + tic, MOVE_NORMAL, self);
         if (trace_fraction >= 1)
         {
-            dprint("Odd... did not hit...?\n");
+            LOG_TRACE("Odd... did not hit...?\n");
         }
         else if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
         {
-            dprint("Detected and prevented the sky-grapple bug.\n");
+            LOG_TRACE("Detected and prevented the sky-grapple bug.\n");
             return 1;
         }
     }
@@ -1469,7 +1465,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
+               LOG_INFO("Received HTTP request data for an invalid id ", ftos(id), ".\n");
        }
 }
 
@@ -1598,7 +1594,7 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
     {
         setorigin(e, start);
         e.angles = vectoangles(end - start);
-        dprint("Needed ", ftos(i + 1), " attempts\n");
+        LOG_TRACE("Needed ", ftos(i + 1), " attempts\n");
         return true;
     }
     else
@@ -1915,7 +1911,7 @@ void randombit_test(float bits, float iter)
 {
        while(iter > 0)
        {
-               print(ftos(randombit(bits)), "\n");
+               LOG_INFO(ftos(randombit(bits)), "\n");
                --iter;
        }
 }
index fb3fbd107e247fd0db7f0a392b6b2724762c5854..d6f00989792b19d3b7694ef86a2db3dbffce9dca 100644 (file)
@@ -182,6 +182,20 @@ MUTATOR_HOOKABLE(FilterItem, EV_NO_ARGS);
     /**/
 MUTATOR_HOOKABLE(TurretSpawn, EV_TurretSpawn);
 
+/** return error to not attack */
+#define EV_TurretFire(i, o) \
+    /** turret */ i(entity, self) \
+    /**/
+MUTATOR_HOOKABLE(TurretFire, EV_TurretFire);
+
+/** return error to not attack */
+#define EV_Turret_CheckFire(i, o) \
+    /**/ i(bool, ret_bool) \
+    /**/ o(bool, ret_bool) \
+    /**/
+bool ret_bool;
+MUTATOR_HOOKABLE(Turret_CheckFire, EV_Turret_CheckFire);
+
 /** return error to prevent entity spawn, or modify the entity */
 MUTATOR_HOOKABLE(OnEntityPreSpawn, EV_NO_ARGS);
 
@@ -222,6 +236,13 @@ MUTATOR_HOOKABLE(MonsterSpawn, EV_NO_ARGS);
     /**/
 MUTATOR_HOOKABLE(MonsterDies, EV_MonsterDies);
 
+/** called when a monster dies */
+#define EV_MonsterRemove(i, o) \
+    /**/ i(entity, rem_mon) \
+    /**/
+entity rem_mon; // avoiding ovewriting self & other
+MUTATOR_HOOKABLE(MonsterRemove, EV_MonsterRemove);
+
 /** called when a monster wants to respawn */
 #define EV_MonsterRespawn(i, o) \
     /**/ i(entity, other) \
@@ -324,21 +345,17 @@ MUTATOR_HOOKABLE(PlayerPowerups, EV_PlayerPowerups);
  * called every player think frame
  * return 1 to disable regen
  */
-#define EV_PlayerRegen(i, o) \
-    /**/ i(float, regen_mod_max) \
-    /**/ o(float, regen_mod_max) \
-    /**/ i(float, regen_mod_regen) \
-    /**/ o(float, regen_mod_regen) \
-    /**/ i(float, regen_mod_rot) \
-    /**/ o(float, regen_mod_rot) \
-    /**/ i(float, regen_mod_limit) \
-    /**/ o(float, regen_mod_limit) \
-    /**/
 float regen_mod_max;
 float regen_mod_regen;
 float regen_mod_rot;
 float regen_mod_limit;
-MUTATOR_HOOKABLE(PlayerRegen, EV_PlayerRegen);
+float regen_health;
+float regen_health_linear;
+float regen_health_rot;
+float regen_health_rotlinear;
+float regen_health_stable;
+float regen_health_rotstable;
+MUTATOR_HOOKABLE(PlayerRegen, EV_NO_ARGS);
 
 /**
  * called when the use key is pressed
@@ -547,4 +564,29 @@ MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
     /**/
 string checkmodel_input, checkmodel_command;
 MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
+
+/** called when a bullet has hit a target */
+#define EV_FireBullet_Hit(i, o) \
+    /**/ i(entity, self) \
+    /**/ i(entity, bullet_hit) \
+    /**/ i(vector, bullet_startpos) \
+    /**/ i(vector, bullet_endpos) \
+    /**/ i(float, frag_damage) \
+    /**/ o(float, frag_damage) \
+    /**/
+entity bullet_hit;
+//vector bullet_hitloc; // the end pos matches the hit location, apparently
+vector bullet_startpos;
+vector bullet_endpos;
+//float frag_damage;
+MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit);
+
+#define EV_FixPlayermodel(i, o) \
+    /**/ i(string, ret_string) \
+    /**/ o(string, ret_string) \
+    /**/
+MUTATOR_HOOKABLE(FixPlayermodel, EV_FixPlayermodel);
+
+/** Return error to play frag remaining announcements */
+MUTATOR_HOOKABLE(Scores_CountFragsRemaining, EV_NO_ARGS);
 #endif
index 65b0ee793245b0bb7a36b00396e1b4c9c61f0bbd..7e13b334d38d5e56a9547d89ddaaaa86e766e966 100644 (file)
@@ -610,7 +610,7 @@ MUTATOR_DEFINITION(gamemode_assault)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 9ad532e909e4dcfd2b56d3d187308db93a999b15..f4c4f6826d34be248dc7e9b49df280161d6e7980 100644 (file)
@@ -353,6 +353,12 @@ MUTATOR_HOOKFUNCTION(ca_PlayerRegen)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(ca_CountFrags)
+{
+       // announce remaining frags
+       return true;
+}
+
 void ca_Initialize()
 {
        allowed_to_spawn = true;
@@ -394,6 +400,7 @@ MUTATOR_DEFINITION(gamemode_ca)
        MUTATOR_HOOK(FilterItem, ca_FilterItem, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, ca_PlayerDamage_SplitHealthArmor, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerRegen, ca_PlayerRegen, CBC_ORDER_ANY);
+       MUTATOR_HOOK(Scores_CountFragsRemaining, ca_CountFrags, CBC_ORDER_ANY);
 
        MUTATOR_ONADD
        {
@@ -404,7 +411,7 @@ MUTATOR_DEFINITION(gamemode_ca)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index d6859bee3d88f281b6479d879864fe44e2196089..2b9cf02158eafa89def6acf588def59a4e793653 100644 (file)
@@ -364,7 +364,7 @@ void ctf_Handle_Throw(entity player, entity receiver, int droptype)
 
                        // other
                        sound(player, CH_TRIGGER, flag.snd_flag_touch, VOL_BASE, ATTEN_NORM);
-                       WarpZone_TrailParticles(world, particleeffectnum(flag.passeffect), player.origin, targ_origin);
+                       WarpZone_TrailParticles(world, _particleeffectnum(flag.passeffect), player.origin, targ_origin);
                        ctf_EventLog("pass", flag.team, player);
                        break;
                }
@@ -455,7 +455,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, int capturetype)
                PlayerScore_Add(player, SP_CTF_CAPTIME, new_time - old_time);
 
        // effects
-       Send_Effect(flag.capeffect, flag.origin, '0 0 0', 1);
+       Send_Effect_(flag.capeffect, flag.origin, '0 0 0', 1);
        //shockwave_spawn("models/ctf/shockwavetransring.md3", flag.origin - '0 0 15', -0.8, 0, 1);
 
        // other
@@ -591,7 +591,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
                {
                        pickup_dropped_score = (autocvar_g_ctf_flag_return_time ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_return_time) - time) / autocvar_g_ctf_flag_return_time, 1) : 1);
                        pickup_dropped_score = floor((autocvar_g_ctf_score_pickup_dropped_late * (1 - pickup_dropped_score) + autocvar_g_ctf_score_pickup_dropped_early * pickup_dropped_score) + 0.5);
-                       dprint("pickup_dropped_score is ", ftos(pickup_dropped_score), "\n");
+                       LOG_TRACE("pickup_dropped_score is ", ftos(pickup_dropped_score), "\n");
                        PlayerTeamScore_AddScore(player, pickup_dropped_score);
                        ctf_EventLog("pickup", flag.team, player);
                        break;
@@ -609,7 +609,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
        }
 
        // effects
-       Send_Effect(flag.toucheffect, player.origin, '0 0 0', 1);
+       Send_Effect_(flag.toucheffect, player.origin, '0 0 0', 1);
 
        // waypoints
        if(pickuptype == PICKUP_DROPPED) { WaypointSprite_Kill(flag.wps_flagdropped); }
@@ -767,7 +767,7 @@ void ctf_FlagThink()
 
        // sanity checks
        if(self.mins != FLAG_MIN || self.maxs != FLAG_MAX) { // reset the flag boundaries in case it got squished
-               dprint("wtf the flag got squashed?\n");
+               LOG_TRACE("wtf the flag got squashed?\n");
                tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self);
                if(!trace_startsolid || self.noalign) // can we resize it without getting stuck?
                        setsize(self, FLAG_MIN, FLAG_MAX); }
@@ -896,7 +896,7 @@ void ctf_FlagThink()
 
                default: // this should never happen
                {
-                       dprint("ctf_FlagThink(): Flag exists with no status?\n");
+                       LOG_TRACE("ctf_FlagThink(): Flag exists with no status?\n");
                        return;
                }
        }
@@ -941,7 +941,7 @@ void ctf_FlagTouch()
        {
                if(time > self.wait) // if we haven't in a while, play a sound/effect
                {
-                       Send_Effect(self.toucheffect, self.origin, '0 0 0', 1);
+                       Send_Effect_(self.toucheffect, self.origin, '0 0 0', 1);
                        sound(self, CH_TRIGGER, self.snd_flag_touch, VOL_BASE, ATTEN_NORM);
                        self.wait = time + FLAG_TOUCHRATE;
                }
@@ -978,7 +978,7 @@ void ctf_FlagTouch()
 
                case FLAG_CARRY:
                {
-                       dprint("Someone touched a flag even though it was being carried?\n");
+                       LOG_TRACE("Someone touched a flag even though it was being carried?\n");
                        break;
                }
 
@@ -1848,47 +1848,47 @@ void havocbot_role_ctf_defense()
 
 void havocbot_role_ctf_setrole(entity bot, int role)
 {
-       dprint(strcat(bot.netname," switched to "));
+       LOG_TRACE(strcat(bot.netname," switched to "));
        switch(role)
        {
                case HAVOCBOT_CTF_ROLE_CARRIER:
-                       dprint("carrier");
+                       LOG_TRACE("carrier");
                        bot.havocbot_role = havocbot_role_ctf_carrier;
                        bot.havocbot_role_timeout = 0;
                        bot.havocbot_cantfindflag = time + 10;
                        bot.bot_strategytime = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_DEFENSE:
-                       dprint("defense");
+                       LOG_TRACE("defense");
                        bot.havocbot_role = havocbot_role_ctf_defense;
                        bot.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_MIDDLE:
-                       dprint("middle");
+                       LOG_TRACE("middle");
                        bot.havocbot_role = havocbot_role_ctf_middle;
                        bot.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_OFFENSE:
-                       dprint("offense");
+                       LOG_TRACE("offense");
                        bot.havocbot_role = havocbot_role_ctf_offense;
                        bot.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_RETRIEVER:
-                       dprint("retriever");
+                       LOG_TRACE("retriever");
                        bot.havocbot_previous_role = bot.havocbot_role;
                        bot.havocbot_role = havocbot_role_ctf_retriever;
                        bot.havocbot_role_timeout = time + 10;
                        bot.bot_strategytime = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_ESCORT:
-                       dprint("escort");
+                       LOG_TRACE("escort");
                        bot.havocbot_previous_role = bot.havocbot_role;
                        bot.havocbot_role = havocbot_role_ctf_escort;
                        bot.havocbot_role_timeout = time + 30;
                        bot.bot_strategytime = 0;
                        break;
        }
-       dprint("\n");
+       LOG_TRACE("\n");
 }
 
 
@@ -2457,7 +2457,7 @@ void ctf_DelayedInit() // Do this check with a delay so we can wait for teams to
        // if no teams are found, spawn defaults
        if(find(world, classname, "ctf_team") == world)
        {
-               print("No ""ctf_team"" entities found on this map, creating them anyway.\n");
+               LOG_INFO("No ""ctf_team"" entities found on this map, creating them anyway.\n");
                ctf_SpawnTeam("Red", NUM_TEAM_1 - 1);
                ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1);
                if(ctf_teams >= 3)
@@ -2518,7 +2518,7 @@ MUTATOR_DEFINITION(gamemode_ctf)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 50aa5e1fc51d48b87c7112c719a6924e2becb01b..04c589ce181a3d920bd0bd744ff923eb08f7e4e3 100644 (file)
@@ -325,7 +325,7 @@ MUTATOR_DEFINITION(gamemode_cts)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
diff --git a/qcsrc/server/mutators/gamemode_deathmatch.qc b/qcsrc/server/mutators/gamemode_deathmatch.qc
new file mode 100644 (file)
index 0000000..06afc51
--- /dev/null
@@ -0,0 +1,31 @@
+MUTATOR_HOOKFUNCTION(dm_CountFrags)
+{
+       // announce remaining frags
+       return true;
+}
+
+MUTATOR_DEFINITION(gamemode_deathmatch)
+{
+       MUTATOR_HOOK(Scores_CountFragsRemaining, dm_CountFrags, CBC_ORDER_ANY);
+
+       MUTATOR_ONADD
+       {
+               if(time > 1) // game loads at time 1
+                       error("This is a game type and it cannot be added at runtime.");
+       }
+
+       MUTATOR_ONROLLBACK_OR_REMOVE
+       {
+               // we actually cannot roll back dm_Initialize here
+               // BUT: we don't need to! If this gets called, adding always
+               // succeeds.
+       }
+
+       MUTATOR_ONREMOVE
+       {
+               print("This is a game type and it cannot be removed at runtime.");
+               return -1;
+       }
+
+       return 0;
+}
index d10cedcd887b99697fc8c1b765b58aaf948db09e..7b392a0663af09b0b65be533388aee3cb211b083 100644 (file)
@@ -597,7 +597,7 @@ void dom_DelayedInit() // Do this check with a delay so we can wait for teams to
        // if no teams are found, spawn defaults
        if(find(world, classname, "dom_team") == world || autocvar_g_domination_teams_override >= 2)
        {
-               print("No ""dom_team"" entities found on this map, creating them anyway.\n");
+               LOG_INFO("No ""dom_team"" entities found on this map, creating them anyway.\n");
                domination_teams = bound(2, ((autocvar_g_domination_teams_override < 2) ? autocvar_g_domination_default_teams : autocvar_g_domination_teams_override), 4);
                dom_spawnteams(domination_teams);
        }
@@ -652,7 +652,7 @@ MUTATOR_DEFINITION(gamemode_domination)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index fd3a9deb407fecfeefc7140f412428ff60ab0ceb..1fa168d63fbe84a9aa957afdb0760161d25a49d2 100644 (file)
@@ -265,7 +265,7 @@ void havocbot_role_ft_offense()
        // If only one left on team or if role has timed out then start trying to free players.
        if (((unfrozen == 0) && (!self.frozen)) || (time > self.havocbot_role_timeout))
        {
-               dprint("changing role to freeing\n");
+               LOG_TRACE("changing role to freeing\n");
                self.havocbot_role = havocbot_role_ft_freeing;
                self.havocbot_role_timeout = 0;
                return;
@@ -294,7 +294,7 @@ void havocbot_role_ft_freeing()
 
        if (time > self.havocbot_role_timeout)
        {
-               dprint("changing role to offense\n");
+               LOG_TRACE("changing role to offense\n");
                self.havocbot_role = havocbot_role_ft_offense;
                self.havocbot_role_timeout = 0;
                return;
@@ -555,7 +555,7 @@ MUTATOR_HOOKFUNCTION(freezetag_BotRoles)
 MUTATOR_HOOKFUNCTION(freezetag_GetTeamCount)
 {
        ret_float = freezetag_teams;
-       return 0;
+       return false;
 }
 
 void freezetag_Initialize()
@@ -606,7 +606,7 @@ MUTATOR_DEFINITION(gamemode_freezetag)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 33966bbe7695fdae5e9c61560dd243a70ee5b53d..c4750d98228fc6279e3bfa2bbe5f2ba9c83ca0bf 100644 (file)
@@ -62,7 +62,7 @@ void invasion_SpawnChosenMonster(float mon)
 
        if(spawn_point == world)
        {
-               dprint("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations\n");
+               LOG_TRACE("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations\n");
                entity e = spawn();
                setsize(e, (get_monsterinfo(mon)).mins, (get_monsterinfo(mon)).maxs);
 
@@ -126,7 +126,7 @@ float Invasion_CheckWinner()
        if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
        {
                FOR_EACH_MONSTER(head)
-                       monster_remove(head);
+                       Monster_Remove(head);
 
                Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_ROUND_OVER);
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_ROUND_OVER);
@@ -203,7 +203,7 @@ float Invasion_CheckWinner()
        }
 
        FOR_EACH_MONSTER(head)
-               monster_remove(head);
+               Monster_Remove(head);
 
        if(teamplay)
        {
@@ -296,7 +296,7 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn)
        self.monster_skill = inv_monsterskill;
 
        if((get_monsterinfo(self.monsterid)).spawnflags & MON_FLAG_SUPERMONSTER)
-               Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, M_NAME(self.monsterid));
+               Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, self.monster_name);
 
        self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;
 
@@ -483,7 +483,7 @@ MUTATOR_DEFINITION(gamemode_invasion)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 01695f5e2f1bbd62a5428fcc94d609bac9d19430..65c7ba6e56635a727abfae89c2341a92fb422815 100644 (file)
@@ -47,8 +47,8 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated
        self.think = ka_RespawnBall;
        self.nextthink = time + autocvar_g_keepawayball_respawntime;
 
-       Send_Effect("electro_combo", oldballorigin, '0 0 0', 1);
-       Send_Effect("electro_combo", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, oldballorigin, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, self.origin, '0 0 0', 1);
 
        WaypointSprite_Spawn(WP_KaBall, 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER);
        WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
@@ -81,7 +81,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        if(other.frozen) { return; }
        if (!IS_PLAYER(other))
        {  // The ball just touched an object, most likely the world
-               Send_Effect("kaball_sparks", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_BALL_SPARKS, self.origin, '0 0 0', 1);
                sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM);
                return;
        }
@@ -448,7 +448,7 @@ MUTATOR_DEFINITION(gamemode_keepaway)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 1de67e2b071a44872a482ad5de4ec7296141ebc4..fe53c1fcc4dbaf39c7b11da153a19e154f7d159a 100644 (file)
@@ -1140,7 +1140,7 @@ MUTATOR_DEFINITION(gamemode_keyhunt)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 7ed082f49bda79e08fff3837ab9f1d5551ea8c3f..a5707182e4de7125eb68a2bf48efc09c33579738 100644 (file)
@@ -229,7 +229,7 @@ MUTATOR_DEFINITION(gamemode_lms)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 456d0df1f962f6fb4cb099faea1aea1b5741c827..6b8d5a07d7ee9c9f44a27927092254d46ceae2ae 100644 (file)
@@ -86,10 +86,10 @@ void relocate_nexball(void)
                o = self.origin;
                if(!move_out_of_solid(self))
                        objerror("could not get out of solid at all!");
-               print("^1NOTE: this map needs FIXING. ", self.classname, " at ", vtos(o - '0 0 1'));
-               print(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
-               print(" ", ftos(self.origin.y - o.y));
-               print(" ", ftos(self.origin.z - o.z), "'\n");
+               LOG_INFO("^1NOTE: this map needs FIXING. ", self.classname, " at ", vtos(o - '0 0 1'));
+               LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
+               LOG_INFO(" ", ftos(self.origin.y - o.y));
+               LOG_INFO(" ", ftos(self.origin.z - o.z), "'\n");
                self.origin = o;
        }
 }
@@ -241,7 +241,7 @@ void ResetBall(void)
        {
 //             dprint("Step 4: time: ", ftos(time), "\n");
                if(vlen(self.origin - self.spawnorigin) > 10)  // should not happen anymore
-                       dprint("The ball moved too far away from its spawn origin.\nOffset: ",
+                       LOG_TRACE("The ball moved too far away from its spawn origin.\nOffset: ",
                                   vtos(self.origin - self.spawnorigin), " Velocity: ", vtos(self.velocity), "\n");
                self.velocity = '0 0 0';
                setorigin(self, self.spawnorigin); // make sure it's positioned correctly anyway
@@ -423,7 +423,7 @@ void spawnfunc_nexball_team(void)
 
 void nb_spawnteam(string teamname, float teamcolor)
 {
-       dprint("^2spawned team ", teamname, "\n");
+       LOG_TRACE("^2spawned team ", teamname, "\n");
        entity e;
        e = spawn();
        e.classname = "nexball_team";
@@ -778,7 +778,6 @@ void W_Nexball_Attack2(void)
        if(!(balls & BALL_BASKET))
                return;
        W_SetupShot(self, false, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0);
-//     Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
        missile = spawn();
 
        missile.owner = self;
@@ -1039,7 +1038,7 @@ MUTATOR_DEFINITION(gamemode_nexball)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 708683e6755139802e1bd0d7f84587e9e17ee1f7..33bebd04ccd44821dfd8106b18e012e50384acc8 100644 (file)
@@ -79,8 +79,8 @@ void ons_debug(string input)
 {
        switch(autocvar_g_onslaught_debug)
        {
-               case 1: dprint(input); break;
-               case 2: print(input); break;
+               case 1: LOG_TRACE(input); break;
+               case 2: LOG_INFO(input); break;
        }
 }
 
@@ -377,7 +377,7 @@ void ons_ControlPoint_Icon_Damage(entity inflictor, entity attacker, float damag
                WaypointSprite_UpdateBuildFinished(self.owner.sprite, time + (self.max_health - self.health) / (self.count / ONS_CP_THINKRATE));
        self.pain_finished = time + 1;
        // particles on every hit
-       pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
+       pointparticles(particleeffectnum(EFFECT_SPARKS), hitloc, force*-1, 1);
        //sound on every hit
        if (random() < 0.5)
                sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTEN_NORM);
@@ -387,7 +387,7 @@ void ons_ControlPoint_Icon_Damage(entity inflictor, entity attacker, float damag
        if (self.health < 0)
        {
                sound(self, CH_TRIGGER, W_Sound("grenade_impact"), VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
                Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(self.team, INFO_ONSLAUGHT_CPDESTROYED_), self.owner.message, attacker.netname);
 
                PlayerScore_Add(attacker, SP_ONS_TAKES, 1);
@@ -492,7 +492,7 @@ void ons_ControlPoint_Icon_Think()
        // damaged fx
        if(random() < 0.6 - self.health / self.max_health)
        {
-               Send_Effect("electricity_sparks", self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
+               Send_Effect(EFFECT_ELECTRIC_SPARKS, self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
 
                if(random() > 0.8)
                        sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTEN_NORM);
@@ -526,7 +526,7 @@ void ons_ControlPoint_Icon_BuildThink()
                self.owner.iscaptured = true;
                self.solid = SOLID_BBOX;
 
-               Send_Effect(sprintf("%s_cap", Static_Team_ColorName_Lower(self.owner.team)), self.owner.origin, '0 0 0', 1);
+               Send_Effect_(sprintf("%s_cap", Static_Team_ColorName_Lower(self.owner.team)), self.owner.origin, '0 0 0', 1);
 
                WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
                WaypointSprite_UpdateHealth(self.owner.sprite, self.health);
@@ -557,7 +557,7 @@ void ons_ControlPoint_Icon_BuildThink()
                setmodel_fixsize(self.owner, "models/onslaught/controlpoint_pad2.md3");
 
        if(random() < 0.9 - self.health / self.max_health)
-               Send_Effect("rage", self.origin + 10 * randomvec(), '0 0 -1', 1);
+               Send_Effect(EFFECT_RAGE, self.origin + 10 * randomvec(), '0 0 -1', 1);
 }
 
 void ons_ControlPoint_Icon_Spawn(entity cp, entity player)
@@ -585,7 +585,7 @@ void ons_ControlPoint_Icon_Spawn(entity cp, entity player)
        cp.team = e.team;
        cp.colormap = e.colormap;
 
-       Send_Effect(sprintf("%sflag_touch", Static_Team_ColorName_Lower(player.team)), e.origin, '0 0 0', 1);
+       Send_Effect_(sprintf("%sflag_touch", Static_Team_ColorName_Lower(player.team)), e.origin, '0 0 0', 1);
 
        WaypointSprite_UpdateBuildFinished(cp.sprite, time + (e.max_health - e.health) / (e.count / ONS_CP_THINKRATE));
        WaypointSprite_UpdateRule(cp.sprite,cp.team,SPRITERULE_TEAMPLAY);
@@ -912,7 +912,7 @@ void ons_GeneratorDamage(entity inflictor, entity attacker, float damage, int de
        else
        {
                // particles on every hit
-               Send_Effect("sparks", hitloc, force * -1, 1);
+               Send_Effect(EFFECT_SPARKS, hitloc, force * -1, 1);
 
                //sound on every hit
                if (random() < 0.5)
@@ -1678,7 +1678,7 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe
                        {
                                if ( tele_effects )
                                {
-                                       Send_Effect("teleport", player.origin, '0 0 0', 1);
+                                       Send_Effect(EFFECT_TELEPORT, player.origin, '0 0 0', 1);
                                        sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTEN_NORM);
                                }
                                setorigin(player, loc);
@@ -1688,7 +1688,7 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe
                                player.teleport_antispam = time + autocvar_g_onslaught_teleport_wait;
 
                                if ( tele_effects )
-                                       Send_Effect("teleport", player.origin + v_forward * 32, '0 0 0', 1);
+                                       Send_Effect(EFFECT_TELEPORT, player.origin + v_forward * 32, '0 0 0', 1);
                                return true;
                        }
                }
@@ -2179,7 +2179,7 @@ MUTATOR_DEFINITION(gamemode_onslaught)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 3cefc86692f6d6e8fbc9d6a094f424bdc5e4b01c..a7a832281a870ec8d3a32fb56e51f0f1c218181c 100644 (file)
@@ -273,6 +273,15 @@ MUTATOR_HOOKFUNCTION(race_GetTeamCount)
        return false;
 }
 
+MUTATOR_HOOKFUNCTION(race_CountFrags)
+{
+       // announce remaining frags if not in qualifying mode
+       if(!g_race_qualifying)
+               return true;
+
+       return false;
+}
+
 void race_Initialize()
 {
        race_ScoreRules();
@@ -294,6 +303,7 @@ MUTATOR_DEFINITION(gamemode_race)
        MUTATOR_HOOK(GetPressedKeys, race_PlayerPostThink, CBC_ORDER_ANY);
        MUTATOR_HOOK(ForbidPlayerScore_Clear, race_ForbidClearPlayerScore, CBC_ORDER_ANY);
        MUTATOR_HOOK(GetTeamCount, race_GetTeamCount, CBC_ORDER_ANY);
+       MUTATOR_HOOK(Scores_CountFragsRemaining, race_CountFrags, CBC_ORDER_ANY);
 
        MUTATOR_ONADD
        {
@@ -311,7 +321,7 @@ MUTATOR_DEFINITION(gamemode_race)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index afff8bdb2583dc8a187b0814c56e8d75ead365e7..ad3a15b5f21784ef54e4cc10e98a7f828266b659 100644 (file)
@@ -36,7 +36,7 @@ void tdm_DelayedInit()
        // if no teams are found, spawn defaults
        if(find(world, classname, "tdm_team") == world)
        {
-               print("No ""tdm_team"" entities found on this map, creating them anyway.\n");
+               LOG_INFO("No ""tdm_team"" entities found on this map, creating them anyway.\n");
 
                float numteams = min(4, autocvar_g_tdm_teams_override);
 
@@ -55,9 +55,16 @@ MUTATOR_HOOKFUNCTION(tdm_GetTeamCount)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(tdm_CountFrags)
+{
+       // announce remaining frags
+       return true;
+}
+
 MUTATOR_DEFINITION(gamemode_tdm)
 {
        MUTATOR_HOOK(GetTeamCount, tdm_GetTeamCount, CBC_ORDER_ANY);
+       MUTATOR_HOOK(Scores_CountFragsRemaining, tdm_CountFrags, CBC_ORDER_ANY);
 
        MUTATOR_ONADD
        {
@@ -75,7 +82,7 @@ MUTATOR_DEFINITION(gamemode_tdm)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index d4bdd50d2974a5005a4d2b9f872d002b6aaec24d..72bbaf16d4386e60c759c20401eccd86f6386273 100644 (file)
@@ -67,7 +67,7 @@ void buff_Effect(entity player, string eff)
 
        if(time >= self.buff_effect_delay)
        {
-               Send_Effect(eff, player.origin + ((player.mins + player.maxs) * 0.5), '0 0 0', 1);
+               Send_Effect_(eff, player.origin + ((player.mins + player.maxs) * 0.5), '0 0 0', 1);
                self.buff_effect_delay = time + 0.05; // prevent spam
        }
 }
@@ -132,8 +132,8 @@ void buff_Respawn(entity ent)
        if(autocvar_g_buffs_random_lifetime > 0)
                ent.lifetime = time + autocvar_g_buffs_random_lifetime;
 
-       Send_Effect("electro_combo", oldbufforigin + ((ent.mins + ent.maxs) * 0.5), '0 0 0', 1);
-       Send_Effect("electro_combo", CENTER_OR_VIEWOFS(ent), '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, oldbufforigin + ((ent.mins + ent.maxs) * 0.5), '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, CENTER_OR_VIEWOFS(ent), '0 0 0', 1);
 
        WaypointSprite_Ping(ent.buff_waypoint);
 
@@ -182,7 +182,7 @@ void buff_Touch()
        Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_BUFF_GOT, buffid);
        Send_Notification(NOTIF_ALL_EXCEPT, other, MSG_INFO, INFO_ITEM_BUFF, other.netname, buffid);
 
-       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        sound(other, CH_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);
        other.buffs |= (self.buffs);
 }
@@ -264,7 +264,7 @@ void buff_Think()
                {
                        self.buff_active = true;
                        sound(self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);
-                       Send_Effect("item_respawn", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+                       Send_Effect(EFFECT_ITEM_RESPAWN, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
                }
        }
 
@@ -651,8 +651,8 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThrowKey)
                        closest.pushltime = time + autocvar_g_maxpushtime;
                        closest.istypefrag = closest.BUTTON_CHAT;
 
-                       Send_Effect("electro_combo", their_org, '0 0 0', 1);
-                       Send_Effect("electro_combo", my_org, '0 0 0', 1);
+                       Send_Effect(EFFECT_ELECTRO_COMBO, their_org, '0 0 0', 1);
+                       Send_Effect(EFFECT_ELECTRO_COMBO, my_org, '0 0 0', 1);
 
                        sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NORM);
                        sound(closest, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NORM);
@@ -740,7 +740,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink)
        if(time < self.buff_disability_time)
        if(time >= self.buff_disability_effect_time)
        {
-               Send_Effect("smoking", self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1);
+               Send_Effect(EFFECT_SMOKING, self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1);
                self.buff_disability_effect_time = time + 0.5;
        }
 
index 3054c40d25df94835abb022357c2e947737e4aef..bd8cb189616244a34f22619ab452cf2d959cd19c 100644 (file)
@@ -77,8 +77,8 @@ void napalm_damage(float dist, float damage, float edgedamage, float burntime)
                d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, self.origin) - RandomSelection_chosen_ent.fireball_impactvec);
                d = damage + (edgedamage - damage) * (d / dist);
                Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
-               //trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
-               Send_Effect("fireball_laser", self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+               //trailparticles(self, particleeffectnum(EFFECT_FIREBALL_LASER), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
+               Send_Effect(EFFECT_FIREBALL_LASER, self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
        }
 }
 
@@ -225,7 +225,7 @@ void nade_napalm_boom()
 void nade_ice_freeze(entity freezefield, entity frost_target, float freeze_time)
 {
        frost_target.frozen_by = freezefield.realowner;
-       Send_Effect("electro_impact", frost_target.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_IMPACT, frost_target.origin, '0 0 0', 1);
        Freeze(frost_target, 1/freeze_time, 3, false);
        if(frost_target.ballcarried)
        if(g_keepaway) { ka_DropEvent(frost_target); }
@@ -250,14 +250,14 @@ void nade_ice_think()
        {
                if ( autocvar_g_nades_ice_explode )
                {
-                       string expef;
+                       entity expef = NULL;
                        switch(self.realowner.team)
                        {
-                               case NUM_TEAM_1: expef = "nade_red_explode"; break;
-                               case NUM_TEAM_2: expef = "nade_blue_explode"; break;
-                               case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
-                               case NUM_TEAM_4: expef = "nade_pink_explode"; break;
-                               default:                 expef = "nade_neutral_explode"; break;
+                               case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
+                               case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
+                               case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
+                               case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
+                               default:                 expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
                        }
                        Send_Effect(expef, self.origin + '0 0 1', '0 0 0', 1);
                        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
@@ -284,15 +284,15 @@ void nade_ice_think()
        randomp.x = randomr*cos(randomw);
        randomp.y = randomr*sin(randomw);
        randomp.z = 1;
-       Send_Effect("electro_muzzleflash", self.origin + randomp, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, self.origin + randomp, '0 0 0', 1);
 
        if(time >= self.nade_special_time)
        {
                self.nade_special_time = time+0.7;
 
 
-               Send_Effect("electro_impact", self.origin, '0 0 0', 1);
-               Send_Effect("icefield", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_ELECTRO_IMPACT, self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_ICEFIELD, self.origin, '0 0 0', 1);
        }
 
 
@@ -426,7 +426,7 @@ void nade_heal_touch()
                        if ( other.health < maxhealth )
                        {
                                if ( self.nade_show_particles )
-                                       Send_Effect("healing_fx", other.origin, '0 0 0', 1);
+                                       Send_Effect(EFFECT_HEALING, other.origin, '0 0 0', 1);
                                other.health = min(other.health+health_factor, maxhealth);
                        }
                        other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
@@ -483,53 +483,52 @@ void nade_monster_boom()
 
 void nade_boom()
 {
-       string expef;
+       entity expef = NULL;
        bool nade_blast = true;
 
        switch ( NADES[self.nade_type] )
        {
                case NADE_TYPE_NAPALM:
                        nade_blast = autocvar_g_nades_napalm_blast;
-                       expef = "explosion_medium";
+                       expef = EFFECT_EXPLOSION_MEDIUM;
                        break;
                case NADE_TYPE_ICE:
                        nade_blast = false;
-                       expef = "electro_combo"; // hookbomb_explode electro_combo bigplasma_impact
+                       expef = EFFECT_ELECTRO_COMBO; // hookbomb_explode electro_combo bigplasma_impact
                        break;
                case NADE_TYPE_TRANSLOCATE:
                        nade_blast = false;
-                       expef = "";
                        break;
                case NADE_TYPE_MONSTER:
                case NADE_TYPE_SPAWN:
                        nade_blast = false;
                        switch(self.realowner.team)
                        {
-                               case NUM_TEAM_1: expef = "spawn_event_red"; break;
-                               case NUM_TEAM_2: expef = "spawn_event_blue"; break;
-                               case NUM_TEAM_3: expef = "spawn_event_yellow"; break;
-                               case NUM_TEAM_4: expef = "spawn_event_pink"; break;
-                               default: expef = "spawn_event_neutral"; break;
+                               case NUM_TEAM_1: expef = EFFECT_SPAWN_RED; break;
+                               case NUM_TEAM_2: expef = EFFECT_SPAWN_BLUE; break;
+                               case NUM_TEAM_3: expef = EFFECT_SPAWN_YELLOW; break;
+                               case NUM_TEAM_4: expef = EFFECT_SPAWN_PINK; break;
+                               default: expef = EFFECT_SPAWN_NEUTRAL; break;
                        }
                        break;
                case NADE_TYPE_HEAL:
                        nade_blast = false;
-                       expef = "spawn_event_red";
+                       expef = EFFECT_SPAWN_RED;
                        break;
 
                default:
                case NADE_TYPE_NORMAL:
                        switch(self.realowner.team)
                        {
-                               case NUM_TEAM_1: expef = "nade_red_explode"; break;
-                               case NUM_TEAM_2: expef = "nade_blue_explode"; break;
-                               case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
-                               case NUM_TEAM_4: expef = "nade_pink_explode"; break;
-                               default:                 expef = "nade_neutral_explode"; break;
+                               case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
+                               case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
+                               case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
+                               case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
+                               default:                 expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
                        }
        }
 
-       if(expef != "")
+       if(expef)
                Send_Effect(expef, findbetterlocation(self.origin, 8), '0 0 0', 1);
 
        sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
@@ -779,7 +778,7 @@ float nade_customize()
        {
                //self.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
                if(!self.traileffectnum)
-                       self.traileffectnum = particleeffectnum(Nade_TrailEffect(NADES[self.nade_type].m_projectile[false], self.team));
+                       self.traileffectnum = _particleeffectnum(Nade_TrailEffect(NADES[self.nade_type].m_projectile[false], self.team));
                self.alpha = 1;
        }
 
@@ -819,7 +818,7 @@ void nade_prime()
        //setattachment(n, self, "bip01 l hand");
        n.exteriormodeltoclient = self;
        n.customizeentityforclient = nade_customize;
-       n.traileffectnum = particleeffectnum(Nade_TrailEffect(NADES[n.nade_type].m_projectile[false], self.team));
+       n.traileffectnum = _particleeffectnum(Nade_TrailEffect(NADES[n.nade_type].m_projectile[false], self.team));
        n.colormod = NADES[n.nade_type].m_color;
        n.realowner = self;
        n.colormap = self.colormap;
@@ -1120,7 +1119,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDamage)
        {
                Unfreeze(frag_target);
                frag_target.health = autocvar_g_freezetag_revive_nade_health;
-               Send_Effect("iceorglass", frag_target.origin, '0 0 0', 3);
+               Send_Effect(EFFECT_ICEORGLASS, frag_target.origin, '0 0 0', 3);
                frag_damage = 0;
                frag_force = '0 0 0';
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname);
index edbdc8aa826f622c62f22fca792285ce9e367154..fa7638b515a50a75212ca76c059aeff12cbbf6c8 100644 (file)
@@ -225,7 +225,7 @@ MUTATOR_DEFINITION(mutator_new_toys)
 
        MUTATOR_ONREMOVE
        {
-               print("This cannot be removed at runtime\n");
+               LOG_INFO("This cannot be removed at runtime\n");
                return -1;
        }
 
index d82bec99fecdaa24f5dea3b7eb0a28fc4e84f4e4..08bb81a9f6a9d6a646a1103a6771b7b23eae7952 100644 (file)
@@ -111,7 +111,7 @@ MUTATOR_DEFINITION(mutator_physical_items)
        {
                if (!(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")))
                {
-                       dprint("Warning: Physical items are enabled but no physics engine can be used. Reverting to old items.\n");
+                       LOG_TRACE("Warning: Physical items are enabled but no physics engine can be used. Reverting to old items.\n");
                        return -1;
                }
        }
@@ -123,7 +123,7 @@ MUTATOR_DEFINITION(mutator_physical_items)
 
        MUTATOR_ONREMOVE
        {
-               print("This cannot be removed at runtime\n");
+               LOG_INFO("This cannot be removed at runtime\n");
                return -1;
        }
 
index b48deddcfa95c00f8bea029072efd283c2ca72a9..060ed74f831dfe53cbe47ab6fe500b2450b9d28f 100644 (file)
@@ -23,7 +23,7 @@ MUTATOR_HOOKFUNCTION(gravity_StartFrame)
 
        gravity_delay = time + autocvar_g_random_gravity_delay;
 
-       dprint("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
+       LOG_TRACE("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
 
        return false;
 }
index bc8600fb49ff34798af910ed25a9134768a6f69f..bac05be86c039f96624efeb434f1544db53c3c4d 100644 (file)
@@ -48,7 +48,7 @@ void superspec_save_client_conf()
        fh = fopen(fn, FILE_WRITE);
        if(fh < 0)
        {
-               dprint("^1ERROR: ^7 superspec can not open ", fn, " for writing.\n");
+               LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for writing.\n");
        }
        else
        {
@@ -465,14 +465,14 @@ MUTATOR_HOOKFUNCTION(superspec_ClientConnect)
        fh = fopen(fn, FILE_READ);
        if(fh < 0)
        {
-               dprint("^1ERROR: ^7 superspec can not open ", fn, " for reading.\n");
+               LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for reading.\n");
        }
        else
        {
                string _magic = fgets(fh);
                if(_magic != _SSMAGIX)
                {
-                       dprint("^1ERROR^7 While reading superspec options file: unknown magic\n");
+                       LOG_TRACE("^1ERROR^7 While reading superspec options file: unknown magic\n");
                }
                else
                {
index 5ceeff34b5f4ab365744a9c8d999e7fe6036fedd..3c0e2706f8d8f52c16406de17ff03e86b16604ee 100644 (file)
@@ -11,7 +11,7 @@ void PlayerTouchExplode(entity p1, entity p2)
        org.z += (p1.mins.z + p2.mins.z) * 0.5;
 
        sound(self, CH_TRIGGER, W_Sound("grenade_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("explosion_small", org, '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, org, '0 0 0', 1);
 
        entity e;
        e = spawn();
index 6d889e24eba2afb38c71dc09ae2f89f5b11f9d6e..e1355a447b63087ab9f96716a865574900008ab5 100644 (file)
@@ -15,6 +15,7 @@ MUTATOR_DECLARATION(gamemode_invasion);
 MUTATOR_DECLARATION(gamemode_cts);
 MUTATOR_DECLARATION(gamemode_race);
 MUTATOR_DECLARATION(gamemode_tdm);
+MUTATOR_DECLARATION(gamemode_deathmatch);
 
 MUTATOR_DECLARATION(mutator_dodging);
 MUTATOR_DECLARATION(mutator_invincibleprojectiles);
index aaedcba8b37256305b67c702cc028c1b7a0c2a2e..d403cb12fc97817fcd45fd0b1349c0cfb39006c6 100644 (file)
@@ -89,6 +89,7 @@
 #include "gamemode_race.qc"
 #include "gamemode_cts.qc"
 #include "gamemode_tdm.qc"
+#include "gamemode_deathmatch.qc"
 
 #include "mutator_invincibleproj.qc"
 #include "mutator_new_toys.qc"
index 2d9ab47c00ab9580161ced097bc3ff08bcf5684e..273e25e3f959df6da6bb578f1c921035aef79a5b 100644 (file)
@@ -31,7 +31,7 @@ void sandbox_ObjectFunction_Touch()
        intensity = bound(0, intensity * autocvar_g_sandbox_object_material_velocity_factor, 1);
 
        sound(self, CH_TRIGGER, strcat("object/impact_", self.material, "_", ftos(ceil(random() * 5)) , ".wav"), VOL_BASE * intensity, ATTEN_NORM);
-       Send_Effect(strcat("impact_", self.material), self.origin, '0 0 0', ceil(intensity * 10)); // allow a count from 1 to 10
+       Send_Effect_(strcat("impact_", self.material), self.origin, '0 0 0', ceil(intensity * 10)); // allow a count from 1 to 10
 }
 
 void sandbox_ObjectFunction_Think()
@@ -393,7 +393,7 @@ void sandbox_Database_Load()
        if(file_get < 0)
        {
                if(autocvar_g_sandbox_info > 0)
-                       print(strcat("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n"));
+                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n"));
        }
        else
        {
@@ -418,7 +418,7 @@ void sandbox_Database_Load()
                        }
                }
                if(autocvar_g_sandbox_info > 0)
-                       print(strcat("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n"));
+                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n"));
        }
        fclose(file_get);
 }
@@ -505,7 +505,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                setmodel(e, argv(2));
 
                                if(autocvar_g_sandbox_info > 0)
-                                       print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " spawned an object at origin ^3", vtos(e.origin), "\n"));
+                                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " spawned an object at origin ^3", vtos(e.origin), "\n"));
                                return true;
 
                        // ---------------- COMMAND: OBJECT, REMOVE ----------------
@@ -514,7 +514,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                if(e != world)
                                {
                                        if(autocvar_g_sandbox_info > 0)
-                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " removed an object at origin ^3", vtos(e.origin), "\n"));
+                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " removed an object at origin ^3", vtos(e.origin), "\n"));
                                        sandbox_ObjectRemove(e);
                                        return true;
                                }
@@ -563,7 +563,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
 
                                                print_to(self, "^2SANDBOX - INFO: ^7Object pasted successfully");
                                                if(autocvar_g_sandbox_info > 0)
-                                                       print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " pasted an object at origin ^3", vtos(e.origin), "\n"));
+                                                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " pasted an object at origin ^3", vtos(e.origin), "\n"));
                                                return true;
                                }
                                return true;
@@ -598,7 +598,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                                        self.object_attach = world; // object was attached, no longer keep it scheduled for attachment
                                                        print_to(self, "^2SANDBOX - INFO: ^7Object attached successfully");
                                                        if(autocvar_g_sandbox_info > 1)
-                                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " attached objects at origin ^3", vtos(e.origin), "\n"));
+                                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " attached objects at origin ^3", vtos(e.origin), "\n"));
                                                        return true;
                                                }
                                                print_to(self, "^1SANDBOX - WARNING: ^7Object could not be attached to the parent. Make sure you are facing an object that you have edit rights over");
@@ -611,7 +611,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                                        sandbox_ObjectAttach_Remove(e);
                                                        print_to(self, "^2SANDBOX - INFO: ^7Child objects detached successfully");
                                                        if(autocvar_g_sandbox_info > 1)
-                                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " detached objects at origin ^3", vtos(e.origin), "\n"));
+                                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " detached objects at origin ^3", vtos(e.origin), "\n"));
                                                        return true;
                                                }
                                                print_to(self, "^1SANDBOX - WARNING: ^7Child objects could not be detached. Make sure you are facing an object that you have edit rights over");
@@ -702,7 +702,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                        e.message2 = strzone(strftime(true, "%d-%m-%Y %H:%M:%S"));
 
                                        if(autocvar_g_sandbox_info > 1)
-                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n"));
+                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n"));
                                        return true;
                                }
 
index 40e23387d28175249f715e7d7b96d3ba6375f7f6..a563a02c1e1897af218e1ac4f42acb80493b7dea 100644 (file)
@@ -634,7 +634,7 @@ void pathlib_close_node(entity node,vector goal)
 
     if(node.owner == closedlist)
     {
-        dprint("Pathlib: Tried to close a closed node!\n");
+        LOG_TRACE("Pathlib: Tried to close a closed node!\n");
         return;
     }
 
@@ -867,12 +867,12 @@ entity pathlib_astar(vector from,vector to)
     to.x = fsnap(to.x,pathlib_gridsize);
     to.y = fsnap(to.y,pathlib_gridsize);
 
-    dprint("AStar init. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n");
+    LOG_TRACE("AStar init. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n");
     path = pathlib_mknode(from,world);
     pathlib_close_node(path,to);
     if(pathlib_foundgoal)
     {
-        dprint("AStar: Goal found on first node!\n");
+        LOG_TRACE("AStar: Goal found on first node!\n");
 
         open           = spawn();
         open.owner     = open;
@@ -886,7 +886,7 @@ entity pathlib_astar(vector from,vector to)
 
     if(pathlib_expandnode(path,from,to) <= 0)
     {
-        dprint("AStar path fail.\n");
+        LOG_TRACE("AStar path fail.\n");
         pathlib_cleanup();
 
         return world;
@@ -913,7 +913,7 @@ entity pathlib_astar(vector from,vector to)
 
         if(pathlib_foundgoal)
         {
-            dprint("Target found. Rebuilding and filtering path...\n");
+            LOG_TRACE("Target found. Rebuilding and filtering path...\n");
             ftime = gettime(GETTIME_REALTIME);
             ptime = ftime - ptime;
 
@@ -940,32 +940,32 @@ entity pathlib_astar(vector from,vector to)
 #ifdef DEBUGPATHING
             pathlib_showpath2(start);
 
-            dprint("Time used -      pathfinding: ", ftos(ptime),"\n");
-            dprint("Time used - rebuild & filter: ", ftos(ftime),"\n");
-            dprint("Time used -          cleanup: ", ftos(ctime),"\n");
-            dprint("Time used -            total: ", ftos(ptime + ftime + ctime),"\n");
-            dprint("Time used -         # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n");
-            dprint("Nodes -         created: ", ftos(pathlib_made_cnt),"\n");
-            dprint("Nodes -            open: ", ftos(pathlib_open_cnt),"\n");
-            dprint("Nodes -          merged: ", ftos(pathlib_merge_cnt),"\n");
-            dprint("Nodes -          closed: ", ftos(pathlib_closed_cnt),"\n");
-            dprint("Nodes -        searched: ", ftos(pathlib_searched_cnt),"\n");
+            LOG_TRACE("Time used -      pathfinding: ", ftos(ptime),"\n");
+            LOG_TRACE("Time used - rebuild & filter: ", ftos(ftime),"\n");
+            LOG_TRACE("Time used -          cleanup: ", ftos(ctime),"\n");
+            LOG_TRACE("Time used -            total: ", ftos(ptime + ftime + ctime),"\n");
+            LOG_TRACE("Time used -         # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n");
+            LOG_TRACE("Nodes -         created: ", ftos(pathlib_made_cnt),"\n");
+            LOG_TRACE("Nodes -            open: ", ftos(pathlib_open_cnt),"\n");
+            LOG_TRACE("Nodes -          merged: ", ftos(pathlib_merge_cnt),"\n");
+            LOG_TRACE("Nodes -          closed: ", ftos(pathlib_closed_cnt),"\n");
+            LOG_TRACE("Nodes -        searched: ", ftos(pathlib_searched_cnt),"\n");
 
         if(pathlib_recycle_cnt)
-            dprint("Nodes -      make/reuse: ", ftos(pathlib_made_cnt / pathlib_recycle_cnt),"\n");
+            LOG_TRACE("Nodes -      make/reuse: ", ftos(pathlib_made_cnt / pathlib_recycle_cnt),"\n");
         if(pathlib_recycle_cnt)
-            dprint("Nodes -          reused: ", ftos(pathlib_recycle_cnt),"\n");
+            LOG_TRACE("Nodes -          reused: ", ftos(pathlib_recycle_cnt),"\n");
 
-            dprint("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\n");
-            dprint("Nodes bestcash -   hits: ", ftos(pathlib_bestcash_hits),"\n");
-            dprint("Nodes bestcash -   save: ", ftos(pathlib_bestcash_saved),"\n");
-            dprint("AStar done. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n\n");
+            LOG_TRACE("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\n");
+            LOG_TRACE("Nodes bestcash -   hits: ", ftos(pathlib_bestcash_hits),"\n");
+            LOG_TRACE("Nodes bestcash -   save: ", ftos(pathlib_bestcash_saved),"\n");
+            LOG_TRACE("AStar done. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n\n");
 #endif
             return start;
         }
     }
 
-    dprint("A* Faild to find a path! Try a smaller gridsize.\n");
+    LOG_TRACE("A* Faild to find a path! Try a smaller gridsize.\n");
 
     pathlib_cleanup();
 
index 9d49be9ecea3c9a5eb8a5cb75188d56bdfc6ee5a..1f095a7856a1f8ff8304004016b9e9c73ac4dfdb 100644 (file)
@@ -105,7 +105,7 @@ float pathlib_expandnode_star(entity node, vector start, vector goal)
 
     if(node.pathlib_node_edgeflags == pathlib_node_edgeflag_none)
     {
-        dprint("Node at ", vtos(node.origin), " not expanable");
+        LOG_TRACE("Node at ", vtos(node.origin), " not expanable");
         return pathlib_open_cnt;
     }
 
index cf000801a855afd15481a24ce1480aa77a7521e4..39847f635d220661cf60c9caa56f57f87b06169f 100644 (file)
@@ -71,7 +71,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
 
     if(inwater(parent.origin))
     {
-        dprint("FromWater\n");
+        LOG_TRACE("FromWater\n");
         pathlib_expandnode = pathlib_expandnode_box;
         pathlib_movenode   = pathlib_swimnode;
     }
@@ -79,13 +79,13 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     {
         if(inwater(to))
         {
-            dprint("ToWater\n");
+            LOG_TRACE("ToWater\n");
             pathlib_expandnode = pathlib_expandnode_box;
             pathlib_movenode   = pathlib_walknode;
         }
         else
         {
-            dprint("LandToLoand\n");
+            LOG_TRACE("LandToLoand\n");
             //if(edge_check(parent.origin))
             //    return 0;
 
@@ -98,7 +98,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     node = pathlib_nodeatpoint(to);
     if(node)
     {
-        dprint("NodeAtPoint\n");
+        LOG_TRACE("NodeAtPoint\n");
         ++pathlib_merge_cnt;
 
         if(node.owner == openlist)
@@ -131,7 +131,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     {
         //pathlib_showsquare(where, 0 ,30);
         //pathlib_showsquare(parent.origin, 1 ,30);
-        dprint("pathlib_movenode_goodnode = 0\n");
+        LOG_TRACE("pathlib_movenode_goodnode = 0\n");
         return 0;
     }
 
@@ -139,9 +139,9 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
 
     if(pathlib_nodeatpoint(where))
     {
-        dprint("NAP WHERE :",vtos(where),"\n");
-        dprint("not NAP TO:",vtos(to),"\n");
-        dprint("NAP-NNAP:",ftos(vlen(to-where)),"\n\n");
+        LOG_TRACE("NAP WHERE :",vtos(where),"\n");
+        LOG_TRACE("not NAP TO:",vtos(to),"\n");
+        LOG_TRACE("NAP-NNAP:",ftos(vlen(to-where)),"\n\n");
         return 0;
     }
 
@@ -149,7 +149,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     if(doedge)
         if (!tile_check(where))
         {
-            dprint("tile_check fail\n");
+            LOG_TRACE("tile_check fail\n");
             pathlib_showsquare(where, 0 ,30);
             return 0;
         }
@@ -241,7 +241,7 @@ void pathlib_close_node(entity node,vector goal)
 
     if(node.owner == closedlist)
     {
-        dprint("Pathlib: Tried to close a closed node!\n");
+        LOG_TRACE("Pathlib: Tried to close a closed node!\n");
         return;
     }
 
@@ -457,12 +457,12 @@ entity pathlib_astar(vector from,vector to)
     to.y = fsnap(to.y, pathlib_gridsize);
     //to_z += 32;
 
-    dprint("AStar init\n");
+    LOG_TRACE("AStar init\n");
     path = pathlib_mknode(from, world);
     pathlib_close_node(path, to);
     if(pathlib_foundgoal)
     {
-        dprint("AStar: Goal found on first node!\n");
+        LOG_TRACE("AStar: Goal found on first node!\n");
 
         open           = spawn();
         open.owner     = open;
@@ -476,7 +476,7 @@ entity pathlib_astar(vector from,vector to)
 
     if(pathlib_expandnode(path, from, to) <= 0)
     {
-        dprint("AStar path fail.\n");
+        LOG_TRACE("AStar path fail.\n");
         pathlib_cleanup();
 
         return world;
@@ -494,11 +494,11 @@ entity pathlib_astar(vector from,vector to)
     {
         if((gettime(GETTIME_REALTIME) - pathlib_starttime) > pathlib_maxtime)
         {
-            dprint("Path took to long to compute!\n");
-            dprint("Nodes - created: ", ftos(pathlib_made_cnt),"\n");
-            dprint("Nodes -    open: ", ftos(pathlib_open_cnt),"\n");
-            dprint("Nodes -  merged: ", ftos(pathlib_merge_cnt),"\n");
-            dprint("Nodes -  closed: ", ftos(pathlib_closed_cnt),"\n");
+            LOG_TRACE("Path took to long to compute!\n");
+            LOG_TRACE("Nodes - created: ", ftos(pathlib_made_cnt),"\n");
+            LOG_TRACE("Nodes -    open: ", ftos(pathlib_open_cnt),"\n");
+            LOG_TRACE("Nodes -  merged: ", ftos(pathlib_merge_cnt),"\n");
+            LOG_TRACE("Nodes -  closed: ", ftos(pathlib_closed_cnt),"\n");
 
             pathlib_cleanup();
             return world;
@@ -515,7 +515,7 @@ entity pathlib_astar(vector from,vector to)
 
         if(pathlib_foundgoal)
         {
-            dprint("Target found. Rebuilding and filtering path...\n");
+            LOG_TRACE("Target found. Rebuilding and filtering path...\n");
             ftime = gettime(GETTIME_REALTIME);
             ptime = ftime - ptime;
 
@@ -542,26 +542,26 @@ entity pathlib_astar(vector from,vector to)
 #ifdef DEBUGPATHING
             pathlib_showpath2(start);
 
-            dprint("Time used -      pathfinding: ", ftos(ptime),"\n");
-            dprint("Time used - rebuild & filter: ", ftos(ftime),"\n");
-            dprint("Time used -          cleanup: ", ftos(ctime),"\n");
-            dprint("Time used -            total: ", ftos(ptime + ftime + ctime),"\n");
-            dprint("Time used -         # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n");
-            dprint("Nodes -         created: ", ftos(pathlib_made_cnt),"\n");
-            dprint("Nodes -            open: ", ftos(pathlib_open_cnt),"\n");
-            dprint("Nodes -          merged: ", ftos(pathlib_merge_cnt),"\n");
-            dprint("Nodes -          closed: ", ftos(pathlib_closed_cnt),"\n");
-            dprint("Nodes -        searched: ", ftos(pathlib_searched_cnt),"\n");
-            dprint("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\n");
-            dprint("Nodes bestcash -   hits: ", ftos(pathlib_bestcash_hits),"\n");
-            dprint("Nodes bestcash -   save: ", ftos(pathlib_bestcash_saved),"\n");
-            dprint("AStar done.\n");
+            LOG_TRACE("Time used -      pathfinding: ", ftos(ptime),"\n");
+            LOG_TRACE("Time used - rebuild & filter: ", ftos(ftime),"\n");
+            LOG_TRACE("Time used -          cleanup: ", ftos(ctime),"\n");
+            LOG_TRACE("Time used -            total: ", ftos(ptime + ftime + ctime),"\n");
+            LOG_TRACE("Time used -         # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n");
+            LOG_TRACE("Nodes -         created: ", ftos(pathlib_made_cnt),"\n");
+            LOG_TRACE("Nodes -            open: ", ftos(pathlib_open_cnt),"\n");
+            LOG_TRACE("Nodes -          merged: ", ftos(pathlib_merge_cnt),"\n");
+            LOG_TRACE("Nodes -          closed: ", ftos(pathlib_closed_cnt),"\n");
+            LOG_TRACE("Nodes -        searched: ", ftos(pathlib_searched_cnt),"\n");
+            LOG_TRACE("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\n");
+            LOG_TRACE("Nodes bestcash -   hits: ", ftos(pathlib_bestcash_hits),"\n");
+            LOG_TRACE("Nodes bestcash -   save: ", ftos(pathlib_bestcash_saved),"\n");
+            LOG_TRACE("AStar done.\n");
 #endif
             return start;
         }
     }
 
-    dprint("A* Faild to find a path! Try a smaller gridsize.\n");
+    LOG_TRACE("A* Faild to find a path! Try a smaller gridsize.\n");
 
     pathlib_cleanup();
 
index f1e596d798dab61eaabca0f54309209a499b181a..8720eca8b7fdf4198ffededf425784cce73de41e 100644 (file)
@@ -85,7 +85,7 @@ vector pathlib_walknode(vector start,vector end,float doedge)
     vector direction,point,last_point,s,e;
     float steps, distance, i;
 
-    dprint("Walking node from ", vtos(start), " to ", vtos(end), "\n");
+    LOG_TRACE("Walking node from ", vtos(start), " to ", vtos(end), "\n");
 
     pathlib_movenode_goodnode = 0;
 
@@ -107,7 +107,7 @@ vector pathlib_walknode(vector start,vector end,float doedge)
         //start - movenode_maxdrop
         a.cnt = time + 10;
 
-        dprint("I cant walk on air!\n");
+        LOG_TRACE("I cant walk on air!\n");
         return trace_endpos;
     }
 
index 1bc115dc0e49323e033963aa227c9ed4402635bc..7dee3e80f6154d6980061635f280b50b34c2dcf4 100644 (file)
@@ -163,7 +163,7 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
     pathlib_searched_cnt     = 0;
     pathlib_foundgoal      = false;
 
-    dprint("pathlib_waypointpath init\n");
+    LOG_TRACE("pathlib_waypointpath init\n");
 
     // Initialize waypoint grid
     // FIXME! presisted chain for better preformance
@@ -185,10 +185,10 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
     start_node = wp_from;
 
     start_node.pathlib_list = closedlist;
-    dprint("Expanding ",ftos(pathlib_wpp_expand(start_node))," links\n");
+    LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(start_node))," links\n");
     if(pathlib_open_cnt <= 0)
     {
-        dprint("pathlib_waypointpath: Start waypoint not linked! aborting.\n");
+        LOG_TRACE("pathlib_waypointpath: Start waypoint not linked! aborting.\n");
         return world;
     }
 
@@ -202,17 +202,17 @@ entity pathlib_waypointpath_step()
     n = pathlib_wpp_bestopen();
     if(!n)
     {
-        dprint("Cannot find best open node, abort.\n");
+        LOG_TRACE("Cannot find best open node, abort.\n");
         return world;
     }
     pathlib_wpp_close(n);
-       dprint("Expanding ",ftos(pathlib_wpp_expand(n))," links\n");
+       LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(n))," links\n");
 
     if(pathlib_foundgoal)
     {
         entity start, end, open, ln;
 
-        dprint("Target found. Rebuilding and filtering path...\n");
+        LOG_TRACE("Target found. Rebuilding and filtering path...\n");
 
                buildpath_nodefilter = buildpath_nodefilter_none;
                start = path_build(world, start_node.origin, world, world);
index c2e812c2c10e6463e49ec2cee4185c23fce5d8b3..2450d5865108112767fc15caebd10e8dd9102c0a 100644 (file)
@@ -22,7 +22,7 @@ void playerdemo_shutdown()
 {
        if(self.playerdemo_mode != PLAYERDEMO_MODE_OFF)
        {
-               print("playerdemo: ", self.netname, " closed\n");
+               LOG_INFO("playerdemo: ", self.netname, " closed\n");
                fclose(self.playerdemo_fh);
        }
        self.playerdemo_mode = 0;
@@ -36,7 +36,7 @@ void playerdemo_open_read(string f)
        self.playerdemo_time = stof(fgets(self.playerdemo_fh));
        self.playerdemo_time += self.playerdemo_starttime;
        self.movetype = MOVETYPE_NONE;
-       print("playerdemo: ", self.netname, " reading from ", f, "\n");
+       LOG_INFO("playerdemo: ", self.netname, " reading from ", f, "\n");
 }
 void playerdemo_open_write(string f)
 {
@@ -44,8 +44,8 @@ void playerdemo_open_write(string f)
        self.playerdemo_mode = PLAYERDEMO_MODE_WRITING;
        self.playerdemo_fh = fopen(f, FILE_WRITE);
        self.playerdemo_starttime = time - 1;
-       print("playerdemo: ", self.netname, " writing to ", f, "\n");
-       print("WARNING: playerdemo file format is incomplete and not stable yet. DO NOT RELY ON IT!\n");
+       LOG_INFO("playerdemo: ", self.netname, " writing to ", f, "\n");
+       LOG_INFO("WARNING: playerdemo file format is incomplete and not stable yet. DO NOT RELY ON IT!\n");
 }
 #define PLAYERDEMO_FIELD(func,t,f) func##t(f,#f);
 #define PLAYERDEMO_FIELDS(func) \
index b79b28285dc9e2839be9d713b623429be35db94a..09cd6e9d20810481f2adb9dceb18d16271ee5927 100644 (file)
@@ -146,7 +146,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player)
        tracebox(safe, player.mins - SAFENUDGE, player.maxs + SAFENUDGE, step, MOVE_NOMONSTERS, player);
        if(trace_startsolid)
        {
-               print("'safe' teleport location is not safe!\n");
+               LOG_INFO("'safe' teleport location is not safe!\n");
                // FAIL TODO why does this happen?
                return 0;
        }
@@ -154,7 +154,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player)
        tracebox(safe, player.mins - SAFENUDGE, player.maxs + SAFENUDGE, to, MOVE_NOMONSTERS, player);
        if(trace_startsolid)
        {
-               print("trace_endpos in solid, this can't be!\n");
+               LOG_INFO("trace_endpos in solid, this can't be!\n");
                // FAIL TODO why does this happen? (reported by MrBougo)
                return 0;
        }
@@ -213,7 +213,7 @@ float Portal_FindSafeOrigin(entity portal)
        if(!move_out_of_solid(portal))
        {
 #ifdef DEBUG
-               print("NO SAFE ORIGIN\n");
+               LOG_INFO("NO SAFE ORIGIN\n");
 #endif
                return 0;
        }
@@ -415,7 +415,7 @@ void Portal_Remove(entity portal, float killed)
        {
                fixedmakevectors(portal.mangle);
                sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTEN_NORM);
-               Send_Effect("rocket_explode", portal.origin + v_forward * 16, v_forward * 1024, 4);
+               Send_Effect(EFFECT_ROCKET_EXPLODE, portal.origin + v_forward * 16, v_forward * 1024, 4);
                remove(portal);
        }
        else
index eab7017d1cb877ccc78e15c57c5849503f76fa55..bffb221a24287bd4671ca615b7a12d2cd69b68e8 100644 (file)
@@ -548,22 +548,22 @@ void dumpsurface(entity e)
 {
        float n, si, ni;
        vector norm, vec;
-       print("Surfaces of ", etos(e), ":\n");
+       LOG_INFO("Surfaces of ", etos(e), ":\n");
 
-       print("TEST = ", ftos(getsurfacenearpoint(e, '0 0 0')), "\n");
+       LOG_INFO("TEST = ", ftos(getsurfacenearpoint(e, '0 0 0')), "\n");
 
        for(si = 0; ; ++si)
        {
                n = getsurfacenumpoints(e, si);
                if(n <= 0)
                        break;
-               print("  Surface ", ftos(si), ":\n");
+               LOG_INFO("  Surface ", ftos(si), ":\n");
                norm = getsurfacenormal(e, si);
-               print("    Normal = ", vtos(norm), "\n");
+               LOG_INFO("    Normal = ", vtos(norm), "\n");
                for(ni = 0; ni < n; ++ni)
                {
                        vec = getsurfacepoint(e, si, ni);
-                       print("    Point ", ftos(ni), " = ", vtos(vec), " (", ftos(norm * vec), ")\n");
+                       LOG_INFO("    Point ", ftos(ni), " = ", vtos(vec), " (", ftos(norm * vec), ")\n");
                }
        }
 }
index bc191f74f46be02808a00148036e1e6ef5e92641..4cad8866422175099de63a63806d09764c0461c6 100644 (file)
@@ -53,7 +53,7 @@ void spawnpoint_use()
                self.team = activator.team;
                some_spawn_has_been_used = 1;
        }
-       print("spawnpoint was used!\n");
+       LOG_INFO("spawnpoint was used!\n");
 }
 
 void relocate_spawnpoint()
@@ -70,14 +70,14 @@ void relocate_spawnpoint()
         self.maxs = PL_MAX_CONST;
         if (!move_out_of_solid(self))
             objerror("could not get out of solid at all!");
-        print("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
-        print(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
-        print(" ", ftos(self.origin.y - o.y));
-        print(" ", ftos(self.origin.z - o.z), "'\n");
+        LOG_INFO("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
+        LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
+        LOG_INFO(" ", ftos(self.origin.y - o.y));
+        LOG_INFO(" ", ftos(self.origin.z - o.z), "'\n");
         if (autocvar_g_spawnpoints_auto_move_out_of_solid)
         {
             if (!spawnpoint_nag)
-                print("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)\n");
+                LOG_INFO("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)\n");
             spawnpoint_nag = 1;
         }
         else
@@ -223,7 +223,7 @@ vector Spawn_Score(entity spot, float mindist, float teamcheck)
 
                if(!found)
                {
-                       dprint("WARNING: spawnpoint at ", vtos(spot.origin), " could not find its target ", spot.target, "\n");
+                       LOG_TRACE("WARNING: spawnpoint at ", vtos(spot.origin), " could not find its target ", spot.target, "\n");
                        return '-1 0 0';
                }
        }
index 01af275528d2d2a0b1881ae378cc95e38c1a8677..e57d56dd169be0022cd881bc00d32e581f8e5842 100644 (file)
@@ -498,7 +498,7 @@ vector steerlib_beamsteer(vector dir, float length, float step, float step_up, f
 #ifdef TLIBS_TETSLIBS
 void flocker_die()
 {
-       Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
 
     self.owner.cnt += 1;
     self.owner = world;
index 18ea24d9498327546a90c07eb83f3ca182cc4f2d..1f629af5cfe06eb0e5815127c9d8bd75fb6d3c78 100644 (file)
@@ -200,7 +200,7 @@ void StartFrame (void)
                float t, pp, c_seeing, c_seen;
                entity cl;
                t = client_cefc_accumulator / (time - client_cefc_accumulatortime);
-               print("CEFC time: ", ftos(t * 1000), "ms; ");
+               LOG_INFO("CEFC time: ", ftos(t * 1000), "ms; ");
                c_seeing = 0;
                c_seen = 0;
                FOR_EACH_CLIENT(cl)
@@ -210,8 +210,8 @@ void StartFrame (void)
                        if(IS_PLAYER(cl))
                                ++c_seen;
                }
-               print("CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; ");
-               print("CEFC 100% load at: ", ftos(solve_quadratic(t, -t, -1) * '0 1 0'), "\n");
+               LOG_INFO("CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; ");
+               LOG_INFO("CEFC 100% load at: ", ftos(solve_quadratic(t, -t, -1) * '0 1 0'), "\n");
 
                client_cefc_accumulatortime = time;
                client_cefc_accumulator = 0;
index fa25ea7ec0e9fe88336d1068b181c58e80fd506a..858a76198b9a78aaa1dd61d26729c77dba9a2794 100644 (file)
@@ -177,7 +177,7 @@ void ItemRead(float _IsNew)
             else
             {
                 self.draw = ItemDraw;
-                dprint("Simple item requested for ", _fn, " but no model exists for it\n");
+                LOG_TRACE("Simple item requested for ", _fn, " but no model exists for it\n");
             }
         }
 
@@ -186,7 +186,7 @@ void ItemRead(float _IsNew)
 
 
         if(self.mdl == "")
-            dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
+            LOG_TRACE("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
 
         precache_model(self.mdl);
         setmodel(self, self.mdl);
@@ -270,7 +270,7 @@ bool ItemSend(entity to, int sf)
     {
 
         if(self.mdl == "")
-            dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
+            LOG_TRACE("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
 
         WriteString(MSG_ENTITY, self.mdl);
     }
@@ -438,8 +438,8 @@ void Item_Respawn (void)
        self.think = Item_Think;
        self.nextthink = time;
 
-       //Send_Effect("item_respawn", self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
-       Send_Effect("item_respawn", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       //Send_Effect(EFFECT_ITEM_RESPAWN, self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_RESPAWN, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
 }
 
 void Item_RespawnCountdown (void)
@@ -733,7 +733,7 @@ void Item_Touch (void)
 
        other.last_pickup = time;
 
-       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        sound (other, CH_TRIGGER, self.item_pickupsound, VOL_BASE, ATTEN_NORM);
 
        if (self.classname == "droppedweapon")
@@ -785,7 +785,7 @@ void Item_FindTeam()
        if(self.effects & EF_NODRAW)
        {
                // marker for item team search
-               dprint("Initializing item team ", ftos(self.team), "\n");
+               LOG_TRACE("Initializing item team ", ftos(self.team), "\n");
                RandomSelection_Init();
                for(head = world; (head = findfloat(head, team, self.team)); ) if(head.flags & FL_ITEM)
                        RandomSelection_Add(head, 0, string_null, head.cnt, 0);
@@ -812,7 +812,7 @@ void Item_FindTeam()
 // TODO: perhaps nice special effect?
 void RemoveItem(void)
 {
-       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        remove(self);
 }
 
@@ -1075,8 +1075,8 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                            // why not flags & fl_item?
                                if(otheritem.is_item)
                                {
-                                       dprint("XXX Found duplicated item: ", itemname, vtos(self.origin));
-                                       dprint(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
+                                       LOG_TRACE("XXX Found duplicated item: ", itemname, vtos(self.origin));
+                                       LOG_TRACE(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
                                        error("Mapper sucks.");
                                }
                        }
@@ -1421,7 +1421,7 @@ void spawnfunc_target_items (void)
                                        }
                                }
                                if(j > WEP_LAST)
-                                       print("target_items: invalid item ", argv(i), "\n");
+                                       LOG_INFO("target_items: invalid item ", argv(i), "\n");
                        }
                }
 
@@ -1781,7 +1781,7 @@ float GiveItems(entity e, float beginarg, float endarg)
                                        }
                                }
                                if(j > WEP_LAST)
-                                       print("give: invalid item ", cmd, "\n");
+                                       LOG_INFO("give: invalid item ", cmd, "\n");
                                break;
                }
                val = 999;
index 41354bf8a1f7a14b823ce476cde8c17cfce71746..ab25dbfbb0aba424033257de7664ba6e6b25ecb7 100644 (file)
@@ -1387,10 +1387,10 @@ void LinkDoors()
        FindConnectedComponent(self, enemy, LinkDoors_nextent, LinkDoors_isconnected, world);
 
        // set owner, and make a loop of the chain
-       dprint("LinkDoors: linking doors:");
+       LOG_TRACE("LinkDoors: linking doors:");
        for(t = self; ; t = t.enemy)
        {
-               dprint(" ", etos(t));
+               LOG_TRACE(" ", etos(t));
                t.owner = self;
                if(t.enemy == world)
                {
@@ -1398,7 +1398,7 @@ void LinkDoors()
                        break;
                }
        }
-       dprint("\n");
+       LOG_TRACE("\n");
 
        // collect health, targetname, message, size
        cmins = self.absmin;
index f75df5e38a6a6fe3daa1e53c2a964402292f07eb..b14386bd4975f2bdaa21ea8fbe90ea34cb4edaaf 100644 (file)
@@ -64,7 +64,7 @@ void InitGameplayMode()
 
        if (!cvar_value_issafe(world.fog))
        {
-               print("The current map contains a potentially harmful fog setting, ignored\n");
+               LOG_INFO("The current map contains a potentially harmful fog setting, ignored\n");
                world.fog = string_null;
        }
        if(MapInfo_Map_fog != "")
@@ -84,6 +84,7 @@ void InitGameplayMode()
 
        if(g_dm)
        {
+               MUTATOR_ADD(gamemode_deathmatch);
        }
 
        if(g_tdm)
index 8e7810bbb117de338ed62dc6a32e6684466e8f1e..3c3c9d80695fde47bfb984a548919eb643cc19d2 100644 (file)
@@ -85,7 +85,7 @@ void weapon_defaultspawnfunc(float wpn)
                                }
                                if(j > WEP_LAST)
                                {
-                                       print("The weapon replace list for ", oldself.classname, " contains an unknown weapon ", s, ". Skipped.\n");
+                                       LOG_INFO("The weapon replace list for ", oldself.classname, " contains an unknown weapon ", s, ". Skipped.\n");
                                }
                        }
                        self = oldself;
@@ -105,7 +105,7 @@ void weapon_defaultspawnfunc(float wpn)
                        }
                        if(j > WEP_LAST)
                        {
-                               print("The weapon replace list for ", self.classname, " contains an unknown weapon ", s, ". Skipped.\n");
+                               LOG_INFO("The weapon replace list for ", self.classname, " contains an unknown weapon ", s, ". Skipped.\n");
                        }
                }
                if(wpn == 0)
index 484ac35be48ae6a459dfd59827175c29cd00437c..eec32a3e51ac0339bf9c764d992b15aa3b942b90 100644 (file)
@@ -118,7 +118,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                                        if (trace_ent == ent.cursor_trace_ent)
                                                w_shotdir = normalize(ent.cursor_trace_ent.origin - w_shotorg);
                                        else
-                                               print("antilag fail\n");
+                                               LOG_INFO("antilag fail\n");
                                }
                        }
                }
@@ -182,7 +182,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p
        #if 0
        mspercallsum += gettime(GETTIME_HIRES);
        mspercallcount += 1;
-       print("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
+       LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
        #endif
 
        proj.velocity = W_CalculateProjectileVelocity(proj.owner.velocity, pSpeed * dir, forceAbsolute);
@@ -357,11 +357,11 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
        float total_damage = 0;
 
        if(tracereffects & EF_RED)
-               fireBullet_trace_callback_eff = particleeffectnum("tr_rifle");
+               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_RIFLE);
        else if(tracereffects & EF_BLUE)
-               fireBullet_trace_callback_eff = particleeffectnum("tr_rifle_weak");
+               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_RIFLE_WEAK);
        else
-               fireBullet_trace_callback_eff = particleeffectnum("tr_bullet");
+               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_BULLET);
 
        float lag = ANTILAG_LATENCY(self);
        if(lag < 0.001)
@@ -422,6 +422,8 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
                {
                        fireBullet_last_hit = hit;
                        yoda = 0;
+                       MUTATOR_CALLHOOK(FireBullet_Hit, self, hit, start, end, damage);
+                       damage = frag_damage;
                        float g = accuracy_isgooddamage(self, hit);
                        Damage(hit, self, self, damage * solid_penetration_left, dtype, start, force * dir * solid_penetration_left);
                        // calculate hits for ballistic weapons
index 09d2770467ea849161dd42a43488cfed1a06130a..6701f5829a25839ba5e353d7deaaaee12cae8aa2 100644 (file)
@@ -48,21 +48,21 @@ void WeaponStats_ready(entity fh, entity pass, float status)
                case URL_READY_CANREAD:
                        // url_fclose is processing, we got a response for writing the data
                        // this must come from HTTP
-                       print("Got response from weapon stats server:\n");
+                       LOG_INFO("Got response from weapon stats server:\n");
                        while((s = url_fgets(fh)))
-                               print("  ", s, "\n");
-                       print("End of response.\n");
+                               LOG_INFO("  ", s, "\n");
+                       LOG_INFO("End of response.\n");
                        url_fclose(fh);
                        break;
                case URL_READY_CLOSED:
                        // url_fclose has finished
-                       print("Weapon stats written\n");
+                       LOG_INFO("Weapon stats written\n");
                        buf_del(weaponstats_buffer);
                        weaponstats_buffer = -1;
                        break;
                case URL_READY_ERROR:
                default:
-                       print("Weapon stats writing failed: ", ftos(status), "\n");
+                       LOG_INFO("Weapon stats writing failed: ", ftos(status), "\n");
                        buf_del(weaponstats_buffer);
                        weaponstats_buffer = -1;
                        break;
index 17781e6d4c955e475af42d57bc8585ff8b496740..f53e3c53d09119c21b6c5542d640197dc9cf0b37 100644 (file)
@@ -172,7 +172,7 @@ void CL_WeaponEntity_SetModel(string name)
                                self.movedir = gettaginfo(self, idx);
                        else
                        {
-                               print("WARNING: weapon model ", self.model, " does not support the 'shot' tag, will display shots TOTALLY wrong\n");
+                               LOG_INFO("WARNING: weapon model ", self.model, " does not support the 'shot' tag, will display shots TOTALLY wrong\n");
                                self.movedir = '0 0 0';
                        }
                }
@@ -196,7 +196,7 @@ void CL_WeaponEntity_SetModel(string name)
                                self.spawnorigin = gettaginfo(self, idx);
                        else
                        {
-                               print("WARNING: weapon model ", self.model, " does not support the 'shell' tag, will display casings wrong\n");
+                               LOG_INFO("WARNING: weapon model ", self.model, " does not support the 'shell' tag, will display casings wrong\n");
                                self.spawnorigin = self.movedir;
                        }
                }
@@ -225,7 +225,7 @@ void CL_WeaponEntity_SetModel(string name)
                        }
                        else
                        {
-                               print("WARNING: weapon model ", self.model, " does not support the 'handle' tag and neither does the v_ model support the 'shot' tag, will display muzzle flashes TOTALLY wrong\n");
+                               LOG_INFO("WARNING: weapon model ", self.model, " does not support the 'handle' tag and neither does the v_ model support the 'shot' tag, will display muzzle flashes TOTALLY wrong\n");
                                self.oldorigin = '0 0 0'; // there is no way to recover from this
                        }
                }
@@ -916,7 +916,7 @@ void W_Reload(float sent_ammo_min, string sent_sound)
        // don't reload weapons that don't have the RELOADABLE flag
        if (!(e.spawnflags & WEP_FLAG_RELOADABLE))
        {
-               dprint("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n");
+               LOG_TRACE("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n");
                return;
        }
 
index 706acde4448aef1d6bad8eb039570cbecabc6129..d04b768f8810e8b3b5d2b431b54ba135cafc0fe8 100644 (file)
@@ -116,7 +116,7 @@ float WarpZoneLib_BoxTouchesBrush_Recurse()
 #ifdef CSQC
        if (trace_networkentity)
        {
-               dprint("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush\n");
+               LOG_TRACE("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush\n");
                // we cannot continue, as a player blocks us...
                // so, abort
                return 0;
@@ -276,7 +276,7 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end,
        {
                if(--i < 1)
                {
-                       dprint("Too many warpzones in sequence, aborting trace.\n");
+                       LOG_TRACE("Too many warpzones in sequence, aborting trace.\n");
                        trace_ent = world;
                        break;
                }
@@ -304,7 +304,7 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end,
                if(trace_ent == wz)
                {
                        // FIXME can this check be removed? Do we really need it?
-                       dprint("I transformed into the same zone again, wtf, aborting the trace\n");
+                       LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace\n");
                        trace_ent = world;
                        break;
                }
@@ -399,7 +399,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
        {
                if(--i < 1)
                {
-                       dprint("Too many warpzones in sequence, aborting trace.\n");
+                       LOG_TRACE("Too many warpzones in sequence, aborting trace.\n");
                        trace_ent = world;
                        break;
                }
@@ -417,7 +417,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
                if(trace_ent == wz)
                {
                        // FIXME can this check be removed? Do we really need it?
-                       dprint("I transformed into the same zone again, wtf, aborting the trace\n");
+                       LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace\n");
                        trace_ent = world;
                        break;
                }
index f3dd22ad31639328c1550f5ac70ebe5287e16870..b5c6f656a44e1410514f83da79f19aa5ce23a082 100644 (file)
@@ -112,7 +112,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
                }
                else
                {
-                       print("would have to put player in solid, won't do that\n");
+                       LOG_INFO("would have to put player in solid, won't do that\n");
                        setorigin(player, o0 - player.view_ofs);
                        return 0;
                }
@@ -216,7 +216,7 @@ void WarpZone_Touch (void)
        }
        else
        {
-               dprint("WARPZONE FAIL AHAHAHAHAH))\n");
+               LOG_TRACE("WARPZONE FAIL AHAHAHAHAH))\n");
        }
 }
 
@@ -338,13 +338,13 @@ float WarpZone_CheckProjectileImpact(entity player)
                return 0;
 
 #ifdef WARPZONELIB_REMOVEHACK
-       print("impactfilter found something - and it no longer gets handled correctly - please tell divVerent whether anything behaves broken now\n");
+       LOG_INFO("impactfilter found something - and it no longer gets handled correctly - please tell divVerent whether anything behaves broken now\n");
 #else
-       print("impactfilter found something - and it even gets handled correctly - please tell divVerent that this code apparently gets triggered again\n");
+       LOG_INFO("impactfilter found something - and it even gets handled correctly - please tell divVerent that this code apparently gets triggered again\n");
 #endif
-       print("Entity type: ", player.classname, "\n");
-       print("Origin: ", vtos(player.origin), "\n");
-       print("Velocity: ", vtos(player.velocity), "\n");
+       LOG_INFO("Entity type: ", player.classname, "\n");
+       LOG_INFO("Origin: ", vtos(player.origin), "\n");
+       LOG_INFO("Velocity: ", vtos(player.velocity), "\n");
 
 #ifdef WARPZONELIB_REMOVEHACK
        return 0;
@@ -577,7 +577,7 @@ void WarpZone_InitStep_UpdateTransform()
                point = point * (1 / (3 * area));
                if(vlen(norm) < 0.99)
                {
-                       print("trigger_warpzone near ", vtos(self.aiment.origin), " is nonplanar. BEWARE.\n");
+                       LOG_INFO("trigger_warpzone near ", vtos(self.aiment.origin), " is nonplanar. BEWARE.\n");
                        area = 0; // no autofixing in this case
                }
                norm = normalize(norm);
@@ -594,15 +594,15 @@ void WarpZone_InitStep_UpdateTransform()
                        makevectors(ang);
                        if(norm * v_forward < 0)
                        {
-                               print("Position target of trigger_warpzone near ", vtos(self.aiment.origin), " points into trigger_warpzone. BEWARE.\n");
+                               LOG_INFO("Position target of trigger_warpzone near ", vtos(self.aiment.origin), " points into trigger_warpzone. BEWARE.\n");
                                norm = -1 * norm;
                        }
                        ang = vectoangles2(norm, v_up); // keep rotation, but turn exactly against plane
                        ang.x = -ang.x;
                        if(norm * v_forward < 0.99)
-                               print("trigger_warpzone near ", vtos(self.aiment.origin), " has been turned to match plane orientation (", vtos(self.aiment.angles), " -> ", vtos(ang), "\n");
+                               LOG_INFO("trigger_warpzone near ", vtos(self.aiment.origin), " has been turned to match plane orientation (", vtos(self.aiment.angles), " -> ", vtos(ang), "\n");
                        if(vlen(org - self.aiment.origin) > 0.5)
-                               print("trigger_warpzone near ", vtos(self.aiment.origin), " has been moved to match the plane (", vtos(self.aiment.origin), " -> ", vtos(org), ").\n");
+                               LOG_INFO("trigger_warpzone near ", vtos(self.aiment.origin), " has been moved to match the plane (", vtos(self.aiment.origin), " -> ", vtos(org), ").\n");
                }
        }
        else if(area > 0)