[nexuiz-commits] r6366 - in trunk/data: qcsrc/server scripts
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Mar 30 06:54:05 EDT 2009
Author: div0
Date: 2009-03-30 06:54:05 -0400 (Mon, 30 Mar 2009)
New Revision: 6366
Modified:
trunk/data/qcsrc/server/t_items.qc
trunk/data/qcsrc/server/t_quake3.qc
trunk/data/scripts/entities.def
Log:
item_fuel
item_jetpack (alias: item_flight from Q3A)
item_fuel_regen
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2009-03-30 10:37:13 UTC (rev 6365)
+++ trunk/data/qcsrc/server/t_items.qc 2009-03-30 10:54:05 UTC (rev 6366)
@@ -164,7 +164,8 @@
if (player.ammo_fuel < g_pickup_fuel_max)
{
pickedup = TRUE;
- player.ammo_fuel = min (player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
+ player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
+ player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
}
if (item.flags & FL_WEAPON)
@@ -1302,3 +1303,22 @@
}
}
}
+
+void spawnfunc_item_fuel(void)
+{
+ if(!self.ammo_fuel)
+ self.ammo_fuel = g_pickup_fuel;
+ StartItem ("models/items/g_fuel.md3", "misc/itempickup.wav", g_pickup_respawntime_medium, "Fuel", IT_FUEL, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
+}
+
+void spawnfunc_item_fuel_regen(void)
+{
+ StartItem ("models/items/g_fuelregen.md3", "misc/itempickup.wav", g_pickup_respawntime_medium, "Fuel regenerator", IT_FUEL_REGEN, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
+}
+
+void spawnfunc_item_jetpack(void)
+{
+ if(!self.ammo_fuel)
+ self.ammo_fuel = g_pickup_fuel;
+ StartItem ("models/items/g_jetpack.md3", "misc/itempickup.wav", g_pickup_respawntime_medium, "Jet pack", IT_JETPACK, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_LOW);
+}
Modified: trunk/data/qcsrc/server/t_quake3.qc
===================================================================
--- trunk/data/qcsrc/server/t_quake3.qc 2009-03-30 10:37:13 UTC (rev 6365)
+++ trunk/data/qcsrc/server/t_quake3.qc 2009-03-30 10:54:05 UTC (rev 6366)
@@ -52,3 +52,5 @@
void spawnfunc_team_CTF_blueplayer() { spawnfunc_info_player_team2(); }
void spawnfunc_team_CTF_redspawn() { spawnfunc_info_player_team1(); }
void spawnfunc_team_CTF_bluespawn() { spawnfunc_info_player_team2(); }
+
+void spawnfunc_item_flight() { spawnfunc_item_jetpack(); }
Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def 2009-03-30 10:37:13 UTC (rev 6365)
+++ trunk/data/scripts/entities.def 2009-03-30 10:54:05 UTC (rev 6366)
@@ -1455,3 +1455,41 @@
target: disable/enable all relays with this targetname when triggered
targetname: name that identifies this entity so it can be triggered
*/
+
+/*QUAKED item_fuel (.3 .3 1) (-30 -30 0) (30 30 32) FLOATING
+Jetpack fuel
+-------- KEYS --------
+ammo_fuel: fuel units gained by this item (if unset, g_pickup_fuel is used)
+respawntime: time till it respawns (default: 15)
+team: out of items with the same value here, only one (random one) will spawn. Useful to put multiple items on one spot.
+cnt: weight of this item for random selection using "team". Set to a lower value for items you want to see less likely.
+-------- SPAWNFLAGS --------
+FLOATING: the item will float in air, instead of aligning to the floor by falling
+-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
+model="models/items/g_fuel.md3"
+*/
+
+/*QUAKED item_fuel_regen (1 .3 1) (-30 -30 0) (30 30 32) FLOATING
+Fuel regenerator
+-------- KEYS --------
+respawntime: time till it respawns (default: 15)
+team: out of items with the same value here, only one (random one) will spawn. Useful to put multiple items on one spot.
+cnt: weight of this item for random selection using "team". Set to a lower value for items you want to see less likely.
+-------- SPAWNFLAGS --------
+FLOATING: the item will float in air, instead of aligning to the floor by falling
+-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
+model="models/items/g_fuelregen.md3"
+*/
+
+/*QUAKED item_jetpack (.3 .3 1) (-30 -30 0) (30 30 32) FLOATING
+Jetpack
+-------- KEYS --------
+ammo_fuel: fuel units gained by this item (if unset, g_pickup_fuel is used)
+respawntime: time till it respawns (default: 15)
+team: out of items with the same value here, only one (random one) will spawn. Useful to put multiple items on one spot.
+cnt: weight of this item for random selection using "team". Set to a lower value for items you want to see less likely.
+-------- SPAWNFLAGS --------
+FLOATING: the item will float in air, instead of aligning to the floor by falling
+-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
+model="models/items/g_jetpack.md3"
+*/
More information about the nexuiz-commits
mailing list