X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fctf.qc;h=6f7198c2a9f225e803fe7f63d5faa557063262a6;hb=d7931068ce37d3f05c0f4e4f052ff8e43ac9f0e4;hp=7b78958451dc79f6ae5d5ae80eac1d16343b858c;hpb=b5a593d8425521092f05949c4143d86a25d49f4c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/ctf.qc b/qcsrc/server/ctf.qc index 7b7895845..6f7198c2a 100644 --- a/qcsrc/server/ctf.qc +++ b/qcsrc/server/ctf.qc @@ -193,7 +193,7 @@ void place_flag() } InitializeEntity(self, ctf_flag_spawnstuff, INITPRIO_SETLOCATION); -}; +} void LogCTF(string mode, float flagteam, entity actor) { @@ -232,7 +232,7 @@ void RegenFlag(entity e) e.cnt = FLAG_BASE; e.owner = world; e.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND and any other junk -}; +} void ReturnFlag(entity e) { @@ -253,11 +253,11 @@ void ReturnFlag(entity e) } e.owner = world; RegenFlag(e); -}; +} void DropFlag(entity e, entity penalty_receiver, entity attacker) { - local entity p; + entity p; if(e.classname != "item_flag_team") { @@ -329,11 +329,11 @@ void DropFlag(entity e, entity penalty_receiver, entity attacker) tracebox(e.origin, e.mins, e.maxs, e.origin, TRUE, e); if(trace_startsolid) dprint("FLAG FALLTHROUGH will happen SOON\n"); -}; +} void FlagThink() { - local entity e; + entity e; self.nextthink = time + 0.1; @@ -402,7 +402,7 @@ void FlagThink() DropFlag(self, world, world); return; } -}; +} float ctf_usekey() { @@ -417,15 +417,15 @@ float ctf_usekey() void flag_cap_ring_spawn(vector org) { shockwave_spawn("models/ctf/shockwavetransring.md3", org - '0 0 15', -0.8, 0, 1); -}; +} void FlagTouch() { if(gameover) return; - local float t; - local entity player; - local string s, s0, h0, h1; + float t; + entity player; + string s, s0, h0, h1; if (other.classname != "player") return; if (other.health < 1) // ignore dead players @@ -635,7 +635,7 @@ void FlagTouch() WaypointSprite_AttachCarrier("flagcarrier", other, RADARICON_FLAGCARRIER, '1 1 0'); } } -}; +} /*QUAKED spawnfunc_info_player_team1 (1 0 0) (-16 -16 -24) (16 16 24) CTF Starting point for a player @@ -654,8 +654,8 @@ void spawnfunc_info_player_team1() } self.team = COLOR_TEAM1; // red spawnfunc_info_player_deathmatch(); -}; -//self.team = 4;self.classname = "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 @@ -674,8 +674,8 @@ void spawnfunc_info_player_team2() } self.team = COLOR_TEAM2; // blue spawnfunc_info_player_deathmatch(); -}; -//self.team = 13;self.classname = "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 @@ -694,7 +694,7 @@ void spawnfunc_info_player_team3() } self.team = COLOR_TEAM3; // yellow spawnfunc_info_player_deathmatch(); -}; +} /*QUAKED spawnfunc_info_player_team4 (1 0 0) (-16 -16 -24) (16 16 24) @@ -714,7 +714,7 @@ void spawnfunc_info_player_team4() } self.team = COLOR_TEAM4; // purple spawnfunc_info_player_deathmatch(); -}; +} void item_flag_reset() { @@ -741,7 +741,7 @@ void item_flag_postspawn() self.glow_size = 25; self.glow_trail = 1; } -}; +} /*QUAKED spawnfunc_item_flag_team1 (0 0.5 0.8) (-48 -48 -37) (48 48 37) CTF flag for team one (Red). @@ -841,7 +841,7 @@ void spawnfunc_item_flag_team1() precache_model("models/ctf/shockwavetransring.md3"); self.reset = item_flag_reset; -}; +} /*QUAKED spawnfunc_item_flag_team2 (0 0.5 0.8) (-48 -48 -24) (48 48 64) CTF flag for team two (Blue). @@ -940,7 +940,7 @@ void spawnfunc_item_flag_team2() precache_model("models/ctf/shockwavetransring.md3"); self.reset = item_flag_reset; -}; +} /*QUAKED spawnfunc_ctf_team (0 .5 .8) (-16 -16 -24) (16 16 32) @@ -967,12 +967,12 @@ void spawnfunc_ctf_team() } self.classname = "ctf_team"; self.team = self.cnt + 1; -}; +} // code from here on is just to support maps that don't have control point and team entities void ctf_spawnteam (string teamname, float teamcolor) { - local entity oldself; + entity oldself; oldself = self; self = spawn(); self.classname = "ctf_team"; @@ -982,7 +982,7 @@ void ctf_spawnteam (string teamname, float teamcolor) spawnfunc_ctf_team(); self = oldself; -}; +} // spawn some default teams if the map is not set up for ctf void ctf_spawnteams() @@ -993,7 +993,7 @@ void ctf_spawnteams() ctf_spawnteam("Red", COLOR_TEAM1 - 1); ctf_spawnteam("Blue", COLOR_TEAM2 - 1); -}; +} void ctf_delayedinit() { @@ -1002,7 +1002,7 @@ void ctf_delayedinit() ctf_spawnteams(); ScoreRules_ctf(); -}; +} void ctf_init() { @@ -1017,7 +1017,7 @@ void ctf_init() //#NO AUTOCVARS START g_ctf_win_mode = cvar("g_ctf_win_mode"); //#NO AUTOCVARS END -}; +} void ctf_setstatus2(entity flag, float shift) { @@ -1032,7 +1032,7 @@ void ctf_setstatus2(entity flag, float shift) { // no status bits } -}; +} void ctf_setstatus() { @@ -1042,7 +1042,7 @@ void ctf_setstatus() self.items &~= IT_BLUE_FLAG_LOST; self.items &~= IT_CTF_SHIELDED; - local entity flag; + entity flag; float redflags, blueflags; if(self.ctf_captureshielded) @@ -1078,9 +1078,9 @@ void ctf_setstatus() ctf_setstatus2(flag, IT_BLUE_FLAG_TAKEN); } } -}; +} /* -entity(float cteam) ctf_team_has_commander = +entity ctf_team_has_commander(float cteam) { entity pl; if(cteam != COLOR_TEAM1 || cteam != COLOR_TEAM2) @@ -1092,15 +1092,15 @@ entity(float cteam) ctf_team_has_commander = } } return world; -}; +} -void(entity e, float st) ctf_setstate = +void ctf_setstate(entity e, float st) { e.ctf_state = st; ++e.version; -}; +} -void(float cteam) ctf_new_commander = +void ctf_new_commander(float cteam) { entity pl, plmax; @@ -1123,9 +1123,9 @@ void(float cteam) ctf_new_commander = ctf_setstate(plmax, 3); sprint(plmax, "^3You're the commander now!\n"); centerprint(plmax, "^3You're the commander now!\n"); -}; +} -void() ctf_clientconnect = +void ctf_clientconnect() { self.iscommander = FALSE; @@ -1139,9 +1139,9 @@ void() ctf_clientconnect = if(self.team != 0 && self.classname == "player" && !ctf_team_has_commander(self.team)) { ctf_new_commander(self.team); } -}; +} -void() ctf_playerchanged = +void ctf_playerchanged() { if(!self.team || self.classname != "player") { ctf_setstate(self, -1); @@ -1164,18 +1164,18 @@ void() ctf_playerchanged = self.team_saved = self.team; ctf_new_commander(self.team); -}; +} -void() ctf_clientdisconnect = +void ctf_clientdisconnect() { if(self.iscommander) { ctf_new_commander(self.team); } -}; +} entity GetPlayer(string); -float() ctf_clientcommand = +float ctf_clientcommand() { entity e; if(argv(0) == "order") { @@ -1216,5 +1216,5 @@ float() ctf_clientcommand = return TRUE; } return FALSE; -}; +} */