// generic commands (across all programs)
alias addtolist "qc_cmd_svmenu addtolist ${* ?}" // Add a string to a cvar
alias dumpcommands "qc_cmd_svmenu dumpcommands ${* ?}" // Dump all commands on the program to *_cmd_dump.txt
+alias dumpmonsters "qc_cmd_svmenu dumpmonsters ${* ?}" // Dump all monsters into monsters_dump.txt
alias dumpnotifs "qc_cmd_svcl dumpnotifs ${* ?}" // Dump all notifications into notifications_dump.txt
alias maplist "qc_cmd_svmenu maplist ${* ?}" // Automatic control of maplist
alias nextframe "qc_cmd_svmenu nextframe ${* ?}" // Execute the given command next frame of this VM
// mutator aliases
alias sandbox "cmd g_sandbox ${* ?}"
-alias spawnturret "cmd turretspawn ${* ?}"
-alias upgradeturret "cmd buffturret ${* ?}"
-alias rmturret "cmd turretremove ${* ?}"
-alias repairturret "cmd repairturret ${* ?}"
// ============================================================
alias anticheat "qc_cmd_sv anticheat ${* ?}" // Create an anticheat report for a client
alias bbox "qc_cmd_sv bbox ${* ?}" // Print detailed information about world size
alias bot_cmd "qc_cmd_sv bot_cmd ${* ?}" // Control and send commands to bots
-alias butcher "qc_cmd_sv butcher ${* ?}" // Remove all monsters on the map
+alias butcher "qc_cmd_sv butcher ${* ?}" // Remove all monsters on the map
alias cointoss "qc_cmd_sv cointoss ${* ?}" // Flip a virtual coin and give random result
alias database "qc_cmd_sv database ${* ?}" // Extra controls of the serverprogs database
alias defer_clear "qc_cmd_sv defer_clear ${* ?}" // Clear all queued defer commands for a specific client
seta menu_monsters_edit_color ""
seta menu_monsters_edit_movetarget 1
-seta menu_td_edit_spawn ""
-
set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
float stat_secrets_found, stat_secrets_total;
- float stat_current_wave, stat_totalwaves;
float stat_monsters_killed, stat_monsters_total;
float rows = 0;
string val;
- // get tower defense stats
- stat_current_wave = getstatf(STAT_CURRENT_WAVE);
- stat_totalwaves = getstatf(STAT_TOTALWAVES);
-
// get monster stats
stat_monsters_killed = getstatf(STAT_MONSTERS_KILLED);
stat_monsters_total = getstatf(STAT_MONSTERS_TOTAL);
drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
- // draw waves
- if(stat_totalwaves)
- {
- val = sprintf("%d/%d", stat_current_wave, stat_totalwaves);
- pos = HUD_DrawKeyValue(pos, _("Current wave:"), val);
- }
-
// draw monsters
if(stat_monsters_total)
{
const float STAT_RESPAWN_TIME = 72;
const float STAT_ROUNDSTARTTIME = 73;
-const float STAT_CURRENT_WAVE = 73;
-const float STAT_TOTALWAVES = 74;
-
-const float STAT_MONSTERS_TOTAL = 75;
-const float STAT_MONSTERS_KILLED = 76;
+const float STAT_MONSTERS_TOTAL = 73;
+const float STAT_MONSTERS_KILLED = 74;
// mod stats (1xx)
const float STAT_REDALIVE = 100;
vector org;
float lag;
- if(player.hitplotfh >= 0 && !(player.flags & FL_MONSTER))
+ if(player.hitplotfh >= 0)
{
lag = ANTILAG_LATENCY(player);
if(lag < 0.001)
void W_AttachToShotorg(entity flash, vector offset)
{
- if(self.flags & FL_MONSTER)
- return; // no flash for monsters
entity xflash;
flash.owner = self;
flash.angles_z = random() * 360;
void W_DecreaseAmmo(.float ammo_type, float ammo_use, float ammo_reload)
{
- if(self.flags & FL_MONSTER) // no ammo for monsters... yet
- return;
-
if((self.items & IT_UNLIMITED_WEAPON_AMMO) && !ammo_reload)
return;
switch(argv(1))
{
- case "name": trace_ent.netname = strzone(strdecolorize(argv(2))); if(trace_ent.sprite) WaypointSprite_UpdateSprites(trace_ent.sprite, trace_ent.netname, "", ""); return;
+ case "name": trace_ent.monster_name = strzone(strdecolorize(argv(2))); if(trace_ent.sprite) WaypointSprite_UpdateSprites(trace_ent.sprite, trace_ent.monster_name, "", ""); return;
case "skin": if(trace_ent.monsterid != MON_MAGE) { trace_ent.skin = stof(argv(2)); trace_ent.SendFlags |= MSF_STATUS; } return;
case "movetarget": trace_ent.monster_moveflags = stof(argv(2)); return;
}
sprint(self, "That monster does not belong to you.\n");
return;
}
- sprint(self, strcat("Your pet '", trace_ent.netname, "' has been brutally mutilated.\n"));
+ 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;
}
if(g_invasion) { print("This command doesn't work during an invasion.\n"); return; }
float removed_count = 0;
- entity montokill, head;
+ entity head;
- FOR_EACH_MONSTER(montokill)
- {
- WaypointSprite_Kill(montokill.sprite);
+ FOR_EACH_MONSTER(head)
+ {
+ WaypointSprite_Kill(head.sprite);
- if(montokill.weaponentity)
- remove(montokill.weaponentity);
+ if(head.weaponentity)
+ remove(head.weaponentity);
+
+ if(head.iceblock)
+ remove(head.iceblock);
- if(montokill.iceblock)
- remove(montokill.iceblock);
-
- remove(montokill);
- removed_count += 1;
- }
+ remove(head);
+ ++removed_count;
+ }
FOR_EACH_PLAYER(head)
head.monstercount = 0;
// 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("butcher", GameCommand_butcher(request), "Instantly removes all monsters on the map") \
+ SERVER_COMMAND("butcher", GameCommand_butcher(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") \
void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint)
{
- float monster = (targ.flags & FL_MONSTER);
- float player = (targ.flags & FL_CLIENT);
-
- if(!player && !monster) // only specified entities can be freezed
+ if(!IS_PLAYER(targ) && !(targ.flags & FL_MONSTER)) // only specified entities can be freezed
return;
if(targ.frozen)
void Unfreeze (entity targ)
{
- if not(targ.frozen)
- return; // not even frozen?
-
+ if(targ.frozen) // only reset health if target was frozen
+ targ.health = ((IS_PLAYER(targ)) ? autocvar_g_balance_health_start : targ.max_health);
targ.frozen = 0;
targ.revive_progress = 0;
- targ.health = ((targ.classname == STR_PLAYER) ? autocvar_g_balance_health_start : targ.max_health);
WaypointSprite_Kill(targ.waypointsprite_attached);
// remove the ice block
- remove(targ.iceblock);
- targ.iceblock = world;
+ if(targ.iceblock)
+ {
+ remove(targ.iceblock);
+ targ.iceblock = world;
+ }
}
// these are updated by each Damage call for use in button triggering and such
entity toucher = other;
- if(toucher.frozen) { return; }
-
// automatically kill the flag and return it if it touched lava/slime/nodrop surfaces
if(ITEM_TOUCH_NEEDKILL())
{
}
// special touch behaviors
- if(toucher.vehicle_flags & VHF_ISVEHICLE)
+ if(toucher.frozen) { return; }
+ else if(toucher.vehicle_flags & VHF_ISVEHICLE)
{
if(autocvar_g_ctf_allow_vehicle_touch)
toucher = toucher.owner; // the player is actually the vehicle owner, not other
n = 0;
FOR_EACH_PLAYER(other) if(self != other)
{
- if(!other.frozen)
+ if(other.frozen == 0)
{
- if(other.team == self.team)
+ if(!IsDifferentTeam(other, self))
{
if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
{
self.tur_head.avelocity = self.avelocity;
self.tur_head.angles = self.idle_aim;
self.health = self.tur_health;
- self.max_health = self.tur_health;
self.enemy = world;
self.volly_counter = self.shot_volly;
if not (self.health)
self.health = 1000;
self.tur_health = max(1, self.health);
- self.max_health = self.tur_health;
self.bot_attack = TRUE;
self.monster_attack = TRUE;
if (self.enemy.ammo >= self.enemy.ammo_max)
return 0;
- if(teamplay && IsDifferentTeam(self, self.enemy))
+ if(IsDifferentTeam(self, self.enemy))
return 0;
if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY)
m_speed = vlen(self.velocity);
// Enemy dead? just keep on the current heading then.
- if (self.enemy == world || self.enemy.deadflag != DEAD_NO || self.enemy.classname == "td_generator")
+ if (self.enemy == world || self.enemy.deadflag != DEAD_NO)
self.enemy = world;
if (self.enemy)
+++ /dev/null
-barricade
-{
- cull none
- {
- map textures/barricade.tga
- }
-}
-
tuba
turrets
weapons
-barricade
monsters
ok_nade_counter