From 68fe2e6f6def6124e4bd1cb6b17cd38669a399d3 Mon Sep 17 00:00:00 2001 From: div0 Date: Tue, 3 Jun 2008 05:43:04 +0000 Subject: [PATCH] oops... huge bugs in the spawnfunc patch... it also changed them in strings, probably broke some classnames. MAny parts still worked fine, though. git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3683 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/arena.qc | 10 ++++---- data/qcsrc/server/assault.qc | 36 ++++++++++++++-------------- data/qcsrc/server/bots.qc | 30 +++++++++++------------ data/qcsrc/server/cl_client.qc | 6 ++--- data/qcsrc/server/cl_impulse.qc | 6 ++--- data/qcsrc/server/cl_physics.qc | 2 +- data/qcsrc/server/ctf.qc | 10 ++++---- data/qcsrc/server/domination.qc | 30 +++++++++++------------ data/qcsrc/server/g_world.qc | 12 +++++----- data/qcsrc/server/havocbot_roles.qc | 4 ++-- data/qcsrc/server/miscfunctions.qc | 6 ++--- data/qcsrc/server/mode_onslaught.qc | 20 ++++++++-------- data/qcsrc/server/runematch.qc | 16 ++++++------- data/qcsrc/server/t_items.qc | 2 +- data/qcsrc/server/t_jumppads.qc | 2 +- data/qcsrc/server/t_plats.qc | 4 ++-- data/qcsrc/server/teamplay.qc | 6 ++--- data/qcsrc/server/waypointsprites.qc | 2 +- 18 files changed, 102 insertions(+), 102 deletions(-) diff --git a/data/qcsrc/server/arena.qc b/data/qcsrc/server/arena.qc index 96a04d7c7..1832d4478 100644 --- a/data/qcsrc/server/arena.qc +++ b/data/qcsrc/server/arena.qc @@ -56,7 +56,7 @@ void reset_map() else if(self.classname == "rune") { if(self.owner) - if(self.owner.classname != "spawnfunc_runematch_spawn_point") + if(self.owner.classname != "runematch_spawn_point") DropAllRunes(self.owner); rune_respawn(); } @@ -65,7 +65,7 @@ void reset_map() if(self.health | g_keyhunt) WaypointSprite_Kill(self); } - else if(self.classname == "spawnfunc_dom_controlpoint") + else if(self.classname == "dom_controlpoint") { dom_controlpoint_setup(); } @@ -87,17 +87,17 @@ void reset_map() removedecor(self); } // TODO properly reset Onslaught - else if(self.classname == "spawnfunc_onslaught_generator") + else if(self.classname == "onslaught_generator") { onslaught_generator_reset(); } - else if(self.classname == "spawnfunc_onslaught_controlpoint") + else if(self.classname == "onslaught_controlpoint") { onslaught_controlpoint_reset(); } // TODO properly reset Assault // General teambased game modes - else if(self.classname == "spawnfunc_info_player_deathmatch") + else if(self.classname == "info_player_deathmatch") { self.team = self.team_saved; } diff --git a/data/qcsrc/server/assault.qc b/data/qcsrc/server/assault.qc index e429f8b85..87072b526 100644 --- a/data/qcsrc/server/assault.qc +++ b/data/qcsrc/server/assault.qc @@ -67,7 +67,7 @@ it'll trigger the next targeted entity (usually the next objective or spawnfunc_ -------- KEYS -------- targetname : point to e.g. next objective*/ void spawnfunc_target_objective() { - self.classname = "spawnfunc_target_objective"; + self.classname = "target_objective"; self.think = assault_objective_think; self.use = assault_objective_use; assault_objective_reset(); @@ -99,7 +99,7 @@ void assault_objective_decrease_think() { found = 0; objective = find(world, targetname, self.target); while(objective && found == 0) { - if(objective.classname == "spawnfunc_target_objective") { + if(objective.classname == "target_objective") { found = 1; if(objective.health < ASSAULT_VALUE_INACTIVE) { // targeted objective is active if(self.cnt == 1 && self.max_health >= ASSAULT_VALUE_INACTIVE) { @@ -117,7 +117,7 @@ void assault_objective_decrease_think() { local entity ent; ent = find(world, target, self.targetname); if(ent) { - if(ent.classname == "spawnfunc_func_assault_destructible") + if(ent.classname == "func_assault_destructible") self.spawnflags = 2; else self.spawnflags = 1; @@ -236,7 +236,7 @@ void spawnfunc_func_assault_destructible() { self.cnt = 0; // not yet activated - self.classname = "spawnfunc_func_assault_destructible"; + self.classname = "func_assault_destructible"; self.mdl = self.model; setmodel(self, self.mdl); @@ -252,7 +252,7 @@ void assault_wall_think() { notvisible = 0; ent = find(world, targetname, self.target); while(ent) { - if(ent.classname == "spawnfunc_target_objective" && ent.health < 0) + if(ent.classname == "target_objective" && ent.health < 0) notvisible = 1; ent = find(ent, targetname, self.target); } @@ -269,7 +269,7 @@ void assault_wall_think() { } void spawnfunc_func_assault_wall() { - self.classname = "spawnfunc_func_assault_wall"; + self.classname = "func_assault_wall"; self.mdl = self.model; setmodel(self, self.mdl); self.solid = SOLID_BSP; @@ -293,7 +293,7 @@ void spawnfunc_target_assault_roundend() { cvar_set("timelimit", ftos(self.health/60)); self.winning = 0; // round not yet won by attackers - self.classname = "spawnfunc_target_assault_roundend"; + self.classname = "target_assault_roundend"; self.use = target_assault_roundend_use; self.cnt = 0; // first round } @@ -305,7 +305,7 @@ void assault_roundstart_use() { void spawnfunc_target_assault_roundstart() { assault_attacker_team = COLOR_TEAM1; - self.classname = "spawnfunc_target_assault_roundstart"; + self.classname = "target_assault_roundstart"; self.use = assault_roundstart_use; self.think = assault_roundstart_use; self.nextthink = time + 0.1; @@ -340,7 +340,7 @@ void assault_new_round() { assault_attacker_team = COLOR_TEAM1; } - ent = find(world, classname, "spawnfunc_info_player_deathmatch"); + ent = find(world, classname, "info_player_deathmatch"); while (ent) { oldself = self; @@ -352,11 +352,11 @@ void assault_new_round() { } self = oldself; - ent = find(ent, classname, "spawnfunc_info_player_deathmatch"); + ent = find(ent, classname, "info_player_deathmatch"); } // reset all objectives - ent = find(world, classname, "spawnfunc_target_objective"); + ent = find(world, classname, "target_objective"); while (ent) { oldself = self; @@ -364,11 +364,11 @@ void assault_new_round() { assault_objective_reset(); self = oldself; - ent = find(ent, classname, "spawnfunc_target_objective"); + ent = find(ent, classname, "target_objective"); } // reset round end triggers - ent = find(world, classname, "spawnfunc_target_assault_roundend"); + ent = find(world, classname, "target_assault_roundend"); while (ent) { oldself = self; @@ -376,7 +376,7 @@ void assault_new_round() { target_assault_roundend_reset(); self = oldself; - ent = find(ent, classname, "spawnfunc_target_assault_roundend"); + ent = find(ent, classname, "target_assault_roundend"); } // reset all target_object_decrease @@ -388,24 +388,24 @@ void assault_new_round() { } // reset all spawnfunc_func_assault_destructible - ent = find(world, classname, "spawnfunc_func_assault_destructible"); + ent = find(world, classname, "func_assault_destructible"); while (ent) { oldself = self; self = ent; assault_destructible_reset(); self = oldself; - ent = find(ent, classname, "spawnfunc_func_assault_destructible"); + ent = find(ent, classname, "func_assault_destructible"); } - ent = find(world, classname, "spawnfunc_target_assault_roundstart"); + ent = find(world, classname, "target_assault_roundstart"); while (ent) { oldself = self; self = ent; self.use(); self = oldself; - ent = find(ent, classname, "spawnfunc_target_assault_roundstart"); + ent = find(ent, classname, "target_assault_roundstart"); } // actually restart round... how to do that? diff --git a/data/qcsrc/server/bots.qc b/data/qcsrc/server/bots.qc index dd04a41f0..2d9e101d3 100644 --- a/data/qcsrc/server/bots.qc +++ b/data/qcsrc/server/bots.qc @@ -468,7 +468,7 @@ void() waypoint_think = //dprint("waypoint_think wpisbox = ", ftos(self.wpisbox), "\n"); sm1 = self.origin + self.mins; sm2 = self.origin + self.maxs; - e = find(world, classname, "spawnfunc_waypoint"); + e = find(world, classname, "waypoint"); stepheightvec = cvar("sv_stepheight") * '0 0 1'; while (e) { @@ -522,7 +522,7 @@ void() waypoint_think = waypoint_addlink(e, self); } } - e = find(e, classname, "spawnfunc_waypoint"); + e = find(e, classname, "waypoint"); } navigation_testtracewalk = 0; }; @@ -578,16 +578,16 @@ entity(vector m1, vector m2, float f) waypoint_spawn = { local entity w; local vector org; - w = find(world, classname, "spawnfunc_waypoint"); + w = find(world, classname, "waypoint"); while (w) { // if a matching spawnfunc_waypoint already exists, don't add a duplicate if (boxesoverlap(m1, m2, w.absmin, w.absmax)) return w; - w = find(w, classname, "spawnfunc_waypoint"); + w = find(w, classname, "waypoint"); } w = spawn(); - w.classname = "spawnfunc_waypoint"; + w.classname = "waypoint"; w.wpflags = f; setorigin(w, (m1 + m2) * 0.5); setsize(w, m1 - w.origin, m2 - w.origin); @@ -717,7 +717,7 @@ void(entity e) waypoint_remove = void() waypoint_removeall = { local entity head, next; - head = findchain(classname, "spawnfunc_waypoint"); + head = findchain(classname, "waypoint"); while (head) { next = head.chain; @@ -731,7 +731,7 @@ void() waypoint_removeall = void() waypoint_schedulerelinkall = { local entity head; - head = findchain(classname, "spawnfunc_waypoint"); + head = findchain(classname, "waypoint"); while (head) { waypoint_schedulerelink(head); @@ -752,7 +752,7 @@ void() waypoint_saveall = if (file >= 0) { c = 0; - w = findchain(classname, "spawnfunc_waypoint"); + w = findchain(classname, "waypoint"); while (w) { if (!(w.wpflags & WAYPOINTFLAG_GENERATED)) @@ -776,7 +776,7 @@ void() waypoint_saveall = } else { - bprint("spawnfunc_waypoint save to "); + bprint("waypoint save to "); bprint(filename); bprint(" failed\n"); } @@ -826,7 +826,7 @@ float() waypoint_loadall = } else { - dprint("spawnfunc_waypoint load from "); + dprint("waypoint load from "); dprint(filename); dprint(" failed\n"); } @@ -845,7 +845,7 @@ void(entity e) waypoint_spawnforitem = org_z = e.origin_z + e.mins_z - PL_MIN_z + 1; e.nearestwaypointtimeout = time + 1000000000; // don't spawn an item spawnfunc_waypoint if it already exists - w = findchain(classname, "spawnfunc_waypoint"); + w = findchain(classname, "waypoint"); while (w) { if (w.wpisbox) @@ -1014,7 +1014,7 @@ entity(entity player, float walkfromwp) navigation_findnearestwaypoint = local vector v, org, pm1, pm2; pm1 = player.origin + PL_MIN; pm2 = player.origin + PL_MAX; - waylist = findchain(classname, "spawnfunc_waypoint"); + waylist = findchain(classname, "waypoint"); // do two scans, because box test is cheaper w = waylist; while (w) @@ -1155,7 +1155,7 @@ void() navigation_markroutes = local entity w, wp, waylist; local float searching, cost, cost2; local vector p; - w = waylist = findchain(classname, "spawnfunc_waypoint"); + w = waylist = findchain(classname, "waypoint"); while (w) { w.wpconsidered = FALSE; @@ -2069,7 +2069,7 @@ void(float maxupdate) botframe_updatedangerousobjects = local float c, d, danger; c = 0; bot_dodgelist = findchainfloat(bot_dodge, TRUE); - botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "spawnfunc_waypoint"); + botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "waypoint"); while (botframe_dangerwaypoint != world) { danger = 0; @@ -2095,7 +2095,7 @@ void(float maxupdate) botframe_updatedangerousobjects = c = c + 1; if (c >= maxupdate) break; - botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "spawnfunc_waypoint"); + botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "waypoint"); } }; diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 3890744b2..6445fac0a 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -13,7 +13,7 @@ void spawnfunc_info_player_start (void) void spawnfunc_info_player_deathmatch (void) { - self.classname = "spawnfunc_info_player_deathmatch"; + self.classname = "info_player_deathmatch"; relocate_spawnpoint(); } @@ -51,7 +51,7 @@ entity Spawn_FilterOutBadSpots(entity firstspot, entity playerlist, float mindis local entity ent; ent = find(world, targetname, spot.target); while(ent) { - if(ent.classname == "spawnfunc_target_objective") + if(ent.classname == "target_objective") if(ent.health < 0 || ent.health >= ASSAULT_VALUE_INACTIVE) spotactive = 0; ent = find(ent, targetname, spot.target); @@ -164,7 +164,7 @@ entity SelectSpawnPoint (float anypoint) // get the list of players playerlist = findchain(classname, "player"); // get the entire list of spots - firstspot = findchain(classname, "spawnfunc_info_player_deathmatch"); + firstspot = findchain(classname, "info_player_deathmatch"); // filter out the bad ones // (note this returns the original list if none survived) firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 100, teamcheck); diff --git a/data/qcsrc/server/cl_impulse.qc b/data/qcsrc/server/cl_impulse.qc index fcaee5176..45331baaa 100644 --- a/data/qcsrc/server/cl_impulse.qc +++ b/data/qcsrc/server/cl_impulse.qc @@ -96,21 +96,21 @@ void ImpulseCommands (void) { if(imp == 30) { - WaypointSprite_DeployPersonal("spawnfunc_waypoint", self.origin); + WaypointSprite_DeployPersonal("waypoint", self.origin); self.personal_v_angle = self.v_angle; self.personal_velocity = self.velocity; sprint(self, "personal spawnfunc_waypoint spawned at location\n"); } else if(imp == 31) { - WaypointSprite_DeployPersonal("spawnfunc_waypoint", self.cursor_trace_endpos); + WaypointSprite_DeployPersonal("waypoint", self.cursor_trace_endpos); self.personal_v_angle = self.v_angle; self.personal_velocity = '0 0 0'; sprint(self, "personal spawnfunc_waypoint spawned at crosshair\n"); } else if(imp == 32 && vlen(self.death_origin)) { - WaypointSprite_DeployPersonal("spawnfunc_waypoint", self.death_origin); + WaypointSprite_DeployPersonal("waypoint", self.death_origin); self.personal_v_angle = self.v_angle; self.personal_velocity = '0 0 0'; sprint(self, "personal spawnfunc_waypoint spawned at death location\n"); diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 67f89a000..27b76bac0 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -296,7 +296,7 @@ void SV_PlayerPhysics() self.velocity_z = self.velocity_z + self.gravity * sv_gravity * frametime; else self.velocity_z = self.velocity_z + sv_gravity * frametime; - if (self.ladder_entity.classname == "spawnfunc_func_water") + if (self.ladder_entity.classname == "func_water") { f = vlen(wishvel); if (f > self.ladder_entity.speed) diff --git a/data/qcsrc/server/ctf.qc b/data/qcsrc/server/ctf.qc index 299501dd6..bcec10565 100644 --- a/data/qcsrc/server/ctf.qc +++ b/data/qcsrc/server/ctf.qc @@ -383,7 +383,7 @@ void() spawnfunc_info_player_team1 = self.team = COLOR_TEAM1; // red spawnfunc_info_player_deathmatch(); }; -//self.team = 4;self.classname = "spawnfunc_info_player_start";spawnfunc_info_player_start();}; +//self.team = 4;self.classname = "info_player_start";spawnfunc_info_player_start();}; /*QUAKED spawnfunc_info_player_team2 (1 0 0) (-16 -16 -24) (16 16 24) CTF Starting point for a player in @@ -398,7 +398,7 @@ void() spawnfunc_info_player_team2 = self.team = COLOR_TEAM2; // blue spawnfunc_info_player_deathmatch(); }; -//self.team = 13;self.classname = "spawnfunc_info_player_start";spawnfunc_info_player_start();}; +//self.team = 13;self.classname = "info_player_start";spawnfunc_info_player_start();}; /*QUAKED spawnfunc_info_player_team3 (1 0 0) (-16 -16 -24) (16 16 24) CTF Starting point for a player in @@ -620,7 +620,7 @@ void() spawnfunc_ctf_team = remove(self); return; } - self.classname = "spawnfunc_ctf_team"; + self.classname = "ctf_team"; self.team = self.cnt + 1; }; @@ -630,7 +630,7 @@ void ctf_spawnteam (string teamname, float teamcolor) local entity oldself; oldself = self; self = spawn(); - self.classname = "spawnfunc_ctf_team"; + self.classname = "ctf_team"; self.netname = teamname; self.cnt = teamcolor; @@ -655,7 +655,7 @@ void() ctf_delayedinit = self.think = SUB_Remove; self.nextthink = time; // if no teams are found, spawn defaults - if (find(world, classname, "spawnfunc_ctf_team") == world) + if (find(world, classname, "ctf_team") == world) ctf_spawnteams(); }; diff --git a/data/qcsrc/server/domination.qc b/data/qcsrc/server/domination.qc index 3a647b1f3..a21c4a6b3 100644 --- a/data/qcsrc/server/domination.qc +++ b/data/qcsrc/server/domination.qc @@ -166,9 +166,9 @@ void() dompointtouch = return; // only valid teams can claim it - head = find(world, classname, "spawnfunc_dom_team"); + head = find(world, classname, "dom_team"); while (head && head.team != other.team) - head = find(head, classname, "spawnfunc_dom_team"); + head = find(head, classname, "dom_team"); if (!head || head.netname == "" || head == self.goalentity) return; @@ -186,9 +186,9 @@ void() dompointtouch = //self.think = dompoint_captured; // go to neutral team in the mean time - head = find(world, classname, "spawnfunc_dom_team"); + head = find(world, classname, "dom_team"); while (head && head.netname != "") - head = find(head, classname, "spawnfunc_dom_team"); + head = find(head, classname, "dom_team"); if(head == world) return; @@ -239,7 +239,7 @@ void() spawnfunc_dom_team = precache_sound(self.noise); if (self.noise1 != "") precache_sound(self.noise1); - self.classname = "spawnfunc_dom_team"; + self.classname = "dom_team"; setmodel(self, self.model); // precision not needed self.mdl = self.model; self.dmg = self.modelindex; @@ -253,9 +253,9 @@ void() dom_controlpoint_setup = { local entity head; // find the spawnfunc_dom_team representing unclaimed points - head = find(world, classname, "spawnfunc_dom_team"); + head = find(world, classname, "dom_team"); while(head && head.netname != "") - head = find(head, classname, "spawnfunc_dom_team"); + head = find(head, classname, "dom_team"); if (!head) objerror("no spawnfunc_dom_team with netname \"\" found\n"); @@ -308,7 +308,7 @@ void() dom_controlpoint_setup = totalteams = 0; // first find out what teams are allowed - head = find(world, classname, "spawnfunc_dom_team"); + head = find(world, classname, "dom_team"); while(head) { if(head.netname != "") @@ -332,7 +332,7 @@ void() dom_controlpoint_setup = c4 = 0; } } - head = find(head, classname, "spawnfunc_dom_team"); + head = find(head, classname, "dom_team"); } // make sure there are at least 2 teams to join @@ -510,7 +510,7 @@ void dom_spawnteam (string teamname, float teamcolor, string pointmodel, float p local entity oldself; oldself = self; self = spawn(); - self.classname = "spawnfunc_dom_team"; + self.classname = "dom_team"; self.netname = teamname; self.cnt = teamcolor; self.model = pointmodel; @@ -537,7 +537,7 @@ void(vector org) dom_spawnpoint = local entity oldself; oldself = self; self = spawn(); - self.classname = "spawnfunc_dom_controlpoint"; + self.classname = "dom_controlpoint"; self.think = spawnfunc_dom_controlpoint; self.nextthink = time; self.origin = org; @@ -568,10 +568,10 @@ void() dom_delayedinit = self.think = SUB_Remove; self.nextthink = time; // if no teams are found, spawn defaults - if (find(world, classname, "spawnfunc_dom_team") == world) + if (find(world, classname, "dom_team") == world) dom_spawnteams(); // if no control points are found, spawn defaults - if (find(world, classname, "spawnfunc_dom_controlpoint") == world) + if (find(world, classname, "dom_controlpoint") == world) { // here follow default domination points for each map /* @@ -583,11 +583,11 @@ void() dom_delayedinit = */ { // if no supported map was found, make every deathmatch spawn a point - head = find(world, classname, "spawnfunc_info_player_deathmatch"); + head = find(world, classname, "info_player_deathmatch"); while (head) { dom_spawnpoint(head.origin); - head = find(head, classname, "spawnfunc_info_player_deathmatch"); + head = find(head, classname, "info_player_deathmatch"); } } } diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index a2e415e75..57a9f4caa 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -891,7 +891,7 @@ entity() FindIntermission = } // then look for the start position - spot = find (world, classname, "spawnfunc_info_player_start"); + spot = find (world, classname, "info_player_start"); if (spot) return spot; @@ -901,7 +901,7 @@ entity() FindIntermission = return spot; // then look for the start position - spot = find (world, classname, "spawnfunc_info_player_deathmatch"); + spot = find (world, classname, "info_player_deathmatch"); if (spot) return spot; @@ -1185,7 +1185,7 @@ float() WinningCondition_Onslaught = local float t1, t2, t3, t4; // first check if the game has ended t1 = t2 = t3 = t4 = 0; - head = find(world, classname, "spawnfunc_onslaught_generator"); + head = find(world, classname, "onslaught_generator"); while (head) { if (head.health > 0) @@ -1195,7 +1195,7 @@ float() WinningCondition_Onslaught = if (head.team == COLOR_TEAM3) t3 = 1; if (head.team == COLOR_TEAM4) t4 = 1; } - head = find(head, classname, "spawnfunc_onslaught_generator"); + head = find(head, classname, "onslaught_generator"); } if (t1 + t2 + t3 + t4 < 2) { @@ -1250,7 +1250,7 @@ float() WinningCondition_Assault = } local entity ent; - ent = find(world, classname, "spawnfunc_target_assault_roundend"); + ent = find(world, classname, "target_assault_roundend"); if(ent) { if(ent.winning) // round end has been triggered by attacking team @@ -1657,7 +1657,7 @@ float WinningCondition_RanOutOfSpawns() team4_score = 1; } - for(head = world; (head = find(head, classname, "spawnfunc_info_player_deathmatch")) != world; ) + for(head = world; (head = find(head, classname, "info_player_deathmatch")) != world; ) { if(head.team == COLOR_TEAM1) team1_score = 1; diff --git a/data/qcsrc/server/havocbot_roles.qc b/data/qcsrc/server/havocbot_roles.qc index 0feac6ead..af3ae76b2 100644 --- a/data/qcsrc/server/havocbot_roles.qc +++ b/data/qcsrc/server/havocbot_roles.qc @@ -36,7 +36,7 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_items = void(float ratingscale, vector org, float sradius) havocbot_goalrating_controlpoints = { local entity head; - head = findchain(classname, "spawnfunc_dom_controlpoint"); + head = findchain(classname, "dom_controlpoint"); while (head) { if (vlen(head.origin - org) < sradius) @@ -59,7 +59,7 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_controlpo void(float ratingscale, vector org, float sradius) havocbot_goalrating_waypoints = { local entity head; - head = findchain(classname, "spawnfunc_waypoint"); + head = findchain(classname, "waypoint"); while (head) { if (vlen(head.origin - org) < sradius && vlen(head.origin - org) > 100) diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index 2ba2b6b59..308427320 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -303,14 +303,14 @@ entity(vector point, .string field, string value, vector axismod) findnearest = void() spawnfunc_target_location = { - self.classname = "spawnfunc_target_location"; + self.classname = "target_location"; // location name in netname // eventually support: count, teamgame selectors, line of sight? }; void() spawnfunc_info_location = { - self.classname = "spawnfunc_target_location"; + self.classname = "target_location"; self.message = self.netname; }; @@ -319,7 +319,7 @@ string NearestLocation(vector p) entity loc; string ret; ret = "somewhere"; - loc = findnearest(p, classname, "spawnfunc_target_location", '1 1 1'); + loc = findnearest(p, classname, "target_location", '1 1 1'); if(loc) { ret = loc.message; diff --git a/data/qcsrc/server/mode_onslaught.qc b/data/qcsrc/server/mode_onslaught.qc index 72b564cc3..c579e0429 100644 --- a/data/qcsrc/server/mode_onslaught.qc +++ b/data/qcsrc/server/mode_onslaught.qc @@ -20,9 +20,9 @@ void() onslaught_updatelinks = local float stop, t1, t2, t3, t4; // first check if the game has ended dprint("--- updatelinks ---\n"); - links = findchain(classname, "spawnfunc_onslaught_link"); + links = findchain(classname, "onslaught_link"); // mark generators as being shielded and networked - l = findchain(classname, "spawnfunc_onslaught_generator"); + l = findchain(classname, "onslaught_generator"); while (l) { if (l.iscaptured) @@ -34,7 +34,7 @@ void() onslaught_updatelinks = l = l.chain; } // mark points as shielded and not networked - l = findchain(classname, "spawnfunc_onslaught_controlpoint"); + l = findchain(classname, "onslaught_controlpoint"); while (l) { l.islinked = FALSE; @@ -93,7 +93,7 @@ void() onslaught_updatelinks = { dprint(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)\n"); l.enemy.isshielded = FALSE; - if(l.goalentity.classname == "spawnfunc_onslaught_generator") + if(l.goalentity.classname == "onslaught_generator") { if(l.goalentity.team == COLOR_TEAM1) l.enemy.isgenneighbor_red = TRUE; @@ -112,7 +112,7 @@ void() onslaught_updatelinks = { dprint(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)\n"); l.goalentity.isshielded = FALSE; - if(l.enemy.classname == "spawnfunc_onslaught_generator") + if(l.enemy.classname == "onslaught_generator") { if(l.enemy.team == COLOR_TEAM1) l.goalentity.isgenneighbor_red = TRUE; @@ -131,7 +131,7 @@ void() onslaught_updatelinks = l = l.chain; } // now update the takedamage and alpha variables on generator shields - l = findchain(classname, "spawnfunc_onslaught_generator"); + l = findchain(classname, "onslaught_generator"); while (l) { if (l.isshielded) @@ -151,7 +151,7 @@ void() onslaught_updatelinks = l = l.chain; } // now update the takedamage and alpha variables on control point icons - l = findchain(classname, "spawnfunc_onslaught_controlpoint"); + l = findchain(classname, "onslaught_controlpoint"); while (l) { if (l.isshielded) @@ -178,7 +178,7 @@ void() onslaught_updatelinks = } // count generators owned by each team t1 = t2 = t3 = t4 = 0; - l = findchain(classname, "spawnfunc_onslaught_generator"); + l = findchain(classname, "onslaught_generator"); while (l) { if (l.iscaptured) @@ -219,7 +219,7 @@ float onslaught_controlpoint_can_be_linked(entity cp, float t) // check to see if this player has a legitimate claim to capture this // control point - more specifically that there is a captured path of // points leading back to the team generator - e = findchain(classname, "spawnfunc_onslaught_link"); + e = findchain(classname, "onslaught_link"); while (e) { if (e.goalentity == cp) @@ -321,7 +321,7 @@ void() onslaught_generator_think = // control points reduce the overtime duration. sound(self, CHAN_AUTO, "sound/onslaught/generator_decay.wav", 1, ATTN_NORM); d = 1; - e = findchain(classname, "spawnfunc_onslaught_controlpoint"); + e = findchain(classname, "onslaught_controlpoint"); while (e) { if (e.team != self.team) diff --git a/data/qcsrc/server/runematch.qc b/data/qcsrc/server/runematch.qc index 7ff798247..a94f62fed 100644 --- a/data/qcsrc/server/runematch.qc +++ b/data/qcsrc/server/runematch.qc @@ -102,7 +102,7 @@ float count_rune_spawnpoints() float num; entity e; num = 0; - e = findchain(classname, "spawnfunc_runematch_spawn_point"); + e = findchain(classname, "runematch_spawn_point"); while(e) { num = num + 1; @@ -118,9 +118,9 @@ entity rune_find_spawnpoint(float num, float r) e = world; do { - e = find(e, classname, "spawnfunc_runematch_spawn_point"); + e = find(e, classname, "runematch_spawn_point"); if(!e) - e = find(e, classname, "spawnfunc_runematch_spawn_point"); + e = find(e, classname, "runematch_spawn_point"); if(!e) break; @@ -187,7 +187,7 @@ void rune_touch() return; // "notouch" time isn't finished // detach from the spawn point you're on - if(self.owner.classname == "spawnfunc_runematch_spawn_point") + if(self.owner.classname == "runematch_spawn_point") { self.owner.owner = world; self.owner = world; @@ -230,7 +230,7 @@ void rune_respawn() num = count_rune_spawnpoints(); r = ceil(random()*num); - if(self.owner.classname == "spawnfunc_runematch_spawn_point") + if(self.owner.classname == "runematch_spawn_point") { self.owner.owner = world; self.owner = world; @@ -436,13 +436,13 @@ void DropAllRunes(entity pl) void spawn_default_runespawnpoints() { entity spot, e; - spot = find(world, classname, "spawnfunc_info_player_deathmatch"); + spot = find(world, classname, "info_player_deathmatch"); while(spot) { e = spawn(); - e.classname = "spawnfunc_runematch_spawn_point"; + e.classname = "runematch_spawn_point"; e.origin = spot.origin; - spot = find(spot, classname, "spawnfunc_info_player_deathmatch"); + spot = find(spot, classname, "info_player_deathmatch"); } } diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 4b18cb1f1..32b800a91 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -789,7 +789,7 @@ void spawnfunc_item_minst_cells (void) { } // compatibility: -void spawnfunc_item_quad (void) {self.classname = "spawnfunc_item_strength";spawnfunc_item_strength();} +void spawnfunc_item_quad (void) {self.classname = "item_strength";spawnfunc_item_strength();} void spawnfunc_misc_models (void) { diff --git a/data/qcsrc/server/t_jumppads.qc b/data/qcsrc/server/t_jumppads.qc index d76cfeddf..6495eda17 100644 --- a/data/qcsrc/server/t_jumppads.qc +++ b/data/qcsrc/server/t_jumppads.qc @@ -187,7 +187,7 @@ void() trigger_push_findtarget = self.enemy = find(world, targetname, self.target); if (!self.enemy) { - objerror("spawnfunc_trigger_push: target not found\n"); + objerror("trigger_push: target not found\n"); remove(self); return; } diff --git a/data/qcsrc/server/t_plats.qc b/data/qcsrc/server/t_plats.qc index 63c0d4331..51682060d 100644 --- a/data/qcsrc/server/t_plats.qc +++ b/data/qcsrc/server/t_plats.qc @@ -290,7 +290,7 @@ void() spawnfunc_func_train = if (!self.speed) self.speed = 100; if (!self.target) - objerror ("spawnfunc_func_train without a target"); + objerror ("func_train without a target"); if (self.sounds == 0) { @@ -364,7 +364,7 @@ target : targetname of first spawnfunc_path_corner (starts here) void() spawnfunc_func_train = { if (!self.target) - objerror("spawnfunc_func_train without a target"); + objerror("func_train without a target"); if (!self.speed) self.speed = 100; diff --git a/data/qcsrc/server/teamplay.qc b/data/qcsrc/server/teamplay.qc index bf27117cd..89377b6fc 100644 --- a/data/qcsrc/server/teamplay.qc +++ b/data/qcsrc/server/teamplay.qc @@ -569,7 +569,7 @@ void CheckAllowedTeams (entity for_whom) // onslaught is special if(g_onslaught) { - head = findchain(classname, "spawnfunc_onslaught_generator"); + head = findchain(classname, "onslaught_generator"); while (head) { if (head.team == COLOR_TEAM1) c1 = 0; @@ -582,9 +582,9 @@ void CheckAllowedTeams (entity for_whom) } if(g_domination) - teament_name = "spawnfunc_dom_team"; + teament_name = "dom_team"; else if(g_ctf) - teament_name = "spawnfunc_ctf_team"; + teament_name = "ctf_team"; else if(g_tdm) teament_name = "tdm_team"; else if(g_assault) diff --git a/data/qcsrc/server/waypointsprites.qc b/data/qcsrc/server/waypointsprites.qc index df4df3be5..5c5fe7eeb 100644 --- a/data/qcsrc/server/waypointsprites.qc +++ b/data/qcsrc/server/waypointsprites.qc @@ -248,7 +248,7 @@ entity WaypointSprite_Spawn( if(spr != "") setmodel(wp, strcat("models/sprites/", spr, ".sp2")); // precision set above else - wp.model = "spawnfunc_waypoint"; + wp.model = "waypoint"; setsize(wp, '0 0 0', '0 0 0'); wp.waypointsprite_for_player = waypointsprite_for_player_default; return wp; -- 2.39.2