mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 13:21:36 +00:00
most warnings fixed.
inventory system now works a bit better. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1761 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1ca0df774e
commit
b973799d06
27 changed files with 282 additions and 329 deletions
|
@ -34,7 +34,7 @@ walkmove(angle, speed) primitive is all or nothing
|
||||||
//
|
//
|
||||||
// globals
|
// globals
|
||||||
//
|
//
|
||||||
float current_yaw;
|
//float current_yaw;
|
||||||
|
|
||||||
//
|
//
|
||||||
// when a monster becomes angry at a player, that monster will be used
|
// when a monster becomes angry at a player, that monster will be used
|
||||||
|
@ -471,8 +471,6 @@ The monster is walking it's beat
|
||||||
*/
|
*/
|
||||||
void(float dist) ai_walk =
|
void(float dist) ai_walk =
|
||||||
{
|
{
|
||||||
local vector mtemp;
|
|
||||||
|
|
||||||
movedist = dist;
|
movedist = dist;
|
||||||
|
|
||||||
if (self.classname == "monster_dragon")
|
if (self.classname == "monster_dragon")
|
||||||
|
@ -674,10 +672,6 @@ The monster has an enemy it is trying to kill
|
||||||
*/
|
*/
|
||||||
void(float dist) ai_run =
|
void(float dist) ai_run =
|
||||||
{
|
{
|
||||||
local vector delta;
|
|
||||||
local float axis;
|
|
||||||
local float direct, ang_rint, ang_floor, ang_ceil;
|
|
||||||
|
|
||||||
movedist = dist;
|
movedist = dist;
|
||||||
// see if the enemy is dead
|
// see if the enemy is dead
|
||||||
if (self.enemy.health <= 0)
|
if (self.enemy.health <= 0)
|
||||||
|
|
|
@ -197,8 +197,6 @@ void() boss_death10 = [$death9, boss_death10]
|
||||||
|
|
||||||
void () LavaExplode =
|
void () LavaExplode =
|
||||||
{
|
{
|
||||||
local float r;
|
|
||||||
|
|
||||||
sound (self, CHAN_VOICE, "ambience/gunfire7.wav", 1, ATTN_NONE);
|
sound (self, CHAN_VOICE, "ambience/gunfire7.wav", 1, ATTN_NONE);
|
||||||
self.origin = (self.origin + '0 0 16');
|
self.origin = (self.origin + '0 0 16');
|
||||||
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
||||||
|
|
|
@ -85,8 +85,6 @@ When a button is touched, it moves some distance in the direction of it's angle,
|
||||||
*/
|
*/
|
||||||
void() func_button =
|
void() func_button =
|
||||||
{
|
{
|
||||||
local float gtemp, ftemp;
|
|
||||||
|
|
||||||
if (self.sounds == 0)
|
if (self.sounds == 0)
|
||||||
{
|
{
|
||||||
precache_sound ("buttons/airbut1.wav");
|
precache_sound ("buttons/airbut1.wav");
|
||||||
|
|
|
@ -285,8 +285,6 @@ void() execute_changelevel =
|
||||||
|
|
||||||
void() changelevel_touch =
|
void() changelevel_touch =
|
||||||
{
|
{
|
||||||
local entity pos;
|
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -381,13 +379,11 @@ Returns the entity to spawn at
|
||||||
*/
|
*/
|
||||||
entity() SelectSpawnPoint =
|
entity() SelectSpawnPoint =
|
||||||
{
|
{
|
||||||
local entity spot, newspot, thing;
|
local entity spot, thing;
|
||||||
local float numspots, totalspots;
|
local float numspots, totalspots;
|
||||||
local float rnum, pcount, xcount;
|
local float pcount;
|
||||||
local float rs, cooperate;
|
local entity spots;
|
||||||
local entity spots, ent2, xspot;
|
|
||||||
local string ent1;
|
local string ent1;
|
||||||
local vector warp, xdir, org;
|
|
||||||
|
|
||||||
numspots = 0;
|
numspots = 0;
|
||||||
totalspots = 0;
|
totalspots = 0;
|
||||||
|
@ -486,7 +482,6 @@ called each time a player enters a new level
|
||||||
void() PutClientInServer =
|
void() PutClientInServer =
|
||||||
{
|
{
|
||||||
local entity spot;
|
local entity spot;
|
||||||
local string s;
|
|
||||||
|
|
||||||
self.classname = "player";
|
self.classname = "player";
|
||||||
self.health = 100;
|
self.health = 100;
|
||||||
|
@ -703,7 +698,6 @@ go to the next level for deathmatch
|
||||||
void() NextLevel =
|
void() NextLevel =
|
||||||
{
|
{
|
||||||
local entity o;
|
local entity o;
|
||||||
local string newmap;
|
|
||||||
|
|
||||||
if (nextmap != "")
|
if (nextmap != "")
|
||||||
return; // already done
|
return; // already done
|
||||||
|
@ -838,7 +832,6 @@ void () LocateSpectatorTarget =
|
||||||
|
|
||||||
void() PlayerDeathThink =
|
void() PlayerDeathThink =
|
||||||
{
|
{
|
||||||
local entity old_self;
|
|
||||||
local float forward;
|
local float forward;
|
||||||
|
|
||||||
self.modelindex = modelindex_dead;
|
self.modelindex = modelindex_dead;
|
||||||
|
@ -882,8 +875,6 @@ void() PlayerDeathThink =
|
||||||
|
|
||||||
void() PlayerJump =
|
void() PlayerJump =
|
||||||
{
|
{
|
||||||
local vector start, end;
|
|
||||||
|
|
||||||
if (self.flags & FL_WATERJUMP)
|
if (self.flags & FL_WATERJUMP)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1047,8 +1038,6 @@ void () SpeedControl =
|
||||||
void() ArmorCheck =
|
void() ArmorCheck =
|
||||||
{
|
{
|
||||||
local float type;
|
local float type;
|
||||||
local float bit;
|
|
||||||
local float value;
|
|
||||||
|
|
||||||
local float aid;
|
local float aid;
|
||||||
|
|
||||||
|
@ -1135,8 +1124,6 @@ void () WeightControl =
|
||||||
|
|
||||||
void () PositionControl =
|
void () PositionControl =
|
||||||
{
|
{
|
||||||
local string img;
|
|
||||||
|
|
||||||
if (self.position == 0)
|
if (self.position == 0)
|
||||||
self.view_ofs = '0 0 22';
|
self.view_ofs = '0 0 22';
|
||||||
if (self.position == 1)
|
if (self.position == 1)
|
||||||
|
@ -1168,7 +1155,6 @@ Called every frame before physics are run
|
||||||
*/
|
*/
|
||||||
void() PlayerPreThink =
|
void() PlayerPreThink =
|
||||||
{
|
{
|
||||||
local float mspeed, aspeed;
|
|
||||||
local float r;
|
local float r;
|
||||||
|
|
||||||
if (intermission_running)
|
if (intermission_running)
|
||||||
|
@ -1514,9 +1500,6 @@ Called every frame after physics are run
|
||||||
*/
|
*/
|
||||||
void() PlayerPostThink =
|
void() PlayerPostThink =
|
||||||
{
|
{
|
||||||
local float mspeed, aspeed;
|
|
||||||
local float r;
|
|
||||||
|
|
||||||
//dprint ("post think\n");
|
//dprint ("post think\n");
|
||||||
if (self.view_ofs == '0 0 0')
|
if (self.view_ofs == '0 0 0')
|
||||||
return; // intermission or finale
|
return; // intermission or finale
|
||||||
|
@ -1624,7 +1607,6 @@ void(entity targ, entity attacker) ClientObituary =
|
||||||
{
|
{
|
||||||
local float rnum;
|
local float rnum;
|
||||||
local string deathstring, deathstring2;
|
local string deathstring, deathstring2;
|
||||||
local string s;
|
|
||||||
local string attackerteam, targteam;
|
local string attackerteam, targteam;
|
||||||
|
|
||||||
rnum = random();
|
rnum = random();
|
||||||
|
@ -1980,7 +1962,7 @@ void(entity targ, entity attacker) ClientObituary =
|
||||||
|
|
||||||
void() Identify =
|
void() Identify =
|
||||||
{
|
{
|
||||||
local string c1, c2, c3, c5, c6, c7;
|
local string c1, c2, c3, c5;
|
||||||
local float tmp;
|
local float tmp;
|
||||||
|
|
||||||
makevectors (self.v_angle);
|
makevectors (self.v_angle);
|
||||||
|
|
|
@ -5,7 +5,6 @@ string(float n) argv = #442;
|
||||||
float(string desc) itemtoslot =
|
float(string desc) itemtoslot =
|
||||||
{
|
{
|
||||||
local float slot;
|
local float slot;
|
||||||
local float iid;
|
|
||||||
slot = stof(desc);
|
slot = stof(desc);
|
||||||
if (slot >= 1 && slot <= MAXSLOTS)
|
if (slot >= 1 && slot <= MAXSLOTS)
|
||||||
return slot;
|
return slot;
|
||||||
|
@ -72,15 +71,6 @@ void(string arg1) Cmd_InvUse =
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iid == IID_CHEM_ADRENALINE ||
|
|
||||||
iid == IID_CHEM_PSYCHO ||
|
|
||||||
iid == IID_CHEM_BESERK)
|
|
||||||
{
|
|
||||||
if (UseBoostingChem(iid))
|
|
||||||
DecreaseDestroySlot(slotno);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iid == IID_BUILD_MRAMMO ||
|
if (iid == IID_BUILD_MRAMMO ||
|
||||||
iid == IID_BUILD_SHIELDGEN ||
|
iid == IID_BUILD_SHIELDGEN ||
|
||||||
iid == IID_BUILD_AUTODOC ||
|
iid == IID_BUILD_AUTODOC ||
|
||||||
|
@ -161,6 +151,9 @@ void(string arg1, float iid, float num) Cmd_InvGive =
|
||||||
if (num <= 0)
|
if (num <= 0)
|
||||||
num = 1;
|
num = 1;
|
||||||
SetItemSlot(self, slotno, SlotVal(iid, num));
|
SetItemSlot(self, slotno, SlotVal(iid, num));
|
||||||
|
|
||||||
|
if (slotno == self.current_slot)
|
||||||
|
W_SetCurrentAmmo();
|
||||||
};
|
};
|
||||||
|
|
||||||
void(string line) SV_ParseClientCommand =
|
void(string line) SV_ParseClientCommand =
|
||||||
|
|
|
@ -114,11 +114,9 @@ This should be the only function that ever reduces health.
|
||||||
|
|
||||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||||
{
|
{
|
||||||
local vector dir;
|
|
||||||
local entity oldself;
|
local entity oldself;
|
||||||
local float save;
|
local float save;
|
||||||
local float take, severity, helm;
|
local float take, severity, helm;
|
||||||
local string s;
|
|
||||||
local string attackerteam, targteam;
|
local string attackerteam, targteam;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,17 +2,109 @@ void bprint(float plev, string st, string s2){}
|
||||||
float PRINT_MEDIUM = 1;
|
float PRINT_MEDIUM = 1;
|
||||||
#include "/../inventory.qc"
|
#include "/../inventory.qc"
|
||||||
|
|
||||||
|
float show_inventory;
|
||||||
|
|
||||||
|
vector mousepos;
|
||||||
|
|
||||||
|
float showcontextmenu;
|
||||||
|
vector contextpos;
|
||||||
|
float slotnum;
|
||||||
|
|
||||||
|
vector toppos = '0 32 0';
|
||||||
|
|
||||||
|
float k_mouse1;
|
||||||
|
|
||||||
void() Invent_Draw =
|
void() Invent_Draw =
|
||||||
{
|
{
|
||||||
local float i;
|
local float i;
|
||||||
local float it;
|
local float it;
|
||||||
local string itname;
|
local string itname;
|
||||||
|
local float op;
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
it = getstati(32+i);
|
it = getstati(32+i);
|
||||||
itname = GetItemName(ToIID(it));
|
itname = GetItemName(ToIID(it));
|
||||||
drawstring('0 32 0' + (i * '0 8 0'), strcat(itname, " (", ftos(ToStatus(it)), ")"), '8 8 0', '1 1 1', 1);
|
drawstring(toppos + (i * '0 8 0'), strcat(itname, " (", ftos(ToStatus(it)), ")"), '8 8 0', '1 1 1', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showcontextmenu)
|
||||||
|
{
|
||||||
|
op = floor((mousepos_y - contextpos_y)/8);
|
||||||
|
drawfill(contextpos - '8 8 0', '88 24 0'+'16 16 0', '0 0 0', 0.7);
|
||||||
|
drawstring(contextpos + (0 * '0 8 0'), "Use/Reload", '8 8 0', '1 1 0' + (op!=0)*'0 0 1', 1);
|
||||||
|
drawstring(contextpos + (1 * '0 8 0'), "Put In Hand", '8 8 0', '1 1 0' + (op!=1)*'0 0 1', 1);
|
||||||
|
drawstring(contextpos + (2 * '0 8 0'), "Drop", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
slotnum = floor((mousepos_y - toppos_y)/8) + 1;
|
||||||
|
|
||||||
|
|
||||||
|
drawfill(mousepos, '8 8 0', '0 0 0', 0.7);
|
||||||
|
drawstring(mousepos, "^", '8 8 0', '1 1 1', 1);
|
||||||
|
// drawpic(mousepos, "gui/cursor.jpg", '32 32 0', '1 1 1', 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
|
{
|
||||||
|
local float op;
|
||||||
|
if (eventtype == 0)
|
||||||
|
{
|
||||||
|
if (param1 == 'i')
|
||||||
|
show_inventory = !show_inventory;
|
||||||
|
else if (!show_inventory)
|
||||||
|
return false;
|
||||||
|
else if (param1 == k_mouse1)
|
||||||
|
{
|
||||||
|
if (showcontextmenu)
|
||||||
|
{
|
||||||
|
op = floor((mousepos_y - contextpos_y)/8);
|
||||||
|
|
||||||
|
if (op == 0)
|
||||||
|
localcmd(strcat("cmd invuse ", ftos(slotnum), "\n"));
|
||||||
|
else if (op == 1)
|
||||||
|
localcmd(strcat("cmd invswap 1 ", ftos(slotnum), "\nimpulse 1\n"));
|
||||||
|
else if (op == 2)
|
||||||
|
localcmd(strcat("cmd invdrop ", ftos(slotnum), "\n"));
|
||||||
|
|
||||||
|
|
||||||
|
showcontextmenu = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (slotnum >= 1 && slotnum <= MAXSLOTS)
|
||||||
|
{
|
||||||
|
if (getstati(32+slotnum-1) != 0)
|
||||||
|
{
|
||||||
|
showcontextmenu = true;
|
||||||
|
contextpos = mousepos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
show_inventory = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (eventtype == 2 && show_inventory) //mouse
|
||||||
|
{
|
||||||
|
mousepos_x += param1;
|
||||||
|
mousepos_y += param2;
|
||||||
|
|
||||||
|
if (mousepos_x < 0)
|
||||||
|
mousepos_x = 0;
|
||||||
|
if (mousepos_y < 0)
|
||||||
|
mousepos_y = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
void() FigureOutButtons =
|
||||||
|
{
|
||||||
|
k_mouse1 = stringtokeynum("K_MOUSE1");
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,6 +36,9 @@ void() CSQC_Init =
|
||||||
viewentity.predraw = DoThatViewModelThing;
|
viewentity.predraw = DoThatViewModelThing;
|
||||||
viewentity.drawmask = MASK_NORMAL;
|
viewentity.drawmask = MASK_NORMAL;
|
||||||
viewentity.renderflags = RF_VIEWMODEL | RF_DEPTHHACK;
|
viewentity.renderflags = RF_VIEWMODEL | RF_DEPTHHACK;
|
||||||
|
|
||||||
|
|
||||||
|
FigureOutButtons();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,5 +76,6 @@ void(float do2d) CSQC_UpdateView =
|
||||||
// if (usehud)
|
// if (usehud)
|
||||||
// Hud_Draw();
|
// Hud_Draw();
|
||||||
|
|
||||||
Invent_Draw();
|
if (show_inventory)
|
||||||
|
Invent_Draw();
|
||||||
};
|
};
|
|
@ -461,7 +461,7 @@ float MULTICAST_PVS_R = 5; // within sight, reliable
|
||||||
float movedist;
|
float movedist;
|
||||||
|
|
||||||
string string_null; // null string, nothing should be held here
|
string string_null; // null string, nothing should be held here
|
||||||
float empty_float;
|
//float empty_float;
|
||||||
|
|
||||||
entity activator; // the entity that activated a trigger or brush
|
entity activator; // the entity that activated a trigger or brush
|
||||||
|
|
||||||
|
@ -485,7 +485,7 @@ float no_connect;
|
||||||
//
|
//
|
||||||
// world fields (FIXME: make globals)
|
// world fields (FIXME: make globals)
|
||||||
//
|
//
|
||||||
.string wad;
|
noref .string wad;
|
||||||
.string map;
|
.string map;
|
||||||
.float worldtype; // 0=medieval 1=metal 2=base
|
.float worldtype; // 0=medieval 1=metal 2=base
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ float no_connect;
|
||||||
//
|
//
|
||||||
// quakeed fields
|
// quakeed fields
|
||||||
//
|
//
|
||||||
.float light_lev; // not used by game, but parsed by light util
|
noref .float light_lev; // not used by game, but parsed by light util
|
||||||
.float style;
|
.float style;
|
||||||
|
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ float AS_MISSILE = 4;
|
||||||
|
|
||||||
// Zoid Additions
|
// Zoid Additions
|
||||||
.float maxspeed; // Used to set Maxspeed on a player
|
.float maxspeed; // Used to set Maxspeed on a player
|
||||||
.float gravity; // Gravity Multiplier (0 to 1.0)
|
//.float gravity; // Gravity Multiplier (0 to 1.0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -577,16 +577,16 @@ float red_armor;
|
||||||
.float dtime;
|
.float dtime;
|
||||||
.float active;
|
.float active;
|
||||||
.float class;
|
.float class;
|
||||||
.float vote1;
|
//.float vote1;
|
||||||
.float vote2;
|
//.float vote2;
|
||||||
.float vote3;
|
//.float vote3;
|
||||||
.float vote4;
|
//.float vote4;
|
||||||
.float vote5;
|
//.float vote5;
|
||||||
.float vote6;
|
//.float vote6;
|
||||||
.float vote7;
|
//.float vote7;
|
||||||
.float override;
|
//.float override;
|
||||||
.entity track;
|
.entity track;
|
||||||
.float recharge;
|
//.float recharge;
|
||||||
.float processed;
|
.float processed;
|
||||||
.float current_slot;
|
.float current_slot;
|
||||||
.float attack;
|
.float attack;
|
||||||
|
@ -604,10 +604,10 @@ float red_armor;
|
||||||
.float pcamera;
|
.float pcamera;
|
||||||
.float pcamera2;
|
.float pcamera2;
|
||||||
.float equipment_state;
|
.float equipment_state;
|
||||||
.float select;
|
//.float select;
|
||||||
.float grenade_hold;
|
//.float grenade_hold;
|
||||||
.float grab;
|
.float grab;
|
||||||
.float vehicle;
|
//.float vehicle;
|
||||||
|
|
||||||
.float weight;
|
.float weight;
|
||||||
.float max_weight;
|
.float max_weight;
|
||||||
|
@ -619,13 +619,13 @@ float red_armor;
|
||||||
.float scraps;
|
.float scraps;
|
||||||
.float cycle1;
|
.float cycle1;
|
||||||
.float cycle2;
|
.float cycle2;
|
||||||
.float c4;
|
//.float c4;
|
||||||
.float trait;
|
.float trait;
|
||||||
.float protect;
|
.float protect;
|
||||||
.float perk;
|
.float perk;
|
||||||
.float equipment;
|
.float equipment;
|
||||||
.float buildtype;
|
.float buildtype;
|
||||||
.float ctimer;
|
//.float ctimer;
|
||||||
.float flash;
|
.float flash;
|
||||||
.float oldteam;
|
.float oldteam;
|
||||||
.float dead;
|
.float dead;
|
||||||
|
@ -636,7 +636,7 @@ float red_armor;
|
||||||
.string armornoise;
|
.string armornoise;
|
||||||
.string ammotype1;
|
.string ammotype1;
|
||||||
.string ammotype2;
|
.string ammotype2;
|
||||||
.string deathsound;
|
//.string deathsound;
|
||||||
.string currentmenu;
|
.string currentmenu;
|
||||||
|
|
||||||
.entity friend;
|
.entity friend;
|
||||||
|
@ -657,7 +657,8 @@ float red_armor;
|
||||||
//
|
//
|
||||||
// doors, etc
|
// doors, etc
|
||||||
//
|
//
|
||||||
.vector dest, dest1, dest2;
|
//.vector dest;
|
||||||
|
.vector dest1, dest2;
|
||||||
.float wait; // time from firing to restarting
|
.float wait; // time from firing to restarting
|
||||||
.float delay; // time from activation to firing
|
.float delay; // time from activation to firing
|
||||||
.entity trigger_field; // door's trigger entity
|
.entity trigger_field; // door's trigger entity
|
||||||
|
@ -704,9 +705,10 @@ float red_armor;
|
||||||
//
|
//
|
||||||
// sounds
|
// sounds
|
||||||
//
|
//
|
||||||
.float waitmin, waitmax;
|
.float waitmin;
|
||||||
.float distance;
|
//.float waitmax;
|
||||||
.float volume;
|
//.float distance;
|
||||||
|
//.float volume;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -820,6 +822,9 @@ float(string s) stof = #81; // convert strin
|
||||||
void(vector where, float set) multicast = #82; // sends the temp message to a set
|
void(vector where, float set) multicast = #82; // sends the temp message to a set
|
||||||
// of clients, possibly in PVS or PHS
|
// of clients, possibly in PVS or PHS
|
||||||
|
|
||||||
|
|
||||||
|
string(...) strcat = #115;
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -294,8 +294,6 @@ float() CheckDemonJump =
|
||||||
|
|
||||||
float() DemonCheckAttack =
|
float() DemonCheckAttack =
|
||||||
{
|
{
|
||||||
local vector vec;
|
|
||||||
|
|
||||||
// if close enough for slashing, go for it
|
// if close enough for slashing, go for it
|
||||||
if (CheckDemonMelee ())
|
if (CheckDemonMelee ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -341,7 +341,6 @@ void () woof_pain =
|
||||||
void (vector stuff) spawn_live_dog =
|
void (vector stuff) spawn_live_dog =
|
||||||
{
|
{
|
||||||
local entity dog;
|
local entity dog;
|
||||||
local entity te;
|
|
||||||
|
|
||||||
dog = spawn ();
|
dog = spawn ();
|
||||||
dog.origin = stuff;
|
dog.origin = stuff;
|
||||||
|
@ -435,8 +434,6 @@ float() CheckDogJump =
|
||||||
|
|
||||||
float() DogCheckAttack =
|
float() DogCheckAttack =
|
||||||
{
|
{
|
||||||
local vector vec;
|
|
||||||
|
|
||||||
// if close enough for slashing, go for it
|
// if close enough for slashing, go for it
|
||||||
if (CheckDogMelee ())
|
if (CheckDogMelee ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,7 +157,6 @@ void () door_killed =
|
||||||
void () OpenDoorBeep =
|
void () OpenDoorBeep =
|
||||||
{
|
{
|
||||||
local float r;
|
local float r;
|
||||||
local string stuff;
|
|
||||||
|
|
||||||
r = range (self.enemy);
|
r = range (self.enemy);
|
||||||
|
|
||||||
|
@ -191,7 +190,7 @@ void () OpenDoorBeep =
|
||||||
|
|
||||||
void (entity portal, entity toucher) SpawnOpenDoor =
|
void (entity portal, entity toucher) SpawnOpenDoor =
|
||||||
{
|
{
|
||||||
local entity open, oself;
|
local entity open;
|
||||||
|
|
||||||
open = spawn();
|
open = spawn();
|
||||||
setorigin (open, toucher.origin + '0 0 48');
|
setorigin (open, toucher.origin + '0 0 48');
|
||||||
|
@ -206,9 +205,6 @@ void (entity portal, entity toucher) SpawnOpenDoor =
|
||||||
|
|
||||||
void () door_touch =
|
void () door_touch =
|
||||||
{
|
{
|
||||||
local float x;
|
|
||||||
local string stuff;
|
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -60,14 +60,7 @@ void (float tmp, float dam) enforcer_single =
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local vector direction;
|
local vector direction;
|
||||||
local entity en;
|
local entity en;
|
||||||
local float r;
|
|
||||||
local vector targ;
|
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local float zdif;
|
|
||||||
local float ydif;
|
|
||||||
local float xdif;
|
|
||||||
local float true;
|
|
||||||
|
|
||||||
if (self.enemy.sneak == 1)
|
if (self.enemy.sneak == 1)
|
||||||
tmp = tmp * 2;
|
tmp = tmp * 2;
|
||||||
|
|
|
@ -287,7 +287,6 @@ float() ShamCheckAttack =
|
||||||
{
|
{
|
||||||
local vector spot1, spot2;
|
local vector spot1, spot2;
|
||||||
local entity targ;
|
local entity targ;
|
||||||
local float chance;
|
|
||||||
|
|
||||||
if (enemy_range == RANGE_MELEE)
|
if (enemy_range == RANGE_MELEE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -122,7 +122,6 @@ void () hos_deatha5 = [ 10, hos_deatha5 ]
|
||||||
|
|
||||||
void (float xx) hos_forward =
|
void (float xx) hos_forward =
|
||||||
{
|
{
|
||||||
local vector dir;
|
|
||||||
local float rng;
|
local float rng;
|
||||||
local entity te;
|
local entity te;
|
||||||
local string qqq;
|
local string qqq;
|
||||||
|
|
|
@ -72,6 +72,7 @@ float IID_ARM_FORCE = 207;
|
||||||
float IID_ARM_LPOWER = 208;
|
float IID_ARM_LPOWER = 208;
|
||||||
|
|
||||||
//stims
|
//stims
|
||||||
|
#define IsChem(iid) (iid >= IID_CHEM_STIMPACK && iid <= IID_CHEM_BESERK)
|
||||||
float IID_CHEM_STIMPACK = 301;
|
float IID_CHEM_STIMPACK = 301;
|
||||||
float IID_CHEM_MEDICALBAG = 302;
|
float IID_CHEM_MEDICALBAG = 302;
|
||||||
float IID_CHEM_SUPERSTIM = 303;
|
float IID_CHEM_SUPERSTIM = 303;
|
||||||
|
@ -351,6 +352,84 @@ string(float iid) GetItemVModel =
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
string(float iid) GetItemWModel =
|
||||||
|
{
|
||||||
|
if (iid == IID_WP_KNIFE)
|
||||||
|
return "progs/w_knife.mdl";
|
||||||
|
if (iid == IID_WP_AXE)
|
||||||
|
return "progs/w_knife.mdl";
|
||||||
|
if (iid == IID_WP_VIBROBLADE)
|
||||||
|
return "progs/w_axe.mdl";
|
||||||
|
if (iid == IID_WP_POWERAXE)
|
||||||
|
return "progs/w_axe.mdl";
|
||||||
|
|
||||||
|
if (iid == IID_WP_USP)
|
||||||
|
return "progs/w_1911.mdl";
|
||||||
|
if (iid == IID_WP_DEAGLE)
|
||||||
|
return "progs/w_deagle.mdl";
|
||||||
|
if (iid == IID_WP_NEEDLER)
|
||||||
|
return "progs/w_1911.mdl";
|
||||||
|
if (iid == IID_WP_ALIENBLASTER)
|
||||||
|
return "progs/w_alien.mdl";
|
||||||
|
if (iid == IID_WP_PIPERIFLE)
|
||||||
|
return "progs/w_pipe.mdl";
|
||||||
|
if (iid == IID_WP_WINCHESTER)
|
||||||
|
return "progs/w_shotgun.mdl";
|
||||||
|
if (iid == IID_WP_MOSSBERG)
|
||||||
|
return "progs/w_pipe.mdl";
|
||||||
|
if (iid == IID_WP_JACKHAMMER)
|
||||||
|
return "progs/w_jackhammer.mdl";
|
||||||
|
|
||||||
|
if (iid == IID_WP_MP9)
|
||||||
|
return "progs/w_mp9.mdl";
|
||||||
|
if (iid == IID_WP_MP7)
|
||||||
|
return "progs/w_mp7.mdl";
|
||||||
|
if (iid == IID_WP_RANGERMASTER)
|
||||||
|
return "progs/w_rangem.mdl";
|
||||||
|
if (iid == IID_WP_AK112)
|
||||||
|
return "progs/w_ak47.mdl";
|
||||||
|
if (iid == IID_WP_AK74)
|
||||||
|
return "progs/w_ak47.mdl";
|
||||||
|
if (iid == IID_WP_DKS1)
|
||||||
|
return "progs/w_srifle.mdl";
|
||||||
|
if (iid == IID_WP_MOONLIGHT)
|
||||||
|
return "progs/w_night.mdl";
|
||||||
|
if (iid == IID_WP_SA80)
|
||||||
|
return "progs/w_sa80.mdl";
|
||||||
|
|
||||||
|
if (iid == IID_WP_GAUSERIFLE)
|
||||||
|
return "progs/w_gauss.mdl";
|
||||||
|
if (iid == IID_WP_PULSERIFLE)
|
||||||
|
return "progs/w_carbine.mdl";
|
||||||
|
|
||||||
|
if (iid == IID_GREN_FRAG)
|
||||||
|
return "progs/grenade2.mdl";
|
||||||
|
if (iid == IID_GREN_EMP)
|
||||||
|
return "progs/grenade2.mdl";
|
||||||
|
if (iid == IID_GREN_SMOKE)
|
||||||
|
return "progs/grenade2.mdl";
|
||||||
|
if (iid == IID_GREN_FLASH)
|
||||||
|
return "progs/grenade2.mdl";
|
||||||
|
|
||||||
|
if (iid == IID_CHEM_STIMPACK)
|
||||||
|
return "maps/b_bh10.bsp";
|
||||||
|
if (iid == IID_CHEM_MEDICALBAG)
|
||||||
|
return "maps/b_bh25.bsp";
|
||||||
|
if (iid == IID_CHEM_SUPERSTIM)
|
||||||
|
return "maps/b_bh100.bsp";
|
||||||
|
|
||||||
|
//fixme
|
||||||
|
if (iid == IID_CHEM_ADRENALINE)
|
||||||
|
return "maps/b_bh10.bsp";
|
||||||
|
if (iid == IID_CHEM_PSYCHO)
|
||||||
|
return "maps/b_bh25.bsp";
|
||||||
|
if (iid == IID_CHEM_BESERK)
|
||||||
|
return "maps/b_bh100.bsp";
|
||||||
|
|
||||||
|
|
||||||
|
return "progs/s_light.spr"; //no model. :/
|
||||||
|
};
|
||||||
|
|
||||||
float(float iid) WeaponAmmoType =
|
float(float iid) WeaponAmmoType =
|
||||||
{
|
{
|
||||||
if (iid == IID_WP_USP)
|
if (iid == IID_WP_USP)
|
||||||
|
|
|
@ -28,8 +28,6 @@ void() q_touch;
|
||||||
|
|
||||||
void() q_touch =
|
void() q_touch =
|
||||||
{
|
{
|
||||||
local entity stemp;
|
|
||||||
local float best;
|
|
||||||
local string s;
|
local string s;
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
|
@ -98,8 +96,6 @@ void() r_touch;
|
||||||
|
|
||||||
void() r_touch =
|
void() r_touch =
|
||||||
{
|
{
|
||||||
local entity stemp;
|
|
||||||
local float best;
|
|
||||||
local string s;
|
local string s;
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
|
@ -307,9 +303,6 @@ float (entity to, float iid, float quant) TryGiveStackable =
|
||||||
|
|
||||||
void () health_touch =
|
void () health_touch =
|
||||||
{
|
{
|
||||||
local float amount;
|
|
||||||
local string s;
|
|
||||||
|
|
||||||
if (other.classname != "player" || other.ghost != 0)
|
if (other.classname != "player" || other.ghost != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1087,9 +1080,6 @@ KEYS
|
||||||
|
|
||||||
void() key_touch =
|
void() key_touch =
|
||||||
{
|
{
|
||||||
local entity stemp;
|
|
||||||
local float best;
|
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
return;
|
return;
|
||||||
if (other.health <= 0)
|
if (other.health <= 0)
|
||||||
|
@ -1220,9 +1210,6 @@ END OF LEVEL RUNES
|
||||||
|
|
||||||
void() sigil_touch =
|
void() sigil_touch =
|
||||||
{
|
{
|
||||||
local entity stemp;
|
|
||||||
local float best;
|
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
return;
|
return;
|
||||||
if (other.health <= 0)
|
if (other.health <= 0)
|
||||||
|
@ -1293,9 +1280,6 @@ void() powerup_touch;
|
||||||
|
|
||||||
void() powerup_touch =
|
void() powerup_touch =
|
||||||
{
|
{
|
||||||
local entity stemp;
|
|
||||||
local float best;
|
|
||||||
|
|
||||||
if (other.classname != "player")
|
if (other.classname != "player")
|
||||||
return;
|
return;
|
||||||
if (other.health <= 0)
|
if (other.health <= 0)
|
||||||
|
|
|
@ -500,7 +500,6 @@ void() bubble_remove =
|
||||||
void() bubble_bob =
|
void() bubble_bob =
|
||||||
{
|
{
|
||||||
local float rnd1, rnd2, rnd3;
|
local float rnd1, rnd2, rnd3;
|
||||||
local vector vtmp1, modi;
|
|
||||||
|
|
||||||
self.cnt = self.cnt + 1;
|
self.cnt = self.cnt + 1;
|
||||||
if (self.cnt == 4)
|
if (self.cnt == 4)
|
||||||
|
|
|
@ -48,8 +48,6 @@ enemy as activator.
|
||||||
*/
|
*/
|
||||||
void() monster_death_use =
|
void() monster_death_use =
|
||||||
{
|
{
|
||||||
local entity ent, otemp, stemp;
|
|
||||||
|
|
||||||
// fall to ground
|
// fall to ground
|
||||||
if (self.flags & FL_FLY)
|
if (self.flags & FL_FLY)
|
||||||
self.flags = self.flags - FL_FLY;
|
self.flags = self.flags - FL_FLY;
|
||||||
|
@ -68,9 +66,6 @@ void() monster_death_use =
|
||||||
|
|
||||||
void() walkmonster_start_go =
|
void() walkmonster_start_go =
|
||||||
{
|
{
|
||||||
local string stemp;
|
|
||||||
local entity etemp;
|
|
||||||
|
|
||||||
self.origin_z = self.origin_z + 1; // raise off floor a bit
|
self.origin_z = self.origin_z + 1; // raise off floor a bit
|
||||||
droptofloor();
|
droptofloor();
|
||||||
|
|
||||||
|
|
|
@ -634,8 +634,6 @@ void () ogre_paine15 = [ 111, ogre_run1 ]
|
||||||
|
|
||||||
void (entity attacker, float damage) ogre_pain =
|
void (entity attacker, float damage) ogre_pain =
|
||||||
{
|
{
|
||||||
local float r;
|
|
||||||
|
|
||||||
if (self.pain_finished > time)
|
if (self.pain_finished > time)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -800,7 +798,6 @@ void () mutant_pain =
|
||||||
void (vector stuff, vector ang) spawn_live_ogre =
|
void (vector stuff, vector ang) spawn_live_ogre =
|
||||||
{
|
{
|
||||||
local entity ogre;
|
local entity ogre;
|
||||||
local entity te;
|
|
||||||
|
|
||||||
ogre = spawn ();
|
ogre = spawn ();
|
||||||
ogre.origin = stuff;
|
ogre.origin = stuff;
|
||||||
|
@ -823,9 +820,6 @@ void (vector stuff, vector ang) spawn_live_ogre =
|
||||||
|
|
||||||
void () ogre_die =
|
void () ogre_die =
|
||||||
{
|
{
|
||||||
local string attack_total;
|
|
||||||
local string damage_total;
|
|
||||||
|
|
||||||
if (self.enemy.classname == "player")
|
if (self.enemy.classname == "player")
|
||||||
self.enemy.frags = self.enemy.frags + 1;
|
self.enemy.frags = self.enemy.frags + 1;
|
||||||
|
|
||||||
|
|
|
@ -146,10 +146,7 @@ Set "sounds" to one of the following:
|
||||||
|
|
||||||
|
|
||||||
void() func_plat =
|
void() func_plat =
|
||||||
|
|
||||||
{
|
{
|
||||||
local entity t;
|
|
||||||
|
|
||||||
if (!self.t_length)
|
if (!self.t_length)
|
||||||
self.t_length = 80;
|
self.t_length = 80;
|
||||||
if (!self.t_width)
|
if (!self.t_width)
|
||||||
|
|
|
@ -146,8 +146,6 @@ void () player_climb = [ 23, player_run ]
|
||||||
|
|
||||||
void () player_run = [ 137, player_run ]
|
void () player_run = [ 137, player_run ]
|
||||||
{
|
{
|
||||||
local float crap;
|
|
||||||
|
|
||||||
if (self.rtime < time)
|
if (self.rtime < time)
|
||||||
self.weaponframe = 0;
|
self.weaponframe = 0;
|
||||||
|
|
||||||
|
@ -687,7 +685,7 @@ void () player_knife1 = [ 155, player_knife2 ]
|
||||||
void () player_knife2 = [ 156, player_knife3 ]
|
void () player_knife2 = [ 156, player_knife3 ]
|
||||||
{
|
{
|
||||||
self.weaponframe = WEAPON_ROCKET;
|
self.weaponframe = WEAPON_ROCKET;
|
||||||
FireMelee ();
|
W_FireMelee ();
|
||||||
};
|
};
|
||||||
|
|
||||||
void () player_knife3 = [ 157, player_run ]
|
void () player_knife3 = [ 157, player_run ]
|
||||||
|
@ -703,7 +701,7 @@ void () player_knifea = [ 155, player_knifeb ]
|
||||||
void () player_knifeb = [ 156, player_knifec ]
|
void () player_knifeb = [ 156, player_knifec ]
|
||||||
{
|
{
|
||||||
self.weaponframe = MULTICAST_PVS_R;
|
self.weaponframe = MULTICAST_PVS_R;
|
||||||
FireMelee ();
|
W_FireMelee ();
|
||||||
};
|
};
|
||||||
|
|
||||||
void () player_knifec = [ 157, player_run ]
|
void () player_knifec = [ 157, player_run ]
|
||||||
|
@ -796,8 +794,6 @@ void (float num_bubbles) DeathBubbles;
|
||||||
|
|
||||||
void () PainSound =
|
void () PainSound =
|
||||||
{
|
{
|
||||||
local float rs;
|
|
||||||
|
|
||||||
if ((self.equipment == 8))
|
if ((self.equipment == 8))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -953,7 +949,6 @@ void (float num_bubbles) DeathBubbles =
|
||||||
|
|
||||||
void () DeathSound =
|
void () DeathSound =
|
||||||
{
|
{
|
||||||
local float rs;
|
|
||||||
local float r;
|
local float r;
|
||||||
|
|
||||||
if ((self.equipment == 8))
|
if ((self.equipment == 8))
|
||||||
|
@ -1068,8 +1063,6 @@ void () SmokeBob2 =
|
||||||
local float rnd1;
|
local float rnd1;
|
||||||
local float rnd2;
|
local float rnd2;
|
||||||
local float rnd3;
|
local float rnd3;
|
||||||
local vector vtmp1;
|
|
||||||
local vector modi;
|
|
||||||
|
|
||||||
self.cnt = (self.cnt + WEAPON_SHOTGUN);
|
self.cnt = (self.cnt + WEAPON_SHOTGUN);
|
||||||
if ((self.cnt >= (WEAPON_ROCKET + (random () * AS_MELEE))))
|
if ((self.cnt >= (WEAPON_ROCKET + (random () * AS_MELEE))))
|
||||||
|
|
|
@ -11,14 +11,7 @@ void (float tmp, float dam) army_fire =
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local vector direction;
|
local vector direction;
|
||||||
local entity en;
|
local entity en;
|
||||||
local float r;
|
|
||||||
local vector targ;
|
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local float zdif;
|
|
||||||
local float ydif;
|
|
||||||
local float xdif;
|
|
||||||
local float true;
|
|
||||||
|
|
||||||
if (self.enemy.sneak == 1)
|
if (self.enemy.sneak == 1)
|
||||||
tmp = tmp * 2;
|
tmp = tmp * 2;
|
||||||
|
@ -79,14 +72,7 @@ void (float tmp, float dam) army_fire1 =
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local vector direction;
|
local vector direction;
|
||||||
local entity en;
|
local entity en;
|
||||||
local float r;
|
|
||||||
local vector targ;
|
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local float zdif;
|
|
||||||
local float ydif;
|
|
||||||
local float xdif;
|
|
||||||
local float true;
|
|
||||||
|
|
||||||
if (self.enemy.sneak == 1)
|
if (self.enemy.sneak == 1)
|
||||||
tmp = tmp * 2;
|
tmp = tmp * 2;
|
||||||
|
@ -146,13 +132,9 @@ void (float tmp, float dam) army_fire2 =
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local vector direction;
|
local vector direction;
|
||||||
local entity en;
|
local entity en;
|
||||||
local float r;
|
|
||||||
local vector targ;
|
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local float var_u, var_r, var_o;
|
local float var_u, var_r, var_o;
|
||||||
local float shot;
|
local float shot;
|
||||||
local float dif;
|
|
||||||
|
|
||||||
if (self.enemy.sneak == 1)
|
if (self.enemy.sneak == 1)
|
||||||
tmp = tmp * 2;
|
tmp = tmp * 2;
|
||||||
|
@ -245,14 +227,7 @@ void (float tmp, float dam) army_fire3 =
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local vector direction;
|
local vector direction;
|
||||||
local entity en;
|
local entity en;
|
||||||
local float r;
|
|
||||||
local vector targ;
|
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local float zdif;
|
|
||||||
local float ydif;
|
|
||||||
local float xdif;
|
|
||||||
local float true;
|
|
||||||
|
|
||||||
if (self.mag1 == 0)
|
if (self.mag1 == 0)
|
||||||
{
|
{
|
||||||
|
@ -309,15 +284,7 @@ void (float tmp, float dam) army_fire4 =
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local vector direction;
|
local vector direction;
|
||||||
local entity en;
|
local entity en;
|
||||||
local float r;
|
|
||||||
local vector targ;
|
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local float zdif;
|
|
||||||
local float ydif;
|
|
||||||
local float xdif;
|
|
||||||
local float true;
|
|
||||||
local float shot_num;
|
|
||||||
|
|
||||||
if (self.mag1 == 0)
|
if (self.mag1 == 0)
|
||||||
{
|
{
|
||||||
|
@ -773,8 +740,6 @@ void () army_atkcs4 = [ 84, army_atkcs5 ]
|
||||||
|
|
||||||
void () army_atkcs5 = [ 85, army_atkcs6 ]
|
void () army_atkcs5 = [ 85, army_atkcs6 ]
|
||||||
{
|
{
|
||||||
local float r;
|
|
||||||
|
|
||||||
ai_face ();
|
ai_face ();
|
||||||
sound (self, CHAN_WEAPON, "weapons/ak112.wav", PLAT_LOW_TRIGGER, ATTN_NORM);
|
sound (self, CHAN_WEAPON, "weapons/ak112.wav", PLAT_LOW_TRIGGER, ATTN_NORM);
|
||||||
army_fire4 (100, 16);
|
army_fire4 (100, 16);
|
||||||
|
@ -1260,7 +1225,6 @@ void () grunt_pain =
|
||||||
void (vector stuff, vector ang) spawn_live_grunt =
|
void (vector stuff, vector ang) spawn_live_grunt =
|
||||||
{
|
{
|
||||||
local entity grunt;
|
local entity grunt;
|
||||||
local entity te;
|
|
||||||
|
|
||||||
grunt = spawn ();
|
grunt = spawn ();
|
||||||
grunt.origin = stuff;
|
grunt.origin = stuff;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
entity stemp, otemp, s, old;
|
//entity s;
|
||||||
|
|
||||||
|
|
||||||
void() trigger_reactivate =
|
void() trigger_reactivate =
|
||||||
|
@ -221,8 +221,6 @@ void() trigger_secret =
|
||||||
|
|
||||||
void() counter_use =
|
void() counter_use =
|
||||||
{
|
{
|
||||||
local string junk;
|
|
||||||
|
|
||||||
self.count = self.count - 1;
|
self.count = self.count - 1;
|
||||||
if (self.count < 0)
|
if (self.count < 0)
|
||||||
return;
|
return;
|
||||||
|
@ -302,6 +300,7 @@ void() play_teleport =
|
||||||
|
|
||||||
void(vector org) spawn_tfog =
|
void(vector org) spawn_tfog =
|
||||||
{
|
{
|
||||||
|
local entity s;
|
||||||
s = spawn ();
|
s = spawn ();
|
||||||
s.origin = org;
|
s.origin = org;
|
||||||
s.nextthink = time + 0.2;
|
s.nextthink = time + 0.2;
|
||||||
|
|
|
@ -10,11 +10,11 @@ void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle;
|
||||||
void (float dam, float rec, string snd, float rng, float rate) FirePistol;
|
void (float dam, float rec, string snd, float rng, float rate) FirePistol;
|
||||||
void (float dam, float rec, string snd, float rng, float rate) FireSMG;
|
void (float dam, float rec, string snd, float rng, float rate) FireSMG;
|
||||||
void () W_PlayerMenu;
|
void () W_PlayerMenu;
|
||||||
void () UseChem;
|
//void () UseChem;
|
||||||
void () Special;
|
void () Special;
|
||||||
void () BuyMenu;
|
void () BuyMenu;
|
||||||
void() Sneak;
|
void() Sneak;
|
||||||
void() Bandage;
|
//void() Bandage;
|
||||||
void() Shield;
|
void() Shield;
|
||||||
void () player_throw1;
|
void () player_throw1;
|
||||||
void() player_knife1;
|
void() player_knife1;
|
||||||
|
@ -26,6 +26,9 @@ void (float slot, float snd, float drop) DropFromSlot;
|
||||||
void() PositionControl;
|
void() PositionControl;
|
||||||
void() autofire;
|
void() autofire;
|
||||||
void() autofire_s;
|
void() autofire_s;
|
||||||
|
float(float iid) UseBoostingChem;
|
||||||
|
float(float iid) UseHealingChem;
|
||||||
|
float(float slotno) DecreaseDestroySlot;
|
||||||
|
|
||||||
#define weightx() (self.weight)
|
#define weightx() (self.weight)
|
||||||
|
|
||||||
|
@ -91,6 +94,37 @@ void(float damage, float dist, float rate) FireMelee =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void() W_FireMelee =
|
||||||
|
{
|
||||||
|
local float iid;
|
||||||
|
iid = ToIID(self.(SlotField(self.current_slot)));
|
||||||
|
if (iid == IID_WP_KNIFE)
|
||||||
|
FireMelee(5, 32, 0.2);
|
||||||
|
else if (iid == IID_WP_AXE)
|
||||||
|
FireMelee(10, 64, 0.2);
|
||||||
|
else if (iid == IID_WP_VIBROBLADE)
|
||||||
|
FireMelee(25, 64, 0.2);
|
||||||
|
else if (iid == IID_WP_POWERAXE)
|
||||||
|
FireMelee(50, 96, 0.2);
|
||||||
|
|
||||||
|
else if (iid == IID_CHEM_STIMPACK ||
|
||||||
|
iid == IID_CHEM_MEDICALBAG ||
|
||||||
|
iid == IID_CHEM_SUPERSTIM)
|
||||||
|
{
|
||||||
|
if (UseHealingChem(iid))
|
||||||
|
DecreaseDestroySlot(self.current_slot);
|
||||||
|
}
|
||||||
|
else if (iid == IID_CHEM_ADRENALINE ||
|
||||||
|
iid == IID_CHEM_PSYCHO ||
|
||||||
|
iid == IID_CHEM_BESERK)
|
||||||
|
{
|
||||||
|
if (UseBoostingChem(iid))
|
||||||
|
DecreaseDestroySlot(self.current_slot);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
dprint(strcat("W_FireMelee - ", ftos(iid), "not implemented\n"));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
@ -666,7 +700,6 @@ void(vector org, vector dir) launch_spike =
|
||||||
void() W_FireSuperSpikes =
|
void() W_FireSuperSpikes =
|
||||||
{
|
{
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local entity old;
|
|
||||||
|
|
||||||
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
||||||
self.attack_finished = time + 0.2;
|
self.attack_finished = time + 0.2;
|
||||||
|
@ -684,7 +717,6 @@ void() W_FireSuperSpikes =
|
||||||
void(float ox) W_FireSpikes =
|
void(float ox) W_FireSpikes =
|
||||||
{
|
{
|
||||||
local vector dir;
|
local vector dir;
|
||||||
local entity old;
|
|
||||||
|
|
||||||
makevectors (self.v_angle);
|
makevectors (self.v_angle);
|
||||||
|
|
||||||
|
@ -714,10 +746,9 @@ void(float ox) W_FireSpikes =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.float hit_z;
|
//.float hit_z;
|
||||||
void() spike_touch =
|
void() spike_touch =
|
||||||
{
|
{
|
||||||
local float rand;
|
|
||||||
if (other == self.owner)
|
if (other == self.owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -763,7 +794,6 @@ local float rand;
|
||||||
|
|
||||||
void() superspike_touch =
|
void() superspike_touch =
|
||||||
{
|
{
|
||||||
local float rand;
|
|
||||||
if (other == self.owner)
|
if (other == self.owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -815,56 +845,10 @@ PLAYER WEAPON USE
|
||||||
void() SetWeaponModel =
|
void() SetWeaponModel =
|
||||||
{
|
{
|
||||||
self.weaponmodel = GetItemVModel(ToIID(ItemInSlot(self, self.current_slot)));
|
self.weaponmodel = GetItemVModel(ToIID(ItemInSlot(self, self.current_slot)));
|
||||||
|
|
||||||
/*
|
|
||||||
if (temp_weapon == 0)
|
|
||||||
self.weaponmodel = "progs/v_fist.mdl";
|
|
||||||
else if (temp_weapon == 1)
|
|
||||||
self.weaponmodel = "progs/v_knife.mdl";
|
|
||||||
else if (temp_weapon == 2)
|
|
||||||
self.weaponmodel = "progs/v_axe.mdl";
|
|
||||||
else if (temp_weapon == 3)
|
|
||||||
self.weaponmodel = "progs/v_knife.mdl";
|
|
||||||
else if (temp_weapon == 4)
|
|
||||||
self.weaponmodel = "progs/v_axe.mdl";
|
|
||||||
else if (temp_weapon == 5)
|
|
||||||
self.weaponmodel = "progs/v_1911.mdl";
|
|
||||||
else if (temp_weapon == 6)
|
|
||||||
self.weaponmodel = "progs/v_deagle.mdl";
|
|
||||||
else if (temp_weapon == 7)
|
|
||||||
self.weaponmodel = "progs/v_1911.mdl";
|
|
||||||
else if (temp_weapon == 8)
|
|
||||||
self.weaponmodel = "progs/v_alien.mdl";
|
|
||||||
else if (temp_weapon == 9)
|
|
||||||
self.weaponmodel = "progs/v_piperifle.mdl";
|
|
||||||
else if (temp_weapon == 10)
|
|
||||||
self.weaponmodel = "progs/v_double.mdl";
|
|
||||||
else if (temp_weapon == 11)
|
|
||||||
self.weaponmodel = "progs/v_shotgun.mdl";
|
|
||||||
else if (temp_weapon == 12)
|
|
||||||
self.weaponmodel = "progs/v_jackhammer.mdl";
|
|
||||||
else if (temp_weapon == 13)
|
|
||||||
self.weaponmodel = "progs/v_mp9.mdl";
|
|
||||||
else if (temp_weapon == 14)
|
|
||||||
self.weaponmodel = "progs/v_mp5.mdl";
|
|
||||||
else if (temp_weapon == 15)
|
|
||||||
self.weaponmodel = "progs/v_rangem.mdl";
|
|
||||||
else if (temp_weapon == 16)
|
|
||||||
self.weaponmodel = "progs/v_ak47.mdl";
|
|
||||||
else if (temp_weapon == 17)
|
|
||||||
self.weaponmodel = "progs/v_ak47.mdl";
|
|
||||||
else if (temp_weapon == 18)
|
|
||||||
self.weaponmodel = "progs/v_srifle.mdl";
|
|
||||||
else if (temp_weapon == 19)
|
|
||||||
self.weaponmodel = "progs/v_night.mdl";
|
|
||||||
else if (temp_weapon == 99)
|
|
||||||
self.weaponmodel = "progs/v_handgren.mdl";
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void() W_SetCurrentAmmo =
|
void() W_SetCurrentAmmo =
|
||||||
{
|
{
|
||||||
local float temp_weapon;
|
|
||||||
local string x;
|
local string x;
|
||||||
|
|
||||||
player_run (); // get out of any weapon firing states
|
player_run (); // get out of any weapon firing states
|
||||||
|
@ -1055,7 +1039,7 @@ An attack impulse can be triggered now
|
||||||
|
|
||||||
void() W_Attack =
|
void() W_Attack =
|
||||||
{
|
{
|
||||||
local float weap, r;
|
local float weap;
|
||||||
|
|
||||||
makevectors (self.v_angle); // calculate forward angle for velocity
|
makevectors (self.v_angle); // calculate forward angle for velocity
|
||||||
self.show_hostile = time + 1; // wake monsters up
|
self.show_hostile = time + 1; // wake monsters up
|
||||||
|
@ -1108,6 +1092,10 @@ void() W_Attack =
|
||||||
else if (weap == IID_WP_MOONLIGHT)
|
else if (weap == IID_WP_MOONLIGHT)
|
||||||
FireAssaultRifle(16, 2, "weapons/m4a1.wav", 4000, 0.1);
|
FireAssaultRifle(16, 2, "weapons/m4a1.wav", 4000, 0.1);
|
||||||
|
|
||||||
|
//float IID_WP_SA80 = 420;
|
||||||
|
//float IID_WP_GAUSERIFLE = 421;
|
||||||
|
//float IID_WP_PULSERIFLE = 422;
|
||||||
|
|
||||||
else if (weap == IID_GREN_FRAG)
|
else if (weap == IID_GREN_FRAG)
|
||||||
player_throw1();
|
player_throw1();
|
||||||
else if (weap == IID_GREN_EMP)
|
else if (weap == IID_GREN_EMP)
|
||||||
|
@ -1117,9 +1105,12 @@ void() W_Attack =
|
||||||
else if (weap == IID_GREN_FLASH)
|
else if (weap == IID_GREN_FLASH)
|
||||||
player_throw1();
|
player_throw1();
|
||||||
|
|
||||||
//float IID_WP_SA80 = 420;
|
|
||||||
//float IID_WP_GAUSERIFLE = 421;
|
else if (IsChem(weap))
|
||||||
//float IID_WP_PULSERIFLE = 422;
|
{
|
||||||
|
self.attack_finished = time + 0.25;
|
||||||
|
player_knife1 ();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
centerprint(self, "Not implemented (", ftos(weap), ")");
|
centerprint(self, "Not implemented (", ftos(weap), ")");
|
||||||
};
|
};
|
||||||
|
@ -1132,7 +1123,7 @@ W_ChangeWeapon
|
||||||
*/
|
*/
|
||||||
void() W_ChangeWeapon =
|
void() W_ChangeWeapon =
|
||||||
{
|
{
|
||||||
local float it, am, fl, r;
|
local float it, am, fl;
|
||||||
|
|
||||||
it = self.items;
|
it = self.items;
|
||||||
am = 0;
|
am = 0;
|
||||||
|
@ -1260,8 +1251,6 @@ void () ProneOff =
|
||||||
|
|
||||||
void () ProneOn =
|
void () ProneOn =
|
||||||
{
|
{
|
||||||
local string x;
|
|
||||||
|
|
||||||
if (self.velocity_z != 0)
|
if (self.velocity_z != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1584,13 +1573,8 @@ void (vector org) bullet_hole =
|
||||||
void (vector test, float length, float dam) penetrate =
|
void (vector test, float length, float dam) penetrate =
|
||||||
{
|
{
|
||||||
local vector org;
|
local vector org;
|
||||||
local vector org2;
|
|
||||||
local vector start;
|
local vector start;
|
||||||
local vector end;
|
local vector end;
|
||||||
local vector end2;
|
|
||||||
local float zdif;
|
|
||||||
local float ydif;
|
|
||||||
local float xdif;
|
|
||||||
local float go;
|
local float go;
|
||||||
local float tl;
|
local float tl;
|
||||||
|
|
||||||
|
@ -1710,9 +1694,6 @@ void (vector org) CreateSmoke =
|
||||||
|
|
||||||
void () SmokeThink =
|
void () SmokeThink =
|
||||||
{
|
{
|
||||||
local entity te;
|
|
||||||
local float ct;
|
|
||||||
|
|
||||||
self.cnt = (self.cnt + 1);
|
self.cnt = (self.cnt + 1);
|
||||||
|
|
||||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||||
|
@ -1759,8 +1740,6 @@ void () FragExplode =
|
||||||
|
|
||||||
void () PlasmaExplode =
|
void () PlasmaExplode =
|
||||||
{
|
{
|
||||||
local float r;
|
|
||||||
|
|
||||||
sound (self, CHAN_VOICE, "ambience/gunfire7.wav", 1, ATTN_NONE);
|
sound (self, CHAN_VOICE, "ambience/gunfire7.wav", 1, ATTN_NONE);
|
||||||
self.origin = (self.origin + '0 0 16');
|
self.origin = (self.origin + '0 0 16');
|
||||||
self.velocity = VEC_ORIGIN;
|
self.velocity = VEC_ORIGIN;
|
||||||
|
@ -1883,16 +1862,16 @@ void () HandGrenBounce =
|
||||||
void () FireHandGrenade =
|
void () FireHandGrenade =
|
||||||
{
|
{
|
||||||
local float item, iid;
|
local float item, iid;
|
||||||
local float count;
|
local float amcount;
|
||||||
|
|
||||||
item = ItemInSlot(self, self.current_slot);
|
item = ItemInSlot(self, self.current_slot);
|
||||||
iid = ToIID(item);
|
iid = ToIID(item);
|
||||||
count = ToStatus(item);
|
amcount = ToStatus(item);
|
||||||
if (iid == 0)
|
if (iid == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self.currentammo = count-1;
|
self.currentammo = amcount-1;
|
||||||
if (count <= 1)
|
if (amcount <= 1)
|
||||||
SetItemSlot(self, self.current_slot, 0);
|
SetItemSlot(self, self.current_slot, 0);
|
||||||
else
|
else
|
||||||
SetItemSlot(self, self.current_slot, SlotVal(iid, self.currentammo));
|
SetItemSlot(self, self.current_slot, SlotVal(iid, self.currentammo));
|
||||||
|
@ -1967,9 +1946,8 @@ void(float slot, float magazine) GiveAmmo =
|
||||||
|
|
||||||
void (float dam, float rec, string snd, float rng, float rate) FirePistol =
|
void (float dam, float rec, string snd, float rng, float rate) FirePistol =
|
||||||
{
|
{
|
||||||
local float tmp, var1, var2, zdif, xdif, ydif, tru;
|
local float tmp, zdif, xdif, ydif, tru;
|
||||||
local vector dir, source, targ, org, org2, adjust;
|
local vector dir, source, targ, org, org2, adjust;
|
||||||
local string x;
|
|
||||||
|
|
||||||
|
|
||||||
stuffcmd(self, "-attack\n");
|
stuffcmd(self, "-attack\n");
|
||||||
|
@ -2078,9 +2056,8 @@ void (float dam, float rec, string snd, float rng, float rate) FirePistol =
|
||||||
|
|
||||||
void (float dam, float rec, string snd, float rng, float rate) FireSMG =
|
void (float dam, float rec, string snd, float rng, float rate) FireSMG =
|
||||||
{
|
{
|
||||||
local float tmp, var1, var2, zdif, xdif, ydif, tru;
|
local float tmp, zdif, xdif, ydif, tru;
|
||||||
local vector dir, source, targ, org, org2, adjust;
|
local vector dir, source, targ, org, org2, adjust;
|
||||||
local string x;
|
|
||||||
|
|
||||||
|
|
||||||
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||||
|
@ -2187,10 +2164,9 @@ void (float dam, float rec, string snd, float rng, float rate) FireSMG =
|
||||||
|
|
||||||
void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle =
|
void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle =
|
||||||
{
|
{
|
||||||
local float tmp, var1, var2, zdif, xdif, ydif, tru, z;
|
local float tmp, zdif, xdif, ydif, tru, z;
|
||||||
|
|
||||||
local vector dir, source, targ, org, org2, adjust;
|
local vector dir, source, targ, org, org2, adjust;
|
||||||
local string x;
|
|
||||||
|
|
||||||
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||||
|
|
||||||
|
@ -2452,58 +2428,7 @@ void (float slotnum, float snd, float force) DropFromSlot =
|
||||||
newmis.velocity = (newmis.velocity * 500);
|
newmis.velocity = (newmis.velocity * 500);
|
||||||
newmis.angles_y = (random () * 360);
|
newmis.angles_y = (random () * 360);
|
||||||
|
|
||||||
mdel = "progs/w_1911.mdl";
|
mdel = GetItemWModel(ToIID(weap));
|
||||||
|
|
||||||
if (weap == 1)
|
|
||||||
mdel = "progs/w_knife.mdl";
|
|
||||||
if (weap == 2)
|
|
||||||
mdel = "progs/w_knife.mdl";
|
|
||||||
if (weap == 3)
|
|
||||||
mdel = "progs/w_axe.mdl";
|
|
||||||
if (weap == 4)
|
|
||||||
mdel = "progs/w_axe.mdl";
|
|
||||||
|
|
||||||
if (weap == 5)
|
|
||||||
mdel = "progs/w_1911.mdl";
|
|
||||||
if (weap == 6)
|
|
||||||
mdel = "progs/w_deagle.mdl";
|
|
||||||
if (weap == 7)
|
|
||||||
mdel = "progs/w_1911.mdl";
|
|
||||||
if (weap == 8)
|
|
||||||
mdel = "progs/w_alien.mdl";
|
|
||||||
|
|
||||||
if (weap == 9)
|
|
||||||
mdel = "progs/w_pipe.mdl";
|
|
||||||
if (weap == 10)
|
|
||||||
mdel = "progs/w_shotgun.mdl";
|
|
||||||
if (weap == 11)
|
|
||||||
mdel = "progs/w_pipe.mdl";
|
|
||||||
if (weap == 12)
|
|
||||||
mdel = "progs/w_jackhammer.mdl";
|
|
||||||
|
|
||||||
if (weap == 13)
|
|
||||||
mdel = "progs/w_mp9.mdl";
|
|
||||||
if (weap == 14)
|
|
||||||
mdel = "progs/w_mp7.mdl";
|
|
||||||
|
|
||||||
if (weap == 15)
|
|
||||||
mdel = "progs/w_rangem.mdl";
|
|
||||||
if (weap == 16)
|
|
||||||
mdel = "progs/w_ak47.mdl";
|
|
||||||
if (weap == 17)
|
|
||||||
mdel = "progs/w_ak47.mdl";
|
|
||||||
if (weap == 18)
|
|
||||||
mdel = "progs/w_srifle.mdl";
|
|
||||||
if (weap == 19)
|
|
||||||
mdel = "progs/w_night.mdl";
|
|
||||||
if (weap == 20)
|
|
||||||
mdel = "progs/w_sa80.mdl";
|
|
||||||
if (weap == 21)
|
|
||||||
mdel = "progs/w_gauss.mdl";
|
|
||||||
if (weap == 22)
|
|
||||||
mdel = "progs/w_carbine.mdl";
|
|
||||||
if (self.current_slot == 3)
|
|
||||||
mdel = "progs/grenade2.mdl";
|
|
||||||
|
|
||||||
setmodel (newmis, mdel);
|
setmodel (newmis, mdel);
|
||||||
setsize (newmis, '-2 -2 0', '2 2 1');
|
setsize (newmis, '-2 -2 0', '2 2 1');
|
||||||
|
@ -2590,7 +2515,6 @@ void (entity healer, entity saved) RevivePlayer =
|
||||||
float(float iid) UseBoostingChem =
|
float(float iid) UseBoostingChem =
|
||||||
{
|
{
|
||||||
local vector source;
|
local vector source;
|
||||||
local vector org;
|
|
||||||
local string x;
|
local string x;
|
||||||
local float duration;
|
local float duration;
|
||||||
|
|
||||||
|
@ -2651,7 +2575,6 @@ float(float iid) UseBoostingChem =
|
||||||
float(float iid) UseHealingChem =
|
float(float iid) UseHealingChem =
|
||||||
{
|
{
|
||||||
local vector source;
|
local vector source;
|
||||||
local vector org;
|
|
||||||
local float heal;
|
local float heal;
|
||||||
local string x;
|
local string x;
|
||||||
|
|
||||||
|
@ -2729,10 +2652,7 @@ float(float iid) UseHealingChem =
|
||||||
|
|
||||||
void () DisplayMenu =
|
void () DisplayMenu =
|
||||||
{
|
{
|
||||||
local entity spot;
|
|
||||||
local string menu;
|
local string menu;
|
||||||
local entity te;
|
|
||||||
local string qq;
|
|
||||||
|
|
||||||
if (self.currentmenu == "none")
|
if (self.currentmenu == "none")
|
||||||
return;
|
return;
|
||||||
|
@ -2889,12 +2809,6 @@ float (float iid) spawn_station;
|
||||||
|
|
||||||
void () ExitScreen =
|
void () ExitScreen =
|
||||||
{
|
{
|
||||||
local float car;
|
|
||||||
local float q;
|
|
||||||
local entity te;
|
|
||||||
local string x;
|
|
||||||
|
|
||||||
|
|
||||||
if (self.class == 0)
|
if (self.class == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3068,10 +2982,7 @@ void () station_die =
|
||||||
void () station_think =
|
void () station_think =
|
||||||
{
|
{
|
||||||
#define chemcount attack_finished
|
#define chemcount attack_finished
|
||||||
local entity dog;
|
|
||||||
local entity te;
|
local entity te;
|
||||||
local string qq;
|
|
||||||
local float zz, x;
|
|
||||||
|
|
||||||
self.nextthink = time + 2;
|
self.nextthink = time + 2;
|
||||||
self.frame = self.buildtype;
|
self.frame = self.buildtype;
|
||||||
|
@ -3399,13 +3310,6 @@ void () BuyMenu =
|
||||||
{
|
{
|
||||||
local float is_shop;
|
local float is_shop;
|
||||||
local entity te;
|
local entity te;
|
||||||
local entity shop;
|
|
||||||
local entity spot;
|
|
||||||
local entity oldself;
|
|
||||||
local vector spot1;
|
|
||||||
local vector spot2;
|
|
||||||
local float r;
|
|
||||||
local float cyc;
|
|
||||||
local string menu;
|
local string menu;
|
||||||
|
|
||||||
if (self.currentmenu == "777")
|
if (self.currentmenu == "777")
|
||||||
|
@ -3660,11 +3564,7 @@ void (vector s_aim, float dam, float tmp, float ran) W_FireBuckshotSpread1 =
|
||||||
local vector source;
|
local vector source;
|
||||||
local vector targ;
|
local vector targ;
|
||||||
local vector org;
|
local vector org;
|
||||||
local float r;
|
|
||||||
local float srange;
|
|
||||||
local float zdif;
|
local float zdif;
|
||||||
local vector src;
|
|
||||||
local vector pos;
|
|
||||||
local float ydif;
|
local float ydif;
|
||||||
local float xdif;
|
local float xdif;
|
||||||
local float tru;
|
local float tru;
|
||||||
|
@ -3731,7 +3631,6 @@ void (float rec, float number, float dam, float spread, float ran, float auto) W
|
||||||
local float var2;
|
local float var2;
|
||||||
local float var3;
|
local float var3;
|
||||||
local float var4;
|
local float var4;
|
||||||
local vector adjust;
|
|
||||||
|
|
||||||
if (self.velocity != '0 0 0')
|
if (self.velocity != '0 0 0')
|
||||||
{
|
{
|
||||||
|
|
|
@ -428,6 +428,12 @@ void() worldspawn =
|
||||||
precache_model ("progs/w_carbine.mdl");
|
precache_model ("progs/w_carbine.mdl");
|
||||||
precache_model ("progs/w_laser.mdl");
|
precache_model ("progs/w_laser.mdl");
|
||||||
|
|
||||||
|
precache_model ("progs/grenade2.mdl");
|
||||||
|
precache_model ("maps/b_bh10.bsp");
|
||||||
|
precache_model ("maps/b_bh25.bsp");
|
||||||
|
precache_model ("maps/b_bh100.bsp");
|
||||||
|
precache_model ("progs/s_light.spr");
|
||||||
|
|
||||||
|
|
||||||
precache_sound ("player/step1.wav");
|
precache_sound ("player/step1.wav");
|
||||||
precache_sound ("player/step2.wav");
|
precache_sound ("player/step2.wav");
|
||||||
|
@ -591,8 +597,6 @@ void() bodyque =
|
||||||
|
|
||||||
void() InitBodyQue =
|
void() InitBodyQue =
|
||||||
{
|
{
|
||||||
local entity e;
|
|
||||||
|
|
||||||
bodyque_head = spawn();
|
bodyque_head = spawn();
|
||||||
bodyque_head.classname = "bodyque";
|
bodyque_head.classname = "bodyque";
|
||||||
bodyque_head.owner = spawn();
|
bodyque_head.owner = spawn();
|
||||||
|
|
|
@ -161,7 +161,7 @@ ZombieFireGrenade
|
||||||
*/
|
*/
|
||||||
void(vector st) ZombieFireGrenade =
|
void(vector st) ZombieFireGrenade =
|
||||||
{
|
{
|
||||||
local entity missile, mpuff;
|
local entity missile;
|
||||||
local vector org;
|
local vector org;
|
||||||
|
|
||||||
sound (self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);
|
sound (self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);
|
||||||
|
|
Loading…
Reference in a new issue