Compare commits

...

2 commits

Author SHA1 Message Date
archive
8537f176b2 as released 1996-09-30 1996-09-30 00:00:00 +00:00
archive
d9cdbbafad as released 1996-09-13 1996-09-13 00:00:00 +00:00
25 changed files with 555 additions and 282 deletions

View file

@ -4,10 +4,10 @@
void() test_teleport_touch; void() test_teleport_touch;
void() tele_done; void() tele_done;
/*QUAKED test_teleport (0 .5 .8) ? /*QUAKED test_teleport (0 .5 .8) ?
Teleporter testing Teleporter testing
*/ */
void() test_teleport = void() test_teleport =
{ {
precache_model ("sprites/s_aball.spr"); precache_model ("sprites/s_aball.spr");
setsize (self, self.mins, self.maxs); setsize (self, self.mins, self.maxs);
@ -43,10 +43,10 @@ void() tele_done =
void() test_goaway; void() test_goaway;
void() test_spawn; void() test_spawn;
/*QUAKED test_fodder (0 .5 .8) ? /*QUAKED test_fodder (0 .5 .8) ?
beating guy beating guy
*/ */
void() test_fodder = void() test_fodder =
{ {
self.nextthink = time + 3; self.nextthink = time + 3;
self.think = test_spawn; self.think = test_spawn;

View file

@ -5,7 +5,7 @@ BOSS-ONE
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/boss1 $cd id1/models/boss1
$origin 0 0 -15 $origin 0 0 -15
$base base $base base
$skin skin $skin skin

306
client.qc
View file

@ -32,6 +32,12 @@ void() info_intermission =
void() SetChangeParms = void() SetChangeParms =
{ {
if (self.health <= 0)
{
SetNewParms ();
return;
}
// remove items // remove items
self.items = self.items - (self.items & self.items = self.items - (self.items &
(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) ); (IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) );
@ -63,7 +69,7 @@ void() SetNewParms =
parm4 = 25; parm4 = 25;
parm5 = 0; parm5 = 0;
parm6 = 0; parm6 = 0;
parm6 = 0; parm7 = 0;
parm8 = 1; parm8 = 1;
parm9 = 0; parm9 = 0;
}; };
@ -288,13 +294,17 @@ void() changelevel_touch =
if (other.classname != "player") if (other.classname != "player")
return; return;
if (cvar("noexit")) if ((cvar("noexit") == 1) || ((cvar("noexit") == 2) && (mapname != "start")))
{ {
T_Damage (other, self, self, 50000); T_Damage (other, self, self, 50000);
return; return;
} }
bprint (other.netname);
bprint (" exited the level\n"); if (coop || deathmatch)
{
bprint (other.netname);
bprint (" exited the level\n");
}
nextmap = self.map; nextmap = self.map;
@ -397,6 +407,8 @@ Returns the entity to spawn at
entity() SelectSpawnPoint = entity() SelectSpawnPoint =
{ {
local entity spot; local entity spot;
local entity thing;
local float pcount;
// testinfo_player_start is only found in regioned levels // testinfo_player_start is only found in regioned levels
spot = find (world, classname, "testplayerstart"); spot = find (world, classname, "testplayerstart");
@ -414,11 +426,29 @@ entity() SelectSpawnPoint =
} }
else if (deathmatch) else if (deathmatch)
{ {
lastspawn = find(lastspawn, classname, "info_player_deathmatch"); spot = lastspawn;
if (lastspawn == world) while (1)
lastspawn = find (lastspawn, classname, "info_player_deathmatch"); {
if (lastspawn != world) spot = find(spot, classname, "info_player_deathmatch");
return lastspawn; if (spot != world)
{
if (spot == lastspawn)
return lastspawn;
pcount = 0;
thing = findradius(spot.origin, 32);
while(thing)
{
if (thing.classname == "player")
pcount = pcount + 1;
thing = thing.chain;
}
if (pcount == 0)
{
lastspawn = spot;
return spot;
}
}
}
} }
if (serverflags) if (serverflags)
@ -450,6 +480,8 @@ void() PutClientInServer =
{ {
local entity spot; local entity spot;
spot = SelectSpawnPoint ();
self.classname = "player"; self.classname = "player";
self.health = 100; self.health = 100;
self.takedamage = DAMAGE_AIM; self.takedamage = DAMAGE_AIM;
@ -479,7 +511,7 @@ void() PutClientInServer =
// paustime is set by teleporters to keep the player from moving a while // paustime is set by teleporters to keep the player from moving a while
self.pausetime = 0; self.pausetime = 0;
spot = SelectSpawnPoint (); // spot = SelectSpawnPoint ();
self.origin = spot.origin + '0 0 1'; self.origin = spot.origin + '0 0 1';
self.angles = spot.angles; self.angles = spot.angles;
@ -562,98 +594,60 @@ RULES
=============================================================================== ===============================================================================
*/ */
void(entity c) PrintClientScore =
{
if (c.frags > -10 && c.frags < 0)
bprint (" ");
else if (c.frags >= 0)
{
if (c.frags < 100)
bprint (" ");
if (c.frags < 10)
bprint (" ");
}
bprint (ftos(c.frags));
bprint (" ");
bprint (c.netname);
bprint ("\n");
};
void() DumpScore =
{
local entity e, sort, walk;
if (world.chain)
error ("DumpScore: world.chain is set");
// build a sorted lis
e = find(world, classname, "player");
sort = world;
while (e)
{
if (!sort)
{
sort = e;
e.chain = world;
}
else
{
if (e.frags > sort.frags)
{
e.chain = sort;
sort = e;
}
else
{
walk = sort;
do
{
if (!walk.chain)
{
e.chain = world;
walk.chain = e;
}
else if (walk.chain.frags < e.frags)
{
e.chain = walk.chain;
walk.chain = e;
}
else
walk = walk.chain;
} while (walk.chain != e);
}
}
e = find(e, classname, "player");
}
// print the list
bprint ("\n");
while (sort)
{
PrintClientScore (sort);
sort = sort.chain;
}
bprint ("\n");
};
/* /*
go to the next level for deathmatch go to the next level for deathmatch
only called if a time or frag limit has expired
*/ */
void() NextLevel = void() NextLevel =
{ {
local entity o; local entity o;
// find a trigger changelevel if (mapname == "start")
o = find(world, classname, "trigger_changelevel"); {
if (!o || mapname == "start") if (!cvar("registered"))
{ // go back to same map if no trigger_changelevel {
mapname = "e1m1";
}
else if (!(serverflags & 1))
{
mapname = "e1m1";
serverflags = serverflags | 1;
}
else if (!(serverflags & 2))
{
mapname = "e2m1";
serverflags = serverflags | 2;
}
else if (!(serverflags & 4))
{
mapname = "e3m1";
serverflags = serverflags | 4;
}
else if (!(serverflags & 8))
{
mapname = "e4m1";
serverflags = serverflags - 7;
}
o = spawn(); o = spawn();
o.map = mapname; o.map = mapname;
} }
else
{
// find a trigger changelevel
o = find(world, classname, "trigger_changelevel");
// go back to start if no trigger_changelevel
if (!o)
{
mapname = "start";
o = spawn();
o.map = mapname;
}
}
nextmap = o.map; nextmap = o.map;
gameover = TRUE;
if (o.nextthink < time) if (o.nextthink < time)
{ {
@ -682,31 +676,13 @@ void() CheckRules =
if (timelimit && time >= timelimit) if (timelimit && time >= timelimit)
{ {
NextLevel (); NextLevel ();
/*
gameover = TRUE;
bprint ("\n\n\n==============================\n");
bprint ("game exited after ");
bprint (ftos(timelimit/60));
bprint (" minutes\n");
DumpScore ();
localcmd ("killserver\n");
*/
return; return;
} }
if (fraglimit && self.frags >= fraglimit) if (fraglimit && self.frags >= fraglimit)
{ {
NextLevel (); NextLevel ();
/*
gameover = TRUE;
bprint ("\n\n\n==============================\n");
bprint ("game exited after ");
bprint (ftos(self.frags));
bprint (" frags\n");
DumpScore ();
localcmd ("killserver\n");
*/
return; return;
} }
}; };
@ -961,6 +937,12 @@ void() PlayerPreThink =
// teleporters can force a non-moving pause time // teleporters can force a non-moving pause time
if (time < self.pausetime) if (time < self.pausetime)
self.velocity = '0 0 0'; self.velocity = '0 0 0';
if(time > self.attack_finished && self.currentammo == 0 && self.weapon != IT_AXE)
{
self.weapon = W_BestWeapon ();
W_SetCurrentAmmo ();
}
}; };
/* /*
@ -1254,12 +1236,25 @@ void(entity targ, entity attacker) ClientObituary =
bprint (" discharges into the water.\n"); bprint (" discharges into the water.\n");
return; return;
} }
if (targ.weapon == 16) if (targ.weapon == IT_GRENADE_LAUNCHER)
bprint (" tries to put the pin back in\n"); bprint (" tries to put the pin back in\n");
else if (rnum)
bprint (" becomes bored with life\n");
else else
bprint (" checks if his weapon is loaded\n"); bprint (" becomes bored with life\n");
return;
}
else if ( (teamplay == 2) && (targ.team > 0)&&(targ.team == attacker.team) )
{
if (rnum < 0.25)
deathstring = " mows down a teammate\n";
else if (rnum < 0.50)
deathstring = " checks his glasses\n";
else if (rnum < 0.75)
deathstring = " gets a frag for the other team\n";
else
deathstring = " loses another friend\n";
bprint (attacker.netname);
bprint (deathstring);
attacker.frags = attacker.frags - 1;
return; return;
} }
else else
@ -1329,40 +1324,10 @@ void(entity targ, entity attacker) ClientObituary =
} }
else else
{ {
targ.frags = targ.frags - 1; // killed self targ.frags = targ.frags - 1;
rnum = targ.watertype;
bprint (targ.netname); bprint (targ.netname);
if (rnum == -3)
{
if (random() < 0.5)
bprint (" sleeps with the fishes\n");
else
bprint (" sucks it down\n");
return;
}
else if (rnum == -4)
{
if (random() < 0.5)
bprint (" gulped a load of slime\n");
else
bprint (" can't exist on slime alone\n");
return;
}
else if (rnum == -5)
{
if (targ.health < -15)
{
bprint (" burst into flames\n");
return;
}
if (random() < 0.5)
bprint (" turned into hot slag\n");
else
bprint (" visits the Volcano God\n");
return;
}
// killed by a montser?
if (attacker.flags & FL_MONSTER) if (attacker.flags & FL_MONSTER)
{ {
if (attacker.classname == "monster_army") if (attacker.classname == "monster_army")
@ -1400,6 +1365,8 @@ void(entity targ, entity attacker) ClientObituary =
return; return;
} }
// tricks and traps
if (attacker.classname == "explo_box") if (attacker.classname == "explo_box")
{ {
bprint (" blew up\n"); bprint (" blew up\n");
@ -1410,12 +1377,6 @@ void(entity targ, entity attacker) ClientObituary =
bprint (" was squished\n"); bprint (" was squished\n");
return; return;
} }
if (targ.deathtype == "falling")
{
targ.deathtype = "";
bprint (" fell to his death\n");
return;
}
if (attacker.classname == "trap_shooter" || attacker.classname == "trap_spikeshooter") if (attacker.classname == "trap_shooter" || attacker.classname == "trap_spikeshooter")
{ {
bprint (" was spiked\n"); bprint (" was spiked\n");
@ -1432,6 +1393,47 @@ void(entity targ, entity attacker) ClientObituary =
return; return;
} }
// in-water deaths
rnum = targ.watertype;
if (rnum == -3)
{
if (random() < 0.5)
bprint (" sleeps with the fishes\n");
else
bprint (" sucks it down\n");
return;
}
else if (rnum == -4)
{
if (random() < 0.5)
bprint (" gulped a load of slime\n");
else
bprint (" can't exist on slime alone\n");
return;
}
else if (rnum == -5)
{
if (targ.health < -15)
{
bprint (" burst into flames\n");
return;
}
if (random() < 0.5)
bprint (" turned into hot slag\n");
else
bprint (" visits the Volcano God\n");
return;
}
// fell to their death?
if (targ.deathtype == "falling")
{
targ.deathtype = "";
bprint (" fell to his death\n");
return;
}
// hell if I know; he's just dead!!!
bprint (" died\n"); bprint (" died\n");
} }
} }

View file

@ -6,7 +6,7 @@ DEMON
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/demon3 $cd id1/models/demon3
$scale 0.8 $scale 0.8
$origin 0 0 24 $origin 0 0 24
$base base $base base

2
dog.qc
View file

@ -5,7 +5,7 @@ DOG
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/dog $cd id1/models/dog
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin

View file

@ -770,6 +770,7 @@ void () func_door_secret =
self.health = 10000; self.health = 10000;
self.takedamage = DAMAGE_YES; self.takedamage = DAMAGE_YES;
self.th_pain = fd_secret_use; self.th_pain = fd_secret_use;
self.th_die = fd_secret_use;
} }
self.oldorigin = self.origin; self.oldorigin = self.origin;
if (!self.wait) if (!self.wait)

View file

@ -6,7 +6,7 @@ SOLDIER / PLAYER
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/enforcer $cd id1/models/enforcer
$origin 0 -6 24 $origin 0 -6 24
$base base $base base
$skin skin $skin skin

View file

@ -1,4 +1,4 @@
$cd /raid/quake/id1/models/fish $cd id1/models/fish
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin

8
flag.qc Normal file
View file

@ -0,0 +1,8 @@
/*QUAKED item_deathball (.3 .3 1) (0 0 0) (32 32 32)
*/
void() deathball_touch;
void() item_deathball =
{
self.touch = deathball_touch;
};

View file

@ -6,7 +6,7 @@ KNIGHT
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/knight2 $cd id1/models/knight2
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin

View file

@ -638,7 +638,7 @@ local float best;
// cells // cells
if (self.weapon == 4) if (self.weapon == 4)
{ {
if (other.ammo_cells >= 200) if (other.ammo_cells >= 100)
return; return;
other.ammo_cells = other.ammo_cells + self.aflag; other.ammo_cells = other.ammo_cells + self.aflag;
} }
@ -674,7 +674,6 @@ local float best;
self.solid = SOLID_NOT; self.solid = SOLID_NOT;
if (deathmatch == 1) if (deathmatch == 1)
self.nextthink = time + 30; self.nextthink = time + 30;
self.think = SUB_regen; self.think = SUB_regen;
activator = other; activator = other;
@ -1230,14 +1229,26 @@ PLAYER BACKPACKS
void() BackpackTouch = void() BackpackTouch =
{ {
local string s; local string s;
local float best; local float best, old, new;
local entity stemp; local entity stemp;
local float acount;
if (other.classname != "player") if (other.classname != "player")
return; return;
if (other.health <= 0) if (other.health <= 0)
return; return;
acount = 0;
sprint (other, "You get ");
if (self.items)
if ((other.items & self.items) == 0)
{
acount = 1;
sprint (other, "the ");
sprint (other, self.netname);
}
// if the player was using his best weapon, change up to the new one if better // if the player was using his best weapon, change up to the new one if better
stemp = self; stemp = self;
self = other; self = other;
@ -1250,35 +1261,49 @@ void() BackpackTouch =
other.ammo_rockets = other.ammo_rockets + self.ammo_rockets; other.ammo_rockets = other.ammo_rockets + self.ammo_rockets;
other.ammo_cells = other.ammo_cells + self.ammo_cells; other.ammo_cells = other.ammo_cells + self.ammo_cells;
other.items = other.items | self.items; new = self.items;
if (!new)
new = other.weapon;
old = other.items;
other.items = other.items | new;
bound_other_ammo (); bound_other_ammo ();
sprint (other, "You get ");
if (self.ammo_shells) if (self.ammo_shells)
{ {
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_shells); s = ftos(self.ammo_shells);
sprint (other, s); sprint (other, s);
sprint (other, " shells "); sprint (other, " shells");
} }
if (self.ammo_nails) if (self.ammo_nails)
{ {
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_nails); s = ftos(self.ammo_nails);
sprint (other, s); sprint (other, s);
sprint (other, " nails "); sprint (other, " nails");
} }
if (self.ammo_rockets) if (self.ammo_rockets)
{ {
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_rockets); s = ftos(self.ammo_rockets);
sprint (other, s); sprint (other, s);
sprint (other, " rockets "); sprint (other, " rockets");
} }
if (self.ammo_cells) if (self.ammo_cells)
{ {
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_cells); s = ftos(self.ammo_cells);
sprint (other, s); sprint (other, s);
sprint (other, " cells "); sprint (other, " cells");
} }
sprint (other, "\n"); sprint (other, "\n");
@ -1286,19 +1311,16 @@ void() BackpackTouch =
sound (other, CHAN_ITEM, "weapons/lock4.wav", 1, ATTN_NORM); sound (other, CHAN_ITEM, "weapons/lock4.wav", 1, ATTN_NORM);
stuffcmd (other, "bf\n"); stuffcmd (other, "bf\n");
// change to a better weapon if appropriate // remove the backpack, change self to the player
if ( other.weapon == best )
{
stemp = self;
self = other;
self.weapon = W_BestWeapon();
self = stemp;
}
remove(self); remove(self);
self = other; self = other;
// change to the weapon
if (!deathmatch)
self.weapon = new;
else
Deathmatch_Weapon (old, new);
W_SetCurrentAmmo (); W_SetCurrentAmmo ();
}; };
@ -1318,6 +1340,24 @@ void() DropBackpack =
item.origin = self.origin - '0 0 24'; item.origin = self.origin - '0 0 24';
item.items = self.weapon; item.items = self.weapon;
if (item.items == IT_AXE)
item.netname = "Axe";
else if (item.items == IT_SHOTGUN)
item.netname = "Shotgun";
else if (item.items == IT_SUPER_SHOTGUN)
item.netname = "Double-barrelled Shotgun";
else if (item.items == IT_NAILGUN)
item.netname = "Nailgun";
else if (item.items == IT_SUPER_NAILGUN)
item.netname = "Super Nailgun";
else if (item.items == IT_GRENADE_LAUNCHER)
item.netname = "Grenade Launcher";
else if (item.items == IT_ROCKET_LAUNCHER)
item.netname = "Rocket Launcher";
else if (item.items == IT_LIGHTNING)
item.netname = "Thunderbolt";
else
item.netname = "";
item.ammo_shells = self.ammo_shells; item.ammo_shells = self.ammo_shells;
item.ammo_nails = self.ammo_nails; item.ammo_nails = self.ammo_nails;

View file

@ -6,7 +6,7 @@ KNIGHT
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/knight $cd id1/models/knight
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin badass3 $skin badass3

132
models.qc
View file

@ -8,7 +8,7 @@ WORLD WEAPONS
*/ */
$modelname g_shot $modelname g_shot
$cd /raid/quake/id1/models/g_shot $cd id1/models/g_shot
$origin 0 0 -24 $origin 0 0 -24
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
@ -17,7 +17,7 @@ $frame shot1
$modelname g_nail $modelname g_nail
$cd /raid/quake/id1/models/g_nail $cd id1/models/g_nail
$flags 8 // client side rotate $flags 8 // client side rotate
$origin 0 0 -24 $origin 0 0 -24
$base base $base base
@ -26,7 +26,7 @@ $frame shot1
$modelname g_nail2 $modelname g_nail2
$cd /raid/quake/id1/models/g_nail2 $cd id1/models/g_nail2
$flags 8 // client side rotate $flags 8 // client side rotate
$origin 0 0 -24 $origin 0 0 -24
$base base $base base
@ -35,7 +35,7 @@ $frame shot2
$modelname g_rock $modelname g_rock
$cd /raid/quake/id1/models/g_rock $cd id1/models/g_rock
$flags 8 // client side rotate $flags 8 // client side rotate
$origin 0 0 -24 $origin 0 0 -24
$base base $base base
@ -44,7 +44,7 @@ $frame shot1
$modelname g_rock2 $modelname g_rock2
$cd /raid/quake/id1/models/g_rock2 $cd id1/models/g_rock2
$flags 8 // client side rotate $flags 8 // client side rotate
$origin 0 0 -24 $origin 0 0 -24
$base base $base base
@ -52,7 +52,7 @@ $skin skin
$frame shot1 $frame shot1
$modelname g_light $modelname g_light
$cd /raid/quake/id1/models/g_light $cd id1/models/g_light
$flags 8 // client side rotate $flags 8 // client side rotate
$origin 0 0 -24 $origin 0 0 -24
$base base $base base
@ -68,7 +68,7 @@ VIEW WEAPONS
*/ */
$modelname v_axe $modelname v_axe
$cd /raid/quake/id1/models/v_axe $cd id1/models/v_axe
$origin 0 5 54 $origin 0 5 54
$base base $base base
$skin skin $skin skin
@ -76,7 +76,7 @@ $frame frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8 frame9
$modelname v_shot $modelname v_shot
$cd /raid/quake/id1/models/v_shot $cd id1/models/v_shot
$origin 0 0 54 $origin 0 0 54
$base base $base base
$skin skin $skin skin
@ -84,7 +84,7 @@ $frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
$modelname v_shot2 $modelname v_shot2
$cd /raid/quake/id1/models/v_shot2 $cd id1/models/v_shot2
$origin 0 0 56 $origin 0 0 56
$base base $base base
$skin skin $skin skin
@ -92,7 +92,7 @@ $frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
$modelname v_rock2 $modelname v_rock2
$cd /raid/quake/id1/models/v_rock2 $cd id1/models/v_rock2
$origin 0 0 54 $origin 0 0 54
$base base $base base
$skin skin $skin skin
@ -100,7 +100,7 @@ $frame shot1 shot2 shot3 shot4 shot5 shot6 shot6
$modelname v_rock $modelname v_rock
$cd /raid/quake/id1/models/v_rock $cd id1/models/v_rock
$origin 0 0 54 $origin 0 0 54
$base base $base base
$skin skin $skin skin
@ -108,7 +108,7 @@ $frame shot1 shot2 shot3 shot4 shot5 shot6 shot7
$modelname v_nail2 $modelname v_nail2
$cd /raid/quake/id1/models/v_nail2 $cd id1/models/v_nail2
$origin 0 0 54 $origin 0 0 54
$base base $base base
$skin skin $skin skin
@ -116,14 +116,14 @@ $frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9
$modelname v_nail $modelname v_nail
$cd /raid/quake/id1/models/v_nail $cd id1/models/v_nail
$origin 0 0 54 $origin 0 0 54
$base base $base base
$skin skin $skin skin
$frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9 $frame shot1 shot2 shot3 shot4 shot5 shot6 shot7 shot8 shot9
$modelname v_light $modelname v_light
$cd /raid/quake/id1/models/v_light $cd id1/models/v_light
$origin 0 0 54 $origin 0 0 54
$base base $base base
$skin skin $skin skin
@ -139,42 +139,42 @@ ITEMS
*/ */
$modelname w_g_key $modelname w_g_key
$cd /raid/quake/id1/models/w_g_key $cd id1/models/w_g_key
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname w_s_key $modelname w_s_key
$cd /raid/quake/id1/models/w_s_key $cd id1/models/w_s_key
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname m_g_key $modelname m_g_key
$cd /raid/quake/id1/models/m_g_key $cd id1/models/m_g_key
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname m_s_key $modelname m_s_key
$cd /raid/quake/id1/models/m_s_key $cd id1/models/m_s_key
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname b_g_key $modelname b_g_key
$cd /raid/quake/id1/models/b_g_key $cd id1/models/b_g_key
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname b_s_key $modelname b_s_key
$cd /raid/quake/id1/models/b_s_key $cd id1/models/b_s_key
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
@ -182,14 +182,14 @@ $frame frame1
$modelname quaddama $modelname quaddama
$cd /raid/quake/id1/models/quaddama $cd id1/models/quaddama
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname invisibl $modelname invisibl
$cd /raid/quake/id1/models/invisibl $cd id1/models/invisibl
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
@ -197,62 +197,62 @@ $frame frame1
$modelname invulner $modelname invulner
$flags 8 // client side rotate $flags 8 // client side rotate
$cd /raid/quake/id1/models/invulner $cd id1/models/invulner
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
//modelname jetpack //modelname jetpack
//cd /raid/quake/id1/models/jetpack //cd id1/models/jetpack
//flags 8 // client side rotate //flags 8 // client side rotate
//base base //base base
//skin skin //skin skin
//frame frame1 //frame frame1
$modelname cube $modelname cube
$cd /raid/quake/id1/models/cube $cd id1/models/cube
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname suit $modelname suit
$cd /raid/quake/id1/models/suit $cd id1/models/suit
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname boots $modelname boots
$cd /raid/quake/id1/models/boots $cd id1/models/boots
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname end1 $modelname end1
$cd /raid/quake/id1/models/end1 $cd id1/models/end1
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname end2 $modelname end2
$cd /raid/quake/id1/models/end2 $cd id1/models/end2
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname end3 $modelname end3
$cd /raid/quake/id1/models/end3 $cd id1/models/end3
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname end4 $modelname end4
$cd /raid/quake/id1/models/end4 $cd id1/models/end4
$flags 8 // client side rotate $flags 8 // client side rotate
$base base $base base
$skin skin $skin skin
@ -268,7 +268,7 @@ GIBS
*/ */
$modelname gib1 $modelname gib1
$cd /raid/quake/id1/models/gib1 $cd id1/models/gib1
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -278,7 +278,7 @@ $frame frame1
// torso // torso
$modelname gib2 $modelname gib2
$cd /raid/quake/id1/models/gib2 $cd id1/models/gib2
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -286,7 +286,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname gib3 $modelname gib3
$cd /raid/quake/id1/models/gib3 $cd id1/models/gib3
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -297,7 +297,7 @@ $frame frame1
// heads // heads
$modelname h_player $modelname h_player
$cd /raid/quake/id1/models/h_player $cd id1/models/h_player
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -305,7 +305,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_dog $modelname h_dog
$cd /raid/quake/id1/models/h_dog $cd id1/models/h_dog
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -313,7 +313,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_mega $modelname h_mega
$cd /raid/quake/id1/models/h_mega $cd id1/models/h_mega
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -321,7 +321,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_guard $modelname h_guard
$cd /raid/quake/id1/models/h_guard $cd id1/models/h_guard
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -329,7 +329,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_wizard $modelname h_wizard
$cd /raid/quake/id1/models/h_wizard $cd id1/models/h_wizard
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -337,7 +337,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_knight $modelname h_knight
$cd /raid/quake/id1/models/h_knight $cd id1/models/h_knight
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -345,7 +345,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_hellkn $modelname h_hellkn
$cd /raid/quake/id1/models/h_hellkn $cd id1/models/h_hellkn
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -353,7 +353,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_zombie $modelname h_zombie
$cd /raid/quake/id1/models/h_zombie $cd id1/models/h_zombie
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -361,7 +361,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_shams $modelname h_shams
$cd /raid/quake/id1/models/h_shams $cd id1/models/h_shams
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -369,7 +369,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_shal $modelname h_shal
$cd /raid/quake/id1/models/h_shal $cd id1/models/h_shal
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -377,7 +377,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_ogre $modelname h_ogre
$cd /raid/quake/id1/models/h_ogre $cd id1/models/h_ogre
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -385,7 +385,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname h_demon $modelname h_demon
$cd /raid/quake/id1/models/h_demon $cd id1/models/h_demon
$flags 4 // EF_GIB $flags 4 // EF_GIB
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -401,7 +401,7 @@ MISC
*/ */
$modelname armor $modelname armor
$cd /raid/quake/id1/models/armor $cd id1/models/armor
$flags 8 // client side rotate $flags 8 // client side rotate
$origin 0 0 -8 $origin 0 0 -8
$base base $base base
@ -411,14 +411,14 @@ $skin skin3
$frame armor $frame armor
$modelname s_light // shambler lightning ready $modelname s_light // shambler lightning ready
$cd /raid/quake/id1/models/s_light $cd id1/models/s_light
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin
$frame frame1 frame2 frame3 $frame frame1 frame2 frame3
$modelname bolt3 // lightning towar bolts $modelname bolt3 // lightning towar bolts
$cd /raid/quake/id1/models/bolt2 $cd id1/models/bolt2
$origin 0 0 0 $origin 0 0 0
$base base $base base
$scale 4 $scale 4
@ -426,28 +426,28 @@ $skin skin
$frame light $frame light
$modelname bolt2 $modelname bolt2
$cd /raid/quake/id1/models/bolt2 $cd id1/models/bolt2
$origin 0 0 0 $origin 0 0 0
$base base $base base
$skin skin $skin skin
$frame light $frame light
$modelname bolt $modelname bolt
$cd /raid/quake/id1/models/bolt $cd id1/models/bolt
$origin 0 0 0 $origin 0 0 0
$base light $base light
$skin light $skin light
$frame light $frame light
$modelname laser $modelname laser
$cd /raid/quake/id1/models/laser $cd id1/models/laser
$base base $base base
$skin skin $skin skin
$scale 2 $scale 2
$frame frame1 $frame frame1
$modelname flame // with torch $modelname flame // with torch
$cd /raid/quake/id1/models/flame $cd id1/models/flame
$origin 0 0 12 $origin 0 0 12
$base base $base base
$skin skin $skin skin
@ -461,7 +461,7 @@ $frame flame6 0.1
$framegroupend $framegroupend
$modelname flame2 // standing flame, no torch $modelname flame2 // standing flame, no torch
$cd /raid/quake/id1/models/flame2 $cd id1/models/flame2
$origin 0 0 12 $origin 0 0 12
$base base $base base
$skin skin $skin skin
@ -488,35 +488,35 @@ $frame flameb11
$framegroupend $framegroupend
$modelname zom_gib $modelname zom_gib
$cd /raid/quake/id1/models/zom_gib $cd id1/models/zom_gib
$flags 32 // EF_ZOMGIB $flags 32 // EF_ZOMGIB
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname eyes $modelname eyes
$cd /raid/quake/id1/models/eyes $cd id1/models/eyes
$origin 0 0 -24 $origin 0 0 -24
$base base $base base
$skin skin $skin skin
$frame frame1 $frame frame1
$modelname spike $modelname spike
$cd /raid/quake/id1/models/spike $cd id1/models/spike
$origin 0 0 0 $origin 0 0 0
$base spike $base spike
$skin skin $skin skin
$frame spike $frame spike
$modelname s_spike $modelname s_spike
$cd /raid/quake/id1/models/s_spike $cd id1/models/s_spike
$origin 0 0 0 $origin 0 0 0
$base spike $base spike
$skin skin $skin skin
$frame spike $frame spike
$modelname v_spike $modelname v_spike
$cd /raid/quake/id1/models/v_spike $cd id1/models/v_spike
$flags 128 // EF_TRACER3 $flags 128 // EF_TRACER3
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -524,7 +524,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname w_spike $modelname w_spike
$cd /raid/quake/id1/models/w_spike $cd id1/models/w_spike
$flags 16 // EF_TRACER $flags 16 // EF_TRACER
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -537,7 +537,7 @@ $frame frame4 0.1
$framegroupend $framegroupend
$modelname k_spike $modelname k_spike
$cd /raid/quake/id1/models/k_spike $cd id1/models/k_spike
$flags 64 // EF_TRACER2 $flags 64 // EF_TRACER2
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -545,7 +545,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname backpack $modelname backpack
$cd /raid/quake/id1/models/backpack $cd id1/models/backpack
$flags 8 // EF_ROTATE $flags 8 // EF_ROTATE
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -553,7 +553,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname grenade $modelname grenade
$cd /raid/quake/id1/models/grenade2 $cd id1/models/grenade2
$flags 2 // EF_GRENADE $flags 2 // EF_GRENADE
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -561,7 +561,7 @@ $skin skin
$frame grenade $frame grenade
$modelname missile $modelname missile
$cd /raid/quake/id1/models/missile $cd id1/models/missile
$flags 1 // EF_ROCKET $flags 1 // EF_ROCKET
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -569,7 +569,7 @@ $skin skin
$frame missile $frame missile
$modelname lavaball $modelname lavaball
$cd /raid/quake/id1/models/lavaball $cd id1/models/lavaball
$flags 1 // EF_ROCKET $flags 1 // EF_ROCKET
$origin 0 0 0 $origin 0 0 0
$base base $base base
@ -577,7 +577,7 @@ $skin skin
$frame frame1 $frame frame1
$modelname teleport $modelname teleport
$cd /raid/quake/id1/models/teleport $cd id1/models/teleport
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin

View file

@ -6,7 +6,7 @@ OGRE
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/ogre_c $cd id1/models/ogre_c
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin base $skin base

View file

@ -5,7 +5,7 @@ OLD ONE
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/old_one $cd id1/models/old_one
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin
@ -239,6 +239,13 @@ void() finale_4 =
//============================================================================ //============================================================================
void () nopain =
{
self.health = 40000;
};
//============================================================================
/*QUAKED monster_oldone (1 0 0) (-16 -16 -24) (16 16 32) /*QUAKED monster_oldone (1 0 0) (-16 -16 -24) (16 16 32)
*/ */
@ -267,6 +274,7 @@ void() monster_oldone =
self.think = old_idle1; self.think = old_idle1;
self.nextthink = time + 0.1; self.nextthink = time + 0.1;
self.takedamage = DAMAGE_YES; self.takedamage = DAMAGE_YES;
self.th_pain = nopain;
self.th_die = finale_1; self.th_die = finale_1;
shub = self; shub = self;

View file

@ -9,7 +9,7 @@ PLAYER
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/player_4 $cd id1/models/player_4
$origin 0 -6 24 $origin 0 -6 24
$base base $base base
$skin skin $skin skin

143
progdefs.h Normal file
View file

@ -0,0 +1,143 @@
/* file generated by qcc, do not modify */
typedef struct
{ int pad[28];
int self;
int other;
int world;
float time;
float frametime;
float force_retouch;
string_t mapname;
float deathmatch;
float coop;
float teamplay;
float serverflags;
float total_secrets;
float total_monsters;
float found_secrets;
float killed_monsters;
float parm1;
float parm2;
float parm3;
float parm4;
float parm5;
float parm6;
float parm7;
float parm8;
float parm9;
float parm10;
float parm11;
float parm12;
float parm13;
float parm14;
float parm15;
float parm16;
vec3_t v_forward;
vec3_t v_up;
vec3_t v_right;
float trace_allsolid;
float trace_startsolid;
float trace_fraction;
vec3_t trace_endpos;
vec3_t trace_plane_normal;
float trace_plane_dist;
int trace_ent;
float trace_inopen;
float trace_inwater;
int msg_entity;
func_t main;
func_t StartFrame;
func_t PlayerPreThink;
func_t PlayerPostThink;
func_t ClientKill;
func_t ClientConnect;
func_t PutClientInServer;
func_t ClientDisconnect;
func_t SetNewParms;
func_t SetChangeParms;
} globalvars_t;
typedef struct
{
float modelindex;
vec3_t absmin;
vec3_t absmax;
float ltime;
float movetype;
float solid;
vec3_t origin;
vec3_t oldorigin;
vec3_t velocity;
vec3_t angles;
vec3_t avelocity;
vec3_t punchangle;
string_t classname;
string_t model;
float frame;
float skin;
float effects;
vec3_t mins;
vec3_t maxs;
vec3_t size;
func_t touch;
func_t use;
func_t think;
func_t blocked;
float nextthink;
int groundentity;
float health;
float frags;
float weapon;
string_t weaponmodel;
float weaponframe;
float currentammo;
float ammo_shells;
float ammo_nails;
float ammo_rockets;
float ammo_cells;
float items;
float takedamage;
int chain;
float deadflag;
vec3_t view_ofs;
float button0;
float button1;
float button2;
float impulse;
float fixangle;
vec3_t v_angle;
float idealpitch;
string_t netname;
int enemy;
float flags;
float colormap;
float team;
float max_health;
float teleport_time;
float armortype;
float armorvalue;
float waterlevel;
float watertype;
float ideal_yaw;
float yaw_speed;
int aiment;
int goalentity;
float spawnflags;
string_t target;
string_t targetname;
float dmg_take;
float dmg_save;
int dmg_inflictor;
int owner;
vec3_t movedir;
string_t message;
float sounds;
string_t noise;
string_t noise1;
string_t noise2;
string_t noise3;
} entvars_t;
#define PROGHEADER_CRC 5927

View file

@ -5,7 +5,7 @@ SHAL-RATH
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/shalrath $cd id1/models/shalrath
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin skin $skin skin

View file

@ -6,7 +6,7 @@ SHAMBLER
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/shams $cd id1/models/shams
$origin 0 0 24 $origin 0 0 24
$base base $base base
$skin base $skin base

View file

@ -6,7 +6,7 @@ SOLDIER / PLAYER
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/soldier3 $cd id1/models/soldier3
$origin 0 -6 24 $origin 0 -6 24
$base base $base base
$skin skin $skin skin

View file

@ -3,7 +3,7 @@
$spritename s_explod $spritename s_explod
$type vp_parallel $type vp_parallel
$load /raid/quake/id1/gfx/sprites/explod03.lbm $load id1/gfx/sprites/explod03.lbm
$frame 24 24 56 56 $frame 24 24 56 56
$frame 120 24 56 56 $frame 120 24 56 56
$frame 216 24 56 56 $frame 216 24 56 56
@ -14,13 +14,13 @@ $frame 216 88 56 56
$spritename s_bubble $spritename s_bubble
$type vp_parallel $type vp_parallel
$load /raid/quake/id1/gfx/sprites/bubble.lbm $load id1/gfx/sprites/bubble.lbm
$frame 16 16 16 16 $frame 16 16 16 16
$frame 40 16 16 16 $frame 40 16 16 16
$spritename s_light $spritename s_light
$type vp_parallel $type vp_parallel
$load /raid/quake/id1/gfx/sprites/light.lbm $load id1/gfx/sprites/light.lbm
$frame 104 32 32 32 $frame 104 32 32 32

View file

@ -6,7 +6,7 @@ BLOB
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/tarbaby $cd id1/models/tarbaby
$origin 0 0 24 $origin 0 0 24
$base base $base base

View file

@ -39,6 +39,7 @@ void() W_FireAxe =
local vector source; local vector source;
local vector org; local vector org;
makevectors (self.v_angle);
source = self.origin + '0 0 16'; source = self.origin + '0 0 16';
traceline (source, source + v_forward*64, FALSE, self); traceline (source, source + v_forward*64, FALSE, self);
if (trace_fraction == 1.0) if (trace_fraction == 1.0)
@ -384,6 +385,7 @@ void() W_FireRocket =
missile.owner = self; missile.owner = self;
missile.movetype = MOVETYPE_FLYMISSILE; missile.movetype = MOVETYPE_FLYMISSILE;
missile.solid = SOLID_BBOX; missile.solid = SOLID_BBOX;
missile.classname = "missile";
// set missile speed // set missile speed
@ -463,6 +465,7 @@ void(vector p1, vector p2, entity from, float damage) LightningDamage =
void() W_FireLightning = void() W_FireLightning =
{ {
local vector org; local vector org;
local float cells;
if (self.ammo_cells < 1) if (self.ammo_cells < 1)
{ {
@ -474,9 +477,10 @@ void() W_FireLightning =
// explode if under water // explode if under water
if (self.waterlevel > 1) if (self.waterlevel > 1)
{ {
T_RadiusDamage (self, self, 35*self.ammo_cells, world); cells = self.ammo_cells;
self.ammo_cells = 0; self.ammo_cells = 0;
W_SetCurrentAmmo (); W_SetCurrentAmmo ();
T_RadiusDamage (self, self, 35*cells, world);
return; return;
} }
@ -826,25 +830,16 @@ float() W_BestWeapon =
it = self.items; it = self.items;
if(self.ammo_cells >= 1 && (it & IT_LIGHTNING) ) if (self.waterlevel <= 1 && self.ammo_cells >= 1 && (it & IT_LIGHTNING) )
return IT_LIGHTNING; return IT_LIGHTNING;
else if(self.ammo_nails >= 2 && (it & IT_SUPER_NAILGUN) ) if(self.ammo_nails >= 2 && (it & IT_SUPER_NAILGUN) )
return IT_SUPER_NAILGUN; return IT_SUPER_NAILGUN;
else if(self.ammo_shells >= 2 && (it & IT_SUPER_SHOTGUN) ) if(self.ammo_shells >= 2 && (it & IT_SUPER_SHOTGUN) )
return IT_SUPER_SHOTGUN; return IT_SUPER_SHOTGUN;
else if(self.ammo_nails >= 1 && (it & IT_NAILGUN) ) if(self.ammo_nails >= 1 && (it & IT_NAILGUN) )
return IT_NAILGUN; return IT_NAILGUN;
else if(self.ammo_shells >= 1 && (it & IT_SHOTGUN) ) if(self.ammo_shells >= 1 && (it & IT_SHOTGUN) )
return IT_SHOTGUN; return IT_SHOTGUN;
/*
if(self.ammo_rockets >= 1 && (it & IT_ROCKET_LAUNCHER) )
return IT_ROCKET_LAUNCHER;
else if(self.ammo_rockets >= 1 && (it & IT_GRENADE_LAUNCHER) )
return IT_GRENADE_LAUNCHER;
*/
return IT_AXE; return IT_AXE;
}; };
@ -1121,7 +1116,81 @@ void() CycleWeaponCommand =
am = 1; am = 1;
} }
if ( (self.items & self.weapon) && am == 0) if ( (it & self.weapon) && am == 0)
{
W_SetCurrentAmmo ();
return;
}
}
};
/*
============
CycleWeaponReverseCommand
Go to the prev weapon with ammo
============
*/
void() CycleWeaponReverseCommand =
{
local float it, am;
it = self.items;
self.impulse = 0;
while (1)
{
am = 0;
if (self.weapon == IT_LIGHTNING)
{
self.weapon = IT_ROCKET_LAUNCHER;
if (self.ammo_rockets < 1)
am = 1;
}
else if (self.weapon == IT_ROCKET_LAUNCHER)
{
self.weapon = IT_GRENADE_LAUNCHER;
if (self.ammo_rockets < 1)
am = 1;
}
else if (self.weapon == IT_GRENADE_LAUNCHER)
{
self.weapon = IT_SUPER_NAILGUN;
if (self.ammo_nails < 2)
am = 1;
}
else if (self.weapon == IT_SUPER_NAILGUN)
{
self.weapon = IT_NAILGUN;
if (self.ammo_nails < 1)
am = 1;
}
else if (self.weapon == IT_NAILGUN)
{
self.weapon = IT_SUPER_SHOTGUN;
if (self.ammo_shells < 2)
am = 1;
}
else if (self.weapon == IT_SUPER_SHOTGUN)
{
self.weapon = IT_SHOTGUN;
if (self.ammo_shells < 1)
am = 1;
}
else if (self.weapon == IT_SHOTGUN)
{
self.weapon = IT_AXE;
}
else if (self.weapon == IT_AXE)
{
self.weapon = IT_LIGHTNING;
if (self.ammo_cells < 1)
am = 1;
}
if ( (it & self.weapon) && am == 0)
{ {
W_SetCurrentAmmo (); W_SetCurrentAmmo ();
return; return;
@ -1169,6 +1238,8 @@ void() ImpulseCommands =
CycleWeaponCommand (); CycleWeaponCommand ();
if (self.impulse == 11) if (self.impulse == 11)
ServerflagsCommand (); ServerflagsCommand ();
if (self.impulse == 12)
CycleWeaponReverseCommand ();
if (self.impulse == 255) if (self.impulse == 255)
QuadCheat (); QuadCheat ();

View file

@ -6,7 +6,7 @@ WIZARD
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/a_wizard $cd id1/models/a_wizard
$origin 0 0 24 $origin 0 0 24
$base wizbase $base wizbase
$skin wizbase $skin wizbase

View file

@ -5,7 +5,7 @@ ZOMBIE
============================================================================== ==============================================================================
*/ */
$cd /raid/quake/id1/models/zombie $cd id1/models/zombie
$origin 0 0 24 $origin 0 0 24