r3132 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Jan 13 05:38:08 EST 2008
Author: div0
Date: 2008-01-13 05:38:00 -0500 (Sun, 13 Jan 2008)
New Revision: 3132
Modified:
trunk/data/qcsrc/server/ctf.qc
trunk/data/qcsrc/server/defs.qh
trunk/data/qcsrc/server/miscfunctions.qc
trunk/data/qcsrc/server/progs.src
trunk/data/qcsrc/server/t_items.qc
trunk/data/qcsrc/server/t_quake.qc
trunk/data/qcsrc/server/t_quake3.qc
Log:
Q3A map compatibility
Modified: trunk/data/qcsrc/server/ctf.qc
===================================================================
--- trunk/data/qcsrc/server/ctf.qc 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/ctf.qc 2008-01-13 10:38:00 UTC (rev 3132)
@@ -552,18 +552,6 @@
};
-// spawnfunctions for q3 flags
-void team_CTF_redflag()
-{
- item_flag_team1();
-}
-
-void team_CTF_blueflag()
-{
- item_flag_team2();
-}
-
-
/*QUAKED ctf_team (0 .5 .8) (-16 -16 -24) (16 16 32)
Team declaration for CTF gameplay, this allows you to decide what team
names and control point models are used in your map.
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/defs.qh 2008-01-13 10:38:00 UTC (rev 3132)
@@ -374,3 +374,8 @@
// speedrun: when 1, player auto teleports back when capture timeout happens
.float speedrunning;
+
+// Q3 support
+.float notteam;
+.float notsingle;
+.float notfree;
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2008-01-13 10:38:00 UTC (rev 3132)
@@ -665,14 +665,18 @@
float g_pickup_rockets_max;
float g_pickup_cells;
float g_pickup_cells_max;
-float g_pickup_armorshard;
-float g_pickup_armorshard_max;
-float g_pickup_armor;
-float g_pickup_armor_max;
-float g_pickup_healthshard;
-float g_pickup_healthshard_max;
-float g_pickup_health;
-float g_pickup_health_max;
+float g_pickup_armorsmall;
+float g_pickup_armorsmall_max;
+float g_pickup_armormedium;
+float g_pickup_armormedium_max;
+float g_pickup_armorlarge;
+float g_pickup_armorlarge_max;
+float g_pickup_healthsmall;
+float g_pickup_healthsmall_max;
+float g_pickup_healthmedium;
+float g_pickup_healthmedium_max;
+float g_pickup_healthlarge;
+float g_pickup_healthlarge_max;
float g_pickup_healthmega;
float g_pickup_healthmega_max;
@@ -709,14 +713,18 @@
g_pickup_rockets_max = cvar("g_pickup_rockets_max");
g_pickup_cells = cvar("g_pickup_cells");
g_pickup_cells_max = cvar("g_pickup_cells_max");
- g_pickup_armorshard = cvar("g_pickup_armorshard");
- g_pickup_armorshard_max = cvar("g_pickup_armorshard_max");
- g_pickup_armor = cvar("g_pickup_armor");
- g_pickup_armor_max = cvar("g_pickup_armor_max");
- g_pickup_healthshard = cvar("g_pickup_healthshard");
- g_pickup_healthshard_max = cvar("g_pickup_healthshard_max");
- g_pickup_health = cvar("g_pickup_health");
- g_pickup_health_max = cvar("g_pickup_health_max");
+ g_pickup_armorsmall = cvar("g_pickup_armorsmall");
+ g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max");
+ g_pickup_armormedium = cvar("g_pickup_armormedium");
+ g_pickup_armormedium_max = cvar("g_pickup_armormedium_max");
+ g_pickup_armorlarge = cvar("g_pickup_armorlarge");
+ g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max");
+ g_pickup_healthsmall = cvar("g_pickup_healthsmall");
+ g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max");
+ g_pickup_healthmedium = cvar("g_pickup_healthmedium");
+ g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max");
+ g_pickup_healthlarge = cvar("g_pickup_healthlarge");
+ g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max");
g_pickup_healthmega = cvar("g_pickup_healthmega");
g_pickup_healthmega_max = cvar("g_pickup_healthmega_max");
Modified: trunk/data/qcsrc/server/progs.src
===================================================================
--- trunk/data/qcsrc/server/progs.src 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/progs.src 2008-01-13 10:38:00 UTC (rev 3132)
@@ -66,9 +66,6 @@
w_rocketlauncher.qc
t_items.qc
-t_halflife.qc
-t_quake3.qc
-t_quake.qc
cl_weapons.qc
//g_tetris.qc
cl_impulse.qc
@@ -99,3 +96,10 @@
ipban.qc
../common/mapinfo.qc
+
+
+
+
+t_quake3.qc
+t_halflife.qc
+t_quake.qc
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/t_items.qc 2008-01-13 10:38:00 UTC (rev 3132)
@@ -284,6 +284,36 @@
if (self.classname != "droppedweapon")
{
+ if(teams_matter)
+ {
+ if(self.notteam)
+ {
+ print("removed non-teamplay ", self.classname, "\n");
+ startitem_failed = TRUE;
+ remove (self);
+ return;
+ }
+ }
+ else
+ {
+ if(self.notfree)
+ {
+ print("removed non-FFA ", self.classname, "\n");
+ startitem_failed = TRUE;
+ remove (self);
+ return;
+ }
+ }
+
+ if(self.targetname)
+ {
+ // target_give not yet supported; maybe later
+ print("removed targeted ", self.classname, "\n");
+ startitem_failed = TRUE;
+ remove (self);
+ return;
+ }
+
if(cvar("spawn_debug") >= 2)
{
entity otheritem;
@@ -602,39 +632,57 @@
StartItem ("models/items/a_shells.md3", "misc/itempickup.wav", 15, "shells", IT_SHELLS, 0, commodity_pickupevalfunc, 100);
}
-void item_armor1 (void) {
+void item_armor_small (void) {
if(!self.armorvalue)
- self.armorvalue = g_pickup_armorshard;
+ self.armorvalue = g_pickup_armorsmall;
if(!self.max_armorvalue)
- self.max_armorvalue = g_pickup_armorshard_max;
+ self.max_armorvalue = g_pickup_armorsmall_max;
StartItem ("models/items/g_a1.md3", "misc/armor1.wav", 15, "Armor Shard", IT_ARMOR_SHARD, 0, commodity_pickupevalfunc, 100);
}
-void item_armor25 (void) {
+void item_armor_medium (void) {
if(!self.armorvalue)
- self.armorvalue = g_pickup_armor;
+ self.armorvalue = g_pickup_armormedium;
if(!self.max_armorvalue)
- self.max_armorvalue = g_pickup_armor_max;
+ self.max_armorvalue = g_pickup_armormedium_max;
+ self.skin = 1; // "weaker" skin
StartItem ("models/items/g_a25.md3", "misc/armor25.wav", 30, "Armor", IT_ARMOR, 0, commodity_pickupevalfunc, 2000);
}
-void item_health1 (void) {
+void item_armor_large (void) {
+ if(!self.armorvalue)
+ self.armorvalue = g_pickup_armorlarge;
+ if(!self.max_armorvalue)
+ self.max_armorvalue = g_pickup_armorlarge_max;
+ StartItem ("models/items/g_a25.md3", "misc/armor25.wav", 30, "Armor", IT_ARMOR, 0, commodity_pickupevalfunc, 2000);
+}
+
+void item_health_small (void) {
if(!self.max_health)
- self.max_health = g_pickup_healthshard_max;
+ self.max_health = g_pickup_healthsmall_max;
if(!self.health)
- self.health = g_pickup_healthshard;
+ self.health = g_pickup_healthsmall;
StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", 15, "5 Health", IT_5HP, 0, commodity_pickupevalfunc, 100);
}
-void item_health25 (void) {
+void item_health_medium (void) {
if(!self.max_health)
- self.max_health = g_pickup_health_max;
+ self.max_health = g_pickup_healthmedium_max;
if(!self.health)
- self.health = g_pickup_health;
+ self.health = g_pickup_healthmedium;
StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", 15, "25 Health", IT_25HP, 0, commodity_pickupevalfunc, 500);
}
-void item_health100 (void) {
+void item_health_large (void) {
+ if(!self.max_health)
+ self.max_health = g_pickup_healthlarge_max;
+ if(!self.health)
+ self.health = g_pickup_healthlarge;
+ self.skin = 1; // "stronger" skin
+ StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", 15, "25 Health", IT_25HP, 0, commodity_pickupevalfunc, 500);
+}
+
+void item_health_mega (void) {
if(!cvar("g_powerup_superhealth"))
return;
@@ -652,6 +700,13 @@
}
}
+// support old misnamed entities
+void item_armor1() { item_armor_small(); }
+void item_armor25() { item_armor_large(); }
+void item_health1() { item_health_small(); }
+void item_health25() { item_health_medium(); }
+void item_health100() { item_health_mega(); }
+
void item_strength (void) {
if(!cvar("g_powerup_strength"))
return;
Modified: trunk/data/qcsrc/server/t_quake.qc
===================================================================
--- trunk/data/qcsrc/server/t_quake.qc 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/t_quake.qc 2008-01-13 10:38:00 UTC (rev 3132)
@@ -47,6 +47,7 @@
self.dphitcontentsmask = 0;
self.modelflags = 0;
self.attack_finished_for = 0; // why is this even valid? Spiiiiiiiiiiiiiiiiiiiiike!
+ self.notsingle = 0;
trace_dphittexturename = "";
}
Modified: trunk/data/qcsrc/server/t_quake3.qc
===================================================================
--- trunk/data/qcsrc/server/t_quake3.qc 2008-01-12 10:09:38 UTC (rev 3131)
+++ trunk/data/qcsrc/server/t_quake3.qc 2008-01-13 10:38:00 UTC (rev 3132)
@@ -1,18 +1,52 @@
//***********************
//QUAKE 3 ENTITIES - So people can play quake3 maps with the nexuiz weapons
//***********************
-void weapon_machinegun (void) {weapon_uzi();}
-void weapon_plasmagun (void) {weapon_electro();}
-void weapon_lightning (void) {weapon_crylink();}
-void weapon_railgun (void) {weapon_nex();}
-void weapon_bfg (void) {weapon_hagar();}
-void item_slugs (void) {item_cells();}
-void item_lightning (void) {item_cells();}
-void item_armorshard (void) {item_armor1();}
-void item_armorbody (void) {item_armor25();}
-void item_armor_shard (void) {item_armor1();}
-void item_armor_body (void) {item_armor25();}
-void item_armor_combat (void) {item_armor25();}
-void item_health_small (void) {item_health1();}
-void item_health_large (void) {item_health25();}
-void item_health_mega (void) {item_health100();}
+
+// NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
+
+// SG -> SG
+void spawnfunc_ammo_shells() { item_shells(); }
+
+// MG -> MG
+void spawnfunc_weapon_machinegun() { weapon_uzi(); }
+void spawnfunc_ammo_bullets() { item_bullets(); }
+
+// GL -> Mortar
+void spawnfunc_ammo_grenades() { item_rockets(); }
+
+// LG -> Electro
+void spawnfunc_weapon_lightning() { weapon_electro(); }
+void spawnfunc_ammo_lightning() { item_cells(); }
+
+// Plasma -> Crylink
+void spawnfunc_weapon_plasmagun() { weapon_crylink(); }
+void spawnfunc_ammo_cells() { item_cells(); }
+
+// Rail -> Nex
+void spawnfunc_weapon_railgun() { weapon_nex(); }
+void spawnfunc_ammo_slugs() { item_cells(); }
+
+// BFG -> Hagar
+void spawnfunc_weapon_bfg() { weapon_hagar(); }
+void spawnfunc_ammo_bfg() { item_cells(); }
+
+// RL -> RL
+void spawnfunc_ammo_rockets() { item_rockets(); }
+
+// Armor
+void spawnfunc_item_armor_body() { item_armor_large(); }
+void spawnfunc_item_armor_combat() { item_armor_medium(); }
+void spawnfunc_item_armor_shard() { item_armor_small(); }
+void spawnfunc_item_enviro() { item_armor_medium(); }
+//void spawnfunc_item_flight() /* not supported */
+//void spawnfunc_item_haste() /* not supported */
+void spawnfunc_item_health() { item_health_medium(); }
+void spawnfunc_item_health_large() { item_health_large(); }
+void spawnfunc_item_health_small() { item_health_small(); }
+void spawnfunc_item_health_mega() { item_health_mega(); }
+//void spawnfunc_item_invis() /* not supported */
+//void spawnfunc_item_regen() /* not supported */
+void spawnfunc_team_CTF_redflag() { item_flag_team1(); }
+void spawnfunc_team_CTF_blueflag() { item_flag_team2(); }
+void spawnfunc_team_CTF_redplayer() { info_player_team1(); }
+void spawnfunc_team_CTF_blueplayer() { info_player_team2(); }
More information about the nexuiz-commits
mailing list