mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-28 22:52:26 +00:00
compiles with qfcc (this was probably a pointless exercise due to Deek's
work, but it's nice having a compilable base paroxysm).
This commit is contained in:
parent
30eb259d02
commit
7f3ef60d60
44 changed files with 100 additions and 185 deletions
3
paroxysm/quake/.gitignore
vendored
Normal file
3
paroxysm/quake/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
progdefs.h
|
||||
*.dat
|
||||
*.sym
|
5
paroxysm/quake/Makefile
Normal file
5
paroxysm/quake/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
all: progs.dat
|
||||
progs.dat: progs.src *.qc
|
||||
qfcc --traditional -Werror -g
|
||||
clean:
|
||||
rm -f core *.dat *.sym progdefs.h
|
|
@ -3,7 +3,7 @@ void() t_movetarget;
|
|||
//void() knight_walk1;
|
||||
//void() knight_bow6;
|
||||
//void() knight_bow1;
|
||||
void(entity etemp, entity stemp, entity stemp, float dmg) T_Damage;
|
||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
|
||||
/*
|
||||
|
||||
.enemy
|
||||
|
|
|
@ -63,7 +63,7 @@ float(entity weap) bot_has_weapon =
|
|||
|
||||
void() bot_grab_weapon =
|
||||
{
|
||||
local float weap;
|
||||
local float weap = 0;
|
||||
|
||||
if (self.goalentity.weapon == IT_PLASMAGUN)
|
||||
{
|
||||
|
|
|
@ -344,7 +344,7 @@ local float bold;
|
|||
|
||||
//POX - touching a player can null him out (?)
|
||||
//POX - This was an early problem and this check is probably nolonger necessary due to increased item discrimination
|
||||
if (!self.goalentity.flags & FL_ITEM)
|
||||
if (!(self.goalentity.flags & FL_ITEM))
|
||||
return;
|
||||
|
||||
//POX - Shouldn't happen but...
|
||||
|
@ -571,8 +571,8 @@ This function also doubles as an Attack Style Selection based on botprefs
|
|||
float() better_weapon =
|
||||
// -----------------------------------------
|
||||
{
|
||||
local float sweap;
|
||||
local float eweap;
|
||||
local float sweap = 0;
|
||||
local float eweap = 0;
|
||||
|
||||
|
||||
//Attack Style - Rush
|
||||
|
@ -1271,7 +1271,7 @@ void() bot_walk =
|
|||
//POX - This if statement fixed a few problems I have seen with these bots ignoring enemies, firing at walls...
|
||||
//POX - It just tells them to look for stuff if they aren't going after a bot, player, or item
|
||||
//POX - There must be something I missed elsewhere causing these guys to target junk they can't reach
|
||||
if (self.goalentity.classname != "bot" || self.goalentity.classname != "player" || !self.goalentity.flags & FL_ITEM || self.goalentity.model == string_null)
|
||||
if (self.goalentity.classname != "bot" || self.goalentity.classname != "player" || !(self.goalentity.flags & FL_ITEM) || self.goalentity.model == string_null)
|
||||
{
|
||||
self.goalentity = world;
|
||||
self.enemy = world;
|
||||
|
@ -1445,7 +1445,7 @@ void() bot_run =
|
|||
return;
|
||||
|
||||
//POX - A hacky fix to make sure these guys have a real target
|
||||
if (self.goalentity.classname != "bot" || self.goalentity.classname != "player" || !self.goalentity.flags & FL_ITEM || self.goalentity.model == string_null)
|
||||
if (self.goalentity.classname != "bot" || self.goalentity.classname != "player" || !(self.goalentity.flags & FL_ITEM) || self.goalentity.model == string_null)
|
||||
{
|
||||
self.goalentity = world;
|
||||
self.enemy = world;
|
||||
|
@ -1610,8 +1610,6 @@ void() bot_set_currentammo =
|
|||
void() bot_check_ammo =
|
||||
// -------------------------
|
||||
{
|
||||
local float chance;
|
||||
|
||||
//if (self.currentammo > 0)
|
||||
// return;
|
||||
|
||||
|
@ -1869,7 +1867,6 @@ void() bot_fire_nailgun = //POX - Actually, this is the PlasmaGun
|
|||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
{
|
||||
local vector dir;
|
||||
local float r;
|
||||
|
||||
if (self.weapon == IT_SUPER_NAILGUN)
|
||||
{
|
||||
|
@ -2448,7 +2445,7 @@ void() bot_attack =
|
|||
|
||||
if (time < self.attack_finished)
|
||||
{
|
||||
bot_run1;
|
||||
bot_run1 ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2463,13 +2460,13 @@ void() bot_attack =
|
|||
else if (self.weapon == IT_COMBOGUN && random() > 0.4 && self.ammo_rockets > 1 && self.pball_finish < time && range(self.enemy) == RANGE_NEAR)
|
||||
{
|
||||
self.pball_finish = time + 0.9;
|
||||
self.which_ammo == 1;//POX - needed for proper obituary
|
||||
self.which_ammo = 1;//POX - needed for proper obituary
|
||||
bot_gren1();
|
||||
}
|
||||
else if (self.weapon == IT_COMBOGUN)
|
||||
{
|
||||
self.attack_finished = time + 0.5;
|
||||
self.which_ammo == 0;//POX - needed for proper obituary
|
||||
self.which_ammo = 0;//POX - needed for proper obituary
|
||||
bot_shot1();
|
||||
}
|
||||
//POX - MegaPlasma Burst (Plasma Gun Second Trigger)
|
||||
|
|
|
@ -241,7 +241,7 @@ local entity spot;
|
|||
void(float teem) create_bot =
|
||||
// ------------------------------------------------
|
||||
{
|
||||
local entity bot, spot, plr;
|
||||
local entity bot, spot;
|
||||
local float r, cno, sn, pn;
|
||||
|
||||
//POX - NoBots option
|
||||
|
@ -560,17 +560,17 @@ local float r;
|
|||
r = floor(random() * 3);
|
||||
|
||||
if (r == 1 && random() > 0.5)
|
||||
bot.botpref_attack == AS_RUSH;
|
||||
bot.botpref_attack = AS_RUSH;
|
||||
else if (r == 2)
|
||||
bot.botpref_attack == AS_RETREAT;
|
||||
bot.botpref_attack = AS_RETREAT;
|
||||
else
|
||||
bot.botpref_attack == AS_SMART;
|
||||
bot.botpref_attack = AS_SMART;
|
||||
|
||||
if (skill == 2 && random() >0.2)
|
||||
bot.botpref_attack == AS_SMART;
|
||||
bot.botpref_attack = AS_SMART;
|
||||
|
||||
if (skill > 2)
|
||||
bot.botpref_attack == AS_SMART;
|
||||
bot.botpref_attack = AS_SMART;
|
||||
|
||||
//POX - Best Weapon Pref
|
||||
r = random();
|
||||
|
@ -597,7 +597,7 @@ local float r;
|
|||
}
|
||||
|
||||
if (skill > 2)
|
||||
bot.botpref_react == 0.01;
|
||||
bot.botpref_react = 0.01;
|
||||
|
||||
|
||||
};
|
||||
|
|
|
@ -88,8 +88,6 @@ When a button is touched, it moves some distance in the direction of it's angle,
|
|||
*/
|
||||
void() func_button =
|
||||
{
|
||||
local float gtemp, ftemp;
|
||||
|
||||
if (self.sounds == 0)
|
||||
{
|
||||
precache_sound ("buttons/airbut1.wav");
|
||||
|
|
|
@ -67,7 +67,6 @@ void (float amount) CCamUp =
|
|||
};
|
||||
void (float amount) CCamRight =
|
||||
{
|
||||
local string aa;
|
||||
self.camview_y = self.camview_y + amount;
|
||||
if (self.camview_y < -8)
|
||||
self.camview_y = -8;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// prototypes
|
||||
void () W_WeaponFrame;
|
||||
void() W_SetCurrentAmmo;
|
||||
void() player_pain;
|
||||
void(entity attacker, float damage) player_pain;
|
||||
void() player_stand1;
|
||||
void (vector org) spawn_tfog;
|
||||
void (vector org, entity death_owner) spawn_tdeath;
|
||||
|
@ -257,8 +257,6 @@ void() execute_changelevel =
|
|||
|
||||
void() changelevel_touch =
|
||||
{
|
||||
local entity pos;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -843,7 +841,6 @@ void() CheckRules =
|
|||
|
||||
void() PlayerDeathThink =
|
||||
{
|
||||
local entity old_self;
|
||||
local float forward;
|
||||
|
||||
if ((self.flags & FL_ONGROUND))
|
||||
|
@ -880,8 +877,6 @@ void() PlayerDeathThink =
|
|||
|
||||
void() PlayerJump =
|
||||
{
|
||||
local vector start, end;
|
||||
|
||||
if (self.flags & FL_WATERJUMP)
|
||||
return;
|
||||
|
||||
|
@ -1099,9 +1094,6 @@ Called every frame before physics are run
|
|||
*/
|
||||
void() PlayerPreThink =
|
||||
{
|
||||
local float mspeed, aspeed;
|
||||
local float r;
|
||||
|
||||
if (intermission_running)
|
||||
{
|
||||
IntermissionThink (); // otherwise a button could be missed between
|
||||
|
@ -1349,9 +1341,6 @@ Called every frame after physics are run
|
|||
*/
|
||||
void() PlayerPostThink =
|
||||
{
|
||||
local float mspeed, aspeed;
|
||||
local float r;
|
||||
|
||||
if (time < 1.5)
|
||||
stuffcmd (self, "bf\n");//POX v1.2 - clear overrun v_cshifts!
|
||||
|
||||
|
@ -1458,7 +1447,7 @@ void() ClientConnect =
|
|||
|
||||
//POX v.11 FINALLY nailed this one
|
||||
//Players have 30 seconds to join an LMS game, or they are put into observer till changelevel
|
||||
if (!deathmatch & DM_LMS)
|
||||
if (!(deathmatch & DM_LMS))
|
||||
{
|
||||
bprint (self.netname);
|
||||
bprint (" entered the game\n");
|
||||
|
@ -1567,7 +1556,6 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
{
|
||||
local float rnum;
|
||||
local string deathstring, deathstring2;
|
||||
local entity nar;
|
||||
rnum = random();
|
||||
|
||||
//POX v1.2 - Changed this so obituary taunts work in DM_LMS
|
||||
|
|
|
@ -635,7 +635,7 @@ void() traceoff = #30;
|
|||
void(entity e) eprint = #31; // prints an entire edict
|
||||
float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
|
||||
// #33 was removed
|
||||
float(float yaw, float dist) droptofloor= #34; // TRUE if landed on floor
|
||||
float() droptofloor= #34; // TRUE if landed on floor
|
||||
void(float style, string value) lightstyle = #35;
|
||||
float(float v) rint = #36; // round to nearest int
|
||||
float(float v) floor = #37; // largest integer <= v
|
||||
|
|
|
@ -593,7 +593,7 @@ void () fd_secret_use =
|
|||
|
||||
if (!(self.spawnflags & SECRET_NO_SHOOT))
|
||||
{
|
||||
self.th_pain = SUB_Null;
|
||||
//XXX nneded? self.th_pain = SUB_Null;
|
||||
self.takedamage = DAMAGE_NO;
|
||||
}
|
||||
self.velocity = '0 0 0';
|
||||
|
@ -627,6 +627,11 @@ void () fd_secret_use =
|
|||
sound(self, CHAN_VOICE, self.noise2, 1, ATTN_NORM);
|
||||
};
|
||||
|
||||
void (entity attacker, float damage) fd_secret_pain =
|
||||
{
|
||||
fd_secret_use ();
|
||||
};
|
||||
|
||||
// Wait after first movement...
|
||||
void () fd_secret_move1 =
|
||||
{
|
||||
|
@ -680,7 +685,7 @@ void () fd_secret_done =
|
|||
{
|
||||
self.health = 10000;
|
||||
self.takedamage = DAMAGE_YES;
|
||||
self.th_pain = fd_secret_use;
|
||||
self.th_pain = fd_secret_pain;
|
||||
}
|
||||
sound(self, CHAN_VOICE, self.noise3, 1, ATTN_NORM);
|
||||
};
|
||||
|
@ -785,7 +790,7 @@ void () func_door_secret =
|
|||
{
|
||||
self.health = 10000;
|
||||
self.takedamage = DAMAGE_YES;
|
||||
self.th_pain = fd_secret_use;
|
||||
self.th_pain = fd_secret_pain;
|
||||
self.th_die = fd_secret_use;
|
||||
|
||||
//POX v1.1 - missed this one...
|
||||
|
|
|
@ -87,8 +87,6 @@ void() dynlight_use =
|
|||
|
||||
void() dyn_light =
|
||||
{
|
||||
local float eff;
|
||||
|
||||
precache_model ("progs/null.spr");
|
||||
|
||||
if ((self.dynlight_style < 1) || (self.dynlight_style > 3))
|
||||
|
|
|
@ -1094,7 +1094,6 @@ void() rotate_door_group_reversedirection =
|
|||
|
||||
void() rotate_door_use =
|
||||
{
|
||||
local entity t;
|
||||
local vector start;
|
||||
|
||||
if ( ( self.state != STATE_OPEN ) && ( self.state != STATE_CLOSED ) )
|
||||
|
|
|
@ -164,7 +164,6 @@ void() item_health =
|
|||
|
||||
void() health_touch =
|
||||
{
|
||||
local float amount;
|
||||
local string s;
|
||||
|
||||
if (other.classname != "player")
|
||||
|
@ -314,7 +313,7 @@ float() W_BestWeapon;
|
|||
|
||||
void() weapon_touch =
|
||||
{
|
||||
local float hadammo, best, new, old;
|
||||
local float hadammo, best, new = 0, old;
|
||||
local entity stemp;
|
||||
local float leave;
|
||||
|
||||
|
@ -843,9 +842,6 @@ KEYS
|
|||
|
||||
void() key_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -979,9 +975,6 @@ END OF LEVEL RUNES
|
|||
|
||||
void() sigil_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1053,9 +1046,6 @@ void() powerup_touch;
|
|||
|
||||
void() powerup_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1341,7 +1331,7 @@ void() BackpackTouch =
|
|||
if (self.healamount)
|
||||
{
|
||||
if (!T_Heal(other, self.healamount, 0))
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
else
|
||||
{
|
||||
if (acount)
|
||||
|
|
|
@ -190,7 +190,7 @@ entity() CamShoot =
|
|||
|
||||
float(float d, float a) CamHurry =
|
||||
{
|
||||
local float dd,t,tt;
|
||||
local float t,tt;
|
||||
|
||||
if (d<0) a = 0 - a;
|
||||
t = frametime;
|
||||
|
@ -394,8 +394,7 @@ vector(entity ent) CamFlybyTarget =
|
|||
void(entity newtarg) CamInitFlybyMode =
|
||||
{
|
||||
local float f, max;
|
||||
local vector vec, vec2, trg;
|
||||
local entity ent;
|
||||
local vector vec;
|
||||
|
||||
// Keep camera at this point for some time...
|
||||
self.pausetime = time + 0.4;
|
||||
|
@ -658,7 +657,6 @@ void() CamImpulses =
|
|||
{
|
||||
local float c;
|
||||
local entity ent;
|
||||
local string s;
|
||||
|
||||
//POX - Added so server rules are accessable in autocam mode
|
||||
if (self.impulse == 253)
|
||||
|
@ -1005,7 +1003,6 @@ void() CamFlyByThink =
|
|||
local float p0,p1,grad,p;
|
||||
local vector vec;
|
||||
local entity ent;
|
||||
local float ok;
|
||||
|
||||
// self.dest1 is set to player
|
||||
// Check if the player is not dead
|
||||
|
@ -1094,9 +1091,6 @@ void() CamFlyByThink =
|
|||
|
||||
void() CamFollowThink =
|
||||
{
|
||||
local entity ent;
|
||||
local vector vec;
|
||||
|
||||
// Check player death
|
||||
if (self.enemy.deadflag != DEAD_NO) {
|
||||
if (time < 31) {
|
||||
|
@ -1133,8 +1127,8 @@ void() CamFixedThink =
|
|||
local float maxlo; // maximum angle of lowers
|
||||
local float minhi; // minimum angle of highers
|
||||
local vector scrv; // onscreen origin sum
|
||||
local vector hiv; // lower optimum
|
||||
local vector lov; // higher optimum
|
||||
local vector hiv = '0 0 0'; // lower optimum
|
||||
local vector lov = '0 0 0'; // higher optimum
|
||||
local float c;
|
||||
|
||||
cang = self.v_angle_y;
|
||||
|
@ -1294,8 +1288,6 @@ void() CamThink =
|
|||
|
||||
void() CamClientInit =
|
||||
{
|
||||
local entity ent;
|
||||
|
||||
self.classname = "KasCam";
|
||||
setmodel (self, string_null);
|
||||
self.weaponmodel = string_null;
|
||||
|
|
|
@ -35,8 +35,6 @@ void() Laser_Touch =
|
|||
|
||||
void(vector org, vector vec) LaunchLaser =
|
||||
{
|
||||
local vector vec;
|
||||
|
||||
if (self.classname == "monster_enforcer")
|
||||
sound (self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM);
|
||||
|
||||
|
@ -287,7 +285,7 @@ void() misc_fireball =
|
|||
self.nextthink = time + (random() * 5);
|
||||
self.think = fire_fly;
|
||||
if (!self.speed)
|
||||
self.speed == 1000;
|
||||
self.speed = 1000;
|
||||
};
|
||||
|
||||
void() fire_fly =
|
||||
|
@ -554,7 +552,6 @@ void() bubble_remove =
|
|||
void() bubble_bob =
|
||||
{
|
||||
local float rnd1, rnd2, rnd3;
|
||||
local vector vtmp1, modi;
|
||||
|
||||
self.cnt = self.cnt + 1;
|
||||
if (self.cnt == 4)
|
||||
|
@ -643,7 +640,7 @@ void() func_illusionary =
|
|||
self.movetype = MOVETYPE_NONE;
|
||||
self.solid = SOLID_NOT;
|
||||
setmodel (self, self.model);
|
||||
makestatic ();
|
||||
makestatic (self);
|
||||
};
|
||||
|
||||
/*QUAKED func_episodegate (0 .5 .8) ? E1 E2 E3 E4
|
||||
|
|
|
@ -160,8 +160,6 @@ Set "sounds" to one of the following:
|
|||
void() func_plat =
|
||||
|
||||
{
|
||||
local entity t;
|
||||
|
||||
if (!self.t_length)
|
||||
self.t_length = 80;
|
||||
if (!self.t_width)
|
||||
|
|
|
@ -614,7 +614,7 @@ void() player_axpain5 = [ $axpain5, player_axpain6 ] {};
|
|||
void() player_axpain6 = [ $axpain6, player_run ] {};
|
||||
*/
|
||||
|
||||
void() player_pain =
|
||||
void(entity attacker, float damage) player_pain =
|
||||
{
|
||||
if (self.weaponframe)
|
||||
return;
|
||||
|
|
|
@ -634,8 +634,6 @@ void(vector org) launch_shrapnel =
|
|||
|
||||
void() ShrapnelExplode =
|
||||
{
|
||||
local float n;
|
||||
|
||||
//POX v1.11
|
||||
if (self.voided)
|
||||
return;
|
||||
|
@ -833,12 +831,12 @@ void() W_SecondTrigger =
|
|||
{
|
||||
//already primed
|
||||
if (self.prime_tshot == TRUE)
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
|
||||
//not enough ammo
|
||||
else if (self.ammo_shells < 3)
|
||||
{
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -858,12 +856,12 @@ void() W_SecondTrigger =
|
|||
{
|
||||
//already reloaded
|
||||
if (self.reload_rocket == 0)
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
|
||||
//if no rockets go away
|
||||
else if (self.ammo_rockets < 1)
|
||||
{
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -908,7 +906,7 @@ void() W_SecondTrigger =
|
|||
|
||||
}
|
||||
else
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
|
||||
// check for Super Shotgun second Trigger
|
||||
|
|
|
@ -485,7 +485,7 @@ void() colour_light =
|
|||
//Can be made active by use of a targetname
|
||||
//Must be triggered by touch
|
||||
|
||||
if((!self.targetname) || (!self.spawnflags & CLSTART_OFF))
|
||||
if((!self.targetname) || !(self.spawnflags & CLSTART_OFF))
|
||||
self.touch = colourlight_use;
|
||||
else
|
||||
{
|
||||
|
|
|
@ -226,8 +226,6 @@ void() trigger_secret =
|
|||
|
||||
void() counter_use =
|
||||
{
|
||||
local string junk;
|
||||
|
||||
self.count = self.count - 1;
|
||||
if (self.count < 0)
|
||||
return;
|
||||
|
|
|
@ -221,7 +221,7 @@ void () wall_killed =
|
|||
remove(self);
|
||||
};
|
||||
|
||||
void() wall_pain =
|
||||
void(entity attacker, float damage) wall_pain =
|
||||
{
|
||||
if(self.health > 0)
|
||||
self.health = self.max_health;
|
||||
|
|
|
@ -110,8 +110,7 @@ SpawnMeatSpray
|
|||
*/
|
||||
void(vector org, vector vel) SpawnMeatSpray =
|
||||
{
|
||||
local entity missile, mpuff;
|
||||
local vector org;
|
||||
local entity missile;
|
||||
|
||||
missile = spawn ();
|
||||
missile.owner = self;
|
||||
|
@ -735,8 +734,6 @@ Start Plasma Gun Fire
|
|||
|
||||
void() plasma_touch =
|
||||
{
|
||||
local float rand;
|
||||
|
||||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
|
@ -947,7 +944,6 @@ void(vector org, vector dir) launch_spike =
|
|||
void(float ox) W_FireNails =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
self.weaponmodel = "progs/v_nailgl.mdl"; // light up nailgun barrels
|
||||
|
||||
|
@ -968,7 +964,6 @@ void(float ox) W_FireNails =
|
|||
void() W_FireSuperSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
||||
//self.attack_finished = time + 0.15;
|
||||
|
@ -985,7 +980,6 @@ void() W_FireSuperSpikes =
|
|||
void(float ox) W_FireSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
||||
|
@ -1305,7 +1299,7 @@ void() W_Attack =
|
|||
}
|
||||
else if (self.st_rocketload > time) // still reloading so do nothing
|
||||
{
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1323,7 +1317,7 @@ W_ChangeWeapon
|
|||
*/
|
||||
void() W_ChangeWeapon =
|
||||
{
|
||||
local float it, am, fl;
|
||||
local float it, am, fl = 0;
|
||||
|
||||
it = self.items;
|
||||
am = 0;
|
||||
|
@ -1347,7 +1341,7 @@ void() W_ChangeWeapon =
|
|||
{
|
||||
am = 1;
|
||||
//POX v1.1 - fix for dm_autoswitch
|
||||
if (self.ammo_rockets > 0 && !deathmatch & DM_AUTOSWITCH) // allow player to select SuperShotgun if he has rockets
|
||||
if (self.ammo_rockets > 0 && !(deathmatch & DM_AUTOSWITCH)) // allow player to select SuperShotgun if he has rockets
|
||||
{
|
||||
self.which_ammo = 1; // tell W_SetCurrentAmmo to use rockets - not shells
|
||||
am = 0;
|
||||
|
@ -1465,7 +1459,7 @@ void() CycleWeaponCommand =
|
|||
{
|
||||
am = 1;
|
||||
//POX v1.1 - fix for dm_autoswitch
|
||||
if (self.ammo_rockets > 0 && !deathmatch & DM_AUTOSWITCH) // allow player to select SuperShotgun if he has rockets
|
||||
if (self.ammo_rockets > 0 && !(deathmatch & DM_AUTOSWITCH)) // allow player to select SuperShotgun if he has rockets
|
||||
{
|
||||
self.which_ammo = 1; // tell W_SetCurrentAmmo to use rockets - not shells
|
||||
am = 0;
|
||||
|
@ -1552,7 +1546,7 @@ void() CycleWeaponReverseCommand =
|
|||
if (self.ammo_shells < 2)
|
||||
{
|
||||
am = 1;
|
||||
if (self.ammo_rockets > 0 && !deathmatch & DM_AUTOSWITCH)
|
||||
if (self.ammo_rockets > 0 && !(deathmatch & DM_AUTOSWITCH))
|
||||
{
|
||||
self.which_ammo = 1; // tell W_SetCurrentAmmo to use rockets - not shells
|
||||
am = 0;
|
||||
|
@ -1661,8 +1655,6 @@ void() DisplayRules =
|
|||
//POX - stuff added here, bot & camera impulses
|
||||
void() ImpulseCommands =
|
||||
{
|
||||
local float cells; // used for underwater MegaPlasmaBurst
|
||||
|
||||
if (self.impulse >= 1 && self.impulse <= 8)
|
||||
W_ChangeWeapon ();
|
||||
if (self.impulse == 9)
|
||||
|
|
|
@ -425,8 +425,6 @@ void() bodyque =
|
|||
|
||||
void() InitBodyQue =
|
||||
{
|
||||
local entity e;
|
||||
|
||||
bodyque_head = spawn();
|
||||
bodyque_head.classname = "bodyque";
|
||||
bodyque_head.owner = spawn();
|
||||
|
|
3
paroxysm/quakeworld/.gitignore
vendored
Normal file
3
paroxysm/quakeworld/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
progdefs.h
|
||||
*.dat
|
||||
*.sym
|
5
paroxysm/quakeworld/Makefile
Normal file
5
paroxysm/quakeworld/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
all: qwprogs.dat
|
||||
qwprogs.dat: progs.src *.qc
|
||||
qfcc --traditional -Werror -g
|
||||
clean:
|
||||
rm -f core *.dat *.sym progdefs.h
|
|
@ -85,8 +85,6 @@ When a button is touched, it moves some distance in the direction of it's angle,
|
|||
*/
|
||||
void() func_button =
|
||||
{
|
||||
local float gtemp, ftemp;
|
||||
|
||||
if (self.sounds == 0)
|
||||
{
|
||||
precache_sound ("buttons/airbut1.wav");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// prototypes
|
||||
void () W_WeaponFrame;
|
||||
void() W_SetCurrentAmmo;
|
||||
void() player_pain;
|
||||
void(entity attacker, float damage) player_pain;
|
||||
void() player_stand1;
|
||||
void (vector org) spawn_tfog;
|
||||
void (vector org, entity death_owner) spawn_tdeath;
|
||||
|
@ -192,8 +192,6 @@ void() execute_changelevel =
|
|||
|
||||
void() changelevel_touch =
|
||||
{
|
||||
local entity pos;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -320,10 +318,9 @@ Returns the entity to spawn at
|
|||
*/
|
||||
entity() SelectSpawnPoint =
|
||||
{
|
||||
local entity spot, newspot, thing;
|
||||
local entity spot, thing;
|
||||
local float numspots, totalspots;
|
||||
local float rnum, pcount;
|
||||
local float rs;
|
||||
local float pcount;
|
||||
local entity spots;
|
||||
|
||||
numspots = 0;
|
||||
|
@ -460,7 +457,6 @@ called each time a player enters a new level
|
|||
void() PutClientInServer =
|
||||
{
|
||||
local entity spot;
|
||||
local string s;
|
||||
|
||||
//POX v1.2 - remove items
|
||||
self.items = self.items - (self.items &
|
||||
|
@ -726,7 +722,6 @@ go to the next level for deathmatch
|
|||
void() NextLevel =
|
||||
{
|
||||
local entity o;
|
||||
local string newmap;
|
||||
|
||||
// + POX
|
||||
if (deathmatch & DM_LMS)
|
||||
|
@ -796,7 +791,7 @@ Exit deathmatch games upon conditions
|
|||
void() CheckRules =
|
||||
{
|
||||
//POX - LMS next level is taken care of in ClientObituary and ClientDisconnect
|
||||
if (!deathmatch & DM_LMS)
|
||||
if (!(deathmatch & DM_LMS))
|
||||
{
|
||||
if (timelimit && time >= timelimit)
|
||||
NextLevel ();
|
||||
|
@ -821,7 +816,6 @@ void() CheckRules =
|
|||
|
||||
void() PlayerDeathThink =
|
||||
{
|
||||
local entity old_self;
|
||||
local float forward;
|
||||
|
||||
if ((self.flags & FL_ONGROUND))
|
||||
|
@ -864,8 +858,6 @@ void() PlayerDeathThink =
|
|||
|
||||
void() PlayerJump =
|
||||
{
|
||||
local vector start, end;
|
||||
|
||||
if (self.flags & FL_WATERJUMP)
|
||||
return;
|
||||
|
||||
|
@ -1095,9 +1087,6 @@ Called every frame before physics are run
|
|||
*/
|
||||
void() PlayerPreThink =
|
||||
{
|
||||
local float mspeed, aspeed;
|
||||
local float r;
|
||||
|
||||
if (intermission_running)
|
||||
{
|
||||
IntermissionThink (); // otherwise a button could be missed between
|
||||
|
@ -1419,9 +1408,6 @@ Called every frame after physics are run
|
|||
*/
|
||||
void() PlayerPostThink =
|
||||
{
|
||||
local float mspeed, aspeed;
|
||||
local float r;
|
||||
|
||||
//POX v1.2 - clear overrun v_cshifts!
|
||||
if (time < 1.5)
|
||||
stuffcmd (self, "bf\n");
|
||||
|
@ -1507,7 +1493,7 @@ void() ClientConnect =
|
|||
//sprint (self, PRINT_HIGH, "\n\n---------------\nPOXworld v1.11b\n---------------\n\n");
|
||||
|
||||
// + POX LMS late joiners get booted to spectate
|
||||
if (!deathmatch & DM_LMS)
|
||||
if (!(deathmatch & DM_LMS))
|
||||
{
|
||||
bprint (PRINT_HIGH, self.netname);
|
||||
bprint (PRINT_HIGH, " entered the game\n");
|
||||
|
@ -1594,7 +1580,6 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
{
|
||||
local float rnum;
|
||||
local string deathstring, deathstring2;
|
||||
local string s;
|
||||
local string attackerteam, targteam;
|
||||
|
||||
rnum = random();
|
||||
|
|
|
@ -111,7 +111,6 @@ void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
|
|||
local entity oldself;
|
||||
local float save;
|
||||
local float take;
|
||||
local string s;
|
||||
local string attackerteam, targteam;
|
||||
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ float teamplay;
|
|||
float timelimit;
|
||||
float fraglimit;
|
||||
float deathmatch;
|
||||
float rj = 1;
|
||||
float rj;
|
||||
|
||||
//================================================
|
||||
|
||||
|
@ -641,7 +641,7 @@ void() traceoff = #30;
|
|||
void(entity e) eprint = #31; // prints an entire edict
|
||||
float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
|
||||
// #33 was removed
|
||||
float(float yaw, float dist) droptofloor= #34; // TRUE if landed on floor
|
||||
float() droptofloor= #34; // TRUE if landed on floor
|
||||
void(float style, string value) lightstyle = #35;
|
||||
float(float v) rint = #36; // round to nearest int
|
||||
float(float v) floor = #37; // largest integer <= v
|
||||
|
|
|
@ -585,7 +585,7 @@ void () fd_secret_use =
|
|||
|
||||
if (!(self.spawnflags & SECRET_NO_SHOOT))
|
||||
{
|
||||
self.th_pain = SUB_Null;
|
||||
//XXX needed? self.th_pain = SUB_Null;
|
||||
self.takedamage = DAMAGE_NO;
|
||||
}
|
||||
self.velocity = '0 0 0';
|
||||
|
@ -619,6 +619,11 @@ void () fd_secret_use =
|
|||
sound(self, CHAN_VOICE, self.noise2, 1, ATTN_NORM);
|
||||
};
|
||||
|
||||
void (entity attacker, float damage) fd_secret_pain =
|
||||
{
|
||||
fd_secret_use ();
|
||||
};
|
||||
|
||||
// Wait after first movement...
|
||||
void () fd_secret_move1 =
|
||||
{
|
||||
|
@ -672,7 +677,7 @@ void () fd_secret_done =
|
|||
{
|
||||
self.health = 10000;
|
||||
self.takedamage = DAMAGE_YES;
|
||||
self.th_pain = fd_secret_use;
|
||||
self.th_pain = fd_secret_pain;
|
||||
self.th_die = fd_secret_use;
|
||||
}
|
||||
sound(self, CHAN_NO_PHS_ADD+CHAN_VOICE, self.noise3, 1, ATTN_NORM);
|
||||
|
@ -780,7 +785,7 @@ void () func_door_secret =
|
|||
{
|
||||
self.health = 10000;
|
||||
self.takedamage = DAMAGE_YES;
|
||||
self.th_pain = fd_secret_use;
|
||||
self.th_pain = fd_secret_pain;
|
||||
|
||||
// + POX
|
||||
self.nobleed = TRUE;
|
||||
|
|
|
@ -91,8 +91,6 @@ void() dynlight_use =
|
|||
|
||||
void() dyn_light =
|
||||
{
|
||||
local float eff;
|
||||
|
||||
precache_model ("progs/null.spr");
|
||||
|
||||
if (!self.speed)
|
||||
|
|
|
@ -1094,7 +1094,6 @@ void() rotate_door_group_reversedirection =
|
|||
|
||||
void() rotate_door_use =
|
||||
{
|
||||
local entity t;
|
||||
local vector start;
|
||||
|
||||
if ( ( self.state != STATE_OPEN ) && ( self.state != STATE_CLOSED ) )
|
||||
|
|
|
@ -40,8 +40,6 @@ void() q_touch;
|
|||
|
||||
void() q_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
local string s;
|
||||
|
||||
if (other.classname != "player")
|
||||
|
@ -110,8 +108,6 @@ void() r_touch;
|
|||
|
||||
void() r_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
local string s;
|
||||
|
||||
if (other.classname != "player")
|
||||
|
@ -295,7 +291,6 @@ void() item_health =
|
|||
|
||||
void() health_touch =
|
||||
{
|
||||
local float amount;
|
||||
local string s;
|
||||
|
||||
//if (deathmatch == 4)
|
||||
|
@ -466,7 +461,7 @@ float() W_BestWeapon;
|
|||
|
||||
void() weapon_touch =
|
||||
{
|
||||
local float hadammo, best, new, old;
|
||||
local float hadammo, best, new = 0, old;
|
||||
local entity stemp;
|
||||
local float leave;
|
||||
|
||||
|
@ -1068,9 +1063,6 @@ KEYS
|
|||
|
||||
void() key_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1201,9 +1193,6 @@ END OF LEVEL RUNES
|
|||
|
||||
void() sigil_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1276,9 +1265,6 @@ void() powerup_touch;
|
|||
|
||||
void() powerup_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1594,7 +1580,7 @@ void() BackpackTouch =
|
|||
if (self.healamount)
|
||||
{
|
||||
if (!T_Heal(other, self.healamount, 0))
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
else
|
||||
{
|
||||
if (acount)
|
||||
|
|
|
@ -232,7 +232,7 @@ void() misc_fireball =
|
|||
self.nextthink = time + (random() * 5);
|
||||
self.think = fire_fly;
|
||||
if (!self.speed)
|
||||
self.speed == 1000;
|
||||
self.speed = 1000;
|
||||
};
|
||||
|
||||
void() fire_fly =
|
||||
|
@ -396,8 +396,6 @@ void() Laser_Touch =
|
|||
|
||||
void(vector org, vector vec) LaunchLaser =
|
||||
{
|
||||
local vector vec;
|
||||
|
||||
if (self.classname == "monster_enforcer")
|
||||
sound (self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM);
|
||||
|
||||
|
@ -563,7 +561,6 @@ void() bubble_remove =
|
|||
void() bubble_bob =
|
||||
{
|
||||
local float rnd1, rnd2, rnd3;
|
||||
local vector vtmp1, modi;
|
||||
|
||||
self.cnt = self.cnt + 1;
|
||||
if (self.cnt == 4)
|
||||
|
@ -652,7 +649,7 @@ void() func_illusionary =
|
|||
self.movetype = MOVETYPE_NONE;
|
||||
self.solid = SOLID_NOT;
|
||||
setmodel (self, self.model);
|
||||
makestatic ();
|
||||
makestatic (self);
|
||||
};
|
||||
|
||||
/*QUAKED func_episodegate (0 .5 .8) ? E1 E2 E3 E4
|
||||
|
|
|
@ -33,7 +33,6 @@ ObserverTeleportTouch
|
|||
void(string destination) ObserverTeleportTouch =
|
||||
{
|
||||
local entity t;
|
||||
local vector org;
|
||||
|
||||
if (self.teleport_time > time)
|
||||
return;
|
||||
|
|
|
@ -148,8 +148,6 @@ Set "sounds" to one of the following:
|
|||
void() func_plat =
|
||||
|
||||
{
|
||||
local entity t;
|
||||
|
||||
if (!self.t_length)
|
||||
self.t_length = 80;
|
||||
if (!self.t_width)
|
||||
|
|
|
@ -527,7 +527,7 @@ void() player_axpain4 = [ $axpain4, player_axpain5 ] {};
|
|||
void() player_axpain5 = [ $axpain5, player_axpain6 ] {};
|
||||
void() player_axpain6 = [ $axpain6, player_run ] {};
|
||||
|
||||
void() player_pain =
|
||||
void(entity attacker, float damage) player_pain =
|
||||
{
|
||||
if (self.weaponframe)
|
||||
return;
|
||||
|
|
|
@ -606,8 +606,6 @@ void(vector org) launch_shrapnel =
|
|||
|
||||
void() ShrapnelExplode =
|
||||
{
|
||||
local float n;
|
||||
|
||||
if (self.voided) {
|
||||
return;
|
||||
}
|
||||
|
@ -808,12 +806,12 @@ void() W_SecondTrigger =
|
|||
{
|
||||
//already primed
|
||||
if (self.prime_tshot == TRUE)
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
|
||||
//not enough ammo
|
||||
else if (self.ammo_shells < 3)
|
||||
{
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -833,12 +831,12 @@ void() W_SecondTrigger =
|
|||
{
|
||||
//already reloaded
|
||||
if (self.reload_rocket == 0)
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
|
||||
//if no rockets go away
|
||||
else if (self.ammo_rockets < 1)
|
||||
{
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -883,7 +881,7 @@ void() W_SecondTrigger =
|
|||
|
||||
}
|
||||
else
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
|
||||
// check for Super Shotgun second Trigger
|
||||
|
|
|
@ -291,7 +291,7 @@ void() colour_light =
|
|||
//Can be made active by use of a targetname
|
||||
//Must be triggered by touch
|
||||
|
||||
if((!self.targetname) || (!self.spawnflags & CLSTART_OFF))
|
||||
if((!self.targetname) || !(self.spawnflags & CLSTART_OFF))
|
||||
self.touch = colourlight_use;
|
||||
else
|
||||
{
|
||||
|
|
|
@ -226,8 +226,6 @@ void() trigger_secret =
|
|||
|
||||
void() counter_use =
|
||||
{
|
||||
local string junk;
|
||||
|
||||
self.count = self.count - 1;
|
||||
if (self.count < 0)
|
||||
return;
|
||||
|
|
|
@ -258,7 +258,7 @@ void () wall_killed =
|
|||
remove(self);
|
||||
};
|
||||
|
||||
void() wall_pain =
|
||||
void(entity attacker, float damage) wall_pain =
|
||||
{
|
||||
if(self.health > 0)
|
||||
self.health = self.max_health;
|
||||
|
|
|
@ -97,7 +97,6 @@ SpawnMeatSpray
|
|||
void(vector org, vector vel) SpawnMeatSpray =
|
||||
{
|
||||
local entity missile;
|
||||
local vector org;
|
||||
|
||||
missile = spawn ();
|
||||
missile.owner = self;
|
||||
|
@ -631,7 +630,6 @@ void() W_FireGrenade =
|
|||
|
||||
void() plasma_touch =
|
||||
{
|
||||
local float rand;
|
||||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
|
@ -694,7 +692,6 @@ void(vector org, vector dir) launch_plasma =
|
|||
void(float ox) W_FirePlasma =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
||||
|
@ -714,7 +711,6 @@ void(float ox) W_FirePlasma =
|
|||
//===========================================================================
|
||||
void() spike_touch =
|
||||
{
|
||||
local float rand;
|
||||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
|
@ -755,7 +751,6 @@ local float rand;
|
|||
|
||||
void() superspike_touch =
|
||||
{
|
||||
local float rand;
|
||||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
|
@ -828,7 +823,6 @@ void(vector org, vector dir) launch_spike =
|
|||
void(float ox) W_FireNails =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
||||
|
@ -849,7 +843,6 @@ void(float ox) W_FireNails =
|
|||
void() W_FireSuperSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
||||
self.attack_finished = time + 0.2;
|
||||
|
@ -867,7 +860,6 @@ void() W_FireSuperSpikes =
|
|||
void(float ox) W_FireSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
||||
|
@ -1157,7 +1149,7 @@ void() W_Attack =
|
|||
}
|
||||
else if (self.st_rocketload > time) // still reloading so do nothing
|
||||
{
|
||||
SUB_Null;
|
||||
SUB_Null ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1174,7 +1166,7 @@ W_ChangeWeapon
|
|||
*/
|
||||
void() W_ChangeWeapon =
|
||||
{
|
||||
local float it, am, fl;
|
||||
local float it, am, fl = 0;
|
||||
|
||||
it = self.items;
|
||||
am = 0;
|
||||
|
@ -1196,7 +1188,7 @@ void() W_ChangeWeapon =
|
|||
if (self.ammo_shells < 2)
|
||||
{
|
||||
am = 1;
|
||||
if (self.ammo_rockets > 0 && !deathmatch & DM_AUTOSWITCH) // allow player to select SuperShotgun if he has rockets
|
||||
if (self.ammo_rockets > 0 && !(deathmatch & DM_AUTOSWITCH)) // allow player to select SuperShotgun if he has rockets
|
||||
{
|
||||
self.which_ammo = 1; // tell W_SetCurrentAmmo to use rockets - not shells
|
||||
am = 0;
|
||||
|
@ -1295,7 +1287,7 @@ void() CycleWeaponCommand =
|
|||
if (self.ammo_shells < 2)
|
||||
{
|
||||
am = 1;
|
||||
if (self.ammo_rockets > 0 && !deathmatch & DM_AUTOSWITCH) // allow player to select SuperShotgun if he has rockets
|
||||
if (self.ammo_rockets > 0 && !(deathmatch & DM_AUTOSWITCH)) // allow player to select SuperShotgun if he has rockets
|
||||
{
|
||||
self.which_ammo = 1; // tell W_SetCurrentAmmo to use rockets - not shells
|
||||
am = 0;
|
||||
|
@ -1383,7 +1375,7 @@ void() CycleWeaponReverseCommand =
|
|||
if (self.ammo_shells < 2)
|
||||
{
|
||||
am = 1;
|
||||
if (self.ammo_rockets > 0 && !deathmatch & DM_AUTOSWITCH)
|
||||
if (self.ammo_rockets > 0 && !(deathmatch & DM_AUTOSWITCH))
|
||||
{
|
||||
self.which_ammo = 1; // tell W_SetCurrentAmmo to use rockets - not shells
|
||||
am = 0;
|
||||
|
|
|
@ -174,6 +174,8 @@ void() worldspawn =
|
|||
lastspawn = world;
|
||||
InitBodyQue ();
|
||||
|
||||
rj = 1;
|
||||
|
||||
// custom map attributes
|
||||
|
||||
if (self.model == "maps/e1m8.bsp")
|
||||
|
@ -431,8 +433,6 @@ void() bodyque =
|
|||
|
||||
void() InitBodyQue =
|
||||
{
|
||||
local entity e;
|
||||
|
||||
bodyque_head = spawn();
|
||||
bodyque_head.classname = "bodyque";
|
||||
bodyque_head.owner = spawn();
|
||||
|
|
Loading…
Reference in a new issue