mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-23 11:22:05 +00:00
Spiel weiter aufgeräumt
This commit is contained in:
parent
6e1348ca8b
commit
ed9b900d03
32 changed files with 131 additions and 810 deletions
2
Makefile
2
Makefile
|
@ -29,7 +29,7 @@ OSTYPE := $(shell uname -s)
|
|||
|
||||
ifneq ($(OSTYPE),Linux)
|
||||
ifneq ($(OSTYPE),FreeBSD)
|
||||
$(error $(OSTYPE) is currently not supported by this Client.)
|
||||
#$(error $(OSTYPE) is currently not supported by this Client.)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -238,7 +238,6 @@ void actor_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
return;
|
||||
|
||||
self->pain_debounce_time = level.time + 3;
|
||||
// gi.sound (self, CHAN_VOICE, actor.sound_pain, 1, ATTN_NORM, 0);
|
||||
|
||||
if ((other->client) && (random() < 0.4))
|
||||
{
|
||||
|
@ -340,10 +339,9 @@ void actor_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= -80)
|
||||
{
|
||||
// gi.sound (self, CHAN_VOICE, actor.sound_gib, 1, ATTN_NORM, 0);
|
||||
for (n= 0; n < 2; n++)
|
||||
ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
|
||||
for (n= 0; n < 4; n++)
|
||||
|
@ -356,8 +354,7 @@ void actor_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// gi.sound (self, CHAN_VOICE, actor.sound_die, 1, ATTN_NORM, 0);
|
||||
// regular death
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
||||
|
@ -607,3 +604,4 @@ void SP_target_actor (edict_t *self)
|
|||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -122,31 +122,6 @@ void berserk_walk (edict_t *self)
|
|||
self->monsterinfo.currentmove = &berserk_move_walk;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
*****************************
|
||||
SKIPPED THIS FOR NOW!
|
||||
*****************************
|
||||
|
||||
Running -> Arm raised in air
|
||||
|
||||
void() berserk_runb1 =[ $r_att1 , berserk_runb2 ] {ai_run(21);};
|
||||
void() berserk_runb2 =[ $r_att2 , berserk_runb3 ] {ai_run(11);};
|
||||
void() berserk_runb3 =[ $r_att3 , berserk_runb4 ] {ai_run(21);};
|
||||
void() berserk_runb4 =[ $r_att4 , berserk_runb5 ] {ai_run(25);};
|
||||
void() berserk_runb5 =[ $r_att5 , berserk_runb6 ] {ai_run(18);};
|
||||
void() berserk_runb6 =[ $r_att6 , berserk_runb7 ] {ai_run(19);};
|
||||
// running with arm in air : start loop
|
||||
void() berserk_runb7 =[ $r_att7 , berserk_runb8 ] {ai_run(21);};
|
||||
void() berserk_runb8 =[ $r_att8 , berserk_runb9 ] {ai_run(11);};
|
||||
void() berserk_runb9 =[ $r_att9 , berserk_runb10 ] {ai_run(21);};
|
||||
void() berserk_runb10 =[ $r_att10 , berserk_runb11 ] {ai_run(25);};
|
||||
void() berserk_runb11 =[ $r_att11 , berserk_runb12 ] {ai_run(18);};
|
||||
void() berserk_runb12 =[ $r_att12 , berserk_runb7 ] {ai_run(19);};
|
||||
// running with arm in air : end loop
|
||||
*/
|
||||
|
||||
|
||||
mframe_t berserk_frames_run1 [] =
|
||||
{
|
||||
{ai_run, 21, NULL},
|
||||
|
@ -221,7 +196,6 @@ mmove_t berserk_move_attack_club = {FRAME_att_c9, FRAME_att_c20, berserk_frames_
|
|||
|
||||
void berserk_strike (edict_t *self)
|
||||
{
|
||||
//FIXME play impact sound
|
||||
}
|
||||
|
||||
|
||||
|
@ -254,29 +228,6 @@ void berserk_melee (edict_t *self)
|
|||
self->monsterinfo.currentmove = &berserk_move_attack_club;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void() berserk_atke1 =[ $r_attb1, berserk_atke2 ] {ai_run(9);};
|
||||
void() berserk_atke2 =[ $r_attb2, berserk_atke3 ] {ai_run(6);};
|
||||
void() berserk_atke3 =[ $r_attb3, berserk_atke4 ] {ai_run(18.4);};
|
||||
void() berserk_atke4 =[ $r_attb4, berserk_atke5 ] {ai_run(25);};
|
||||
void() berserk_atke5 =[ $r_attb5, berserk_atke6 ] {ai_run(14);};
|
||||
void() berserk_atke6 =[ $r_attb6, berserk_atke7 ] {ai_run(20);};
|
||||
void() berserk_atke7 =[ $r_attb7, berserk_atke8 ] {ai_run(8.5);};
|
||||
void() berserk_atke8 =[ $r_attb8, berserk_atke9 ] {ai_run(3);};
|
||||
void() berserk_atke9 =[ $r_attb9, berserk_atke10 ] {ai_run(17.5);};
|
||||
void() berserk_atke10 =[ $r_attb10, berserk_atke11 ] {ai_run(17);};
|
||||
void() berserk_atke11 =[ $r_attb11, berserk_atke12 ] {ai_run(9);};
|
||||
void() berserk_atke12 =[ $r_attb12, berserk_atke13 ] {ai_run(25);};
|
||||
void() berserk_atke13 =[ $r_attb13, berserk_atke14 ] {ai_run(3.7);};
|
||||
void() berserk_atke14 =[ $r_attb14, berserk_atke15 ] {ai_run(2.6);};
|
||||
void() berserk_atke15 =[ $r_attb15, berserk_atke16 ] {ai_run(19);};
|
||||
void() berserk_atke16 =[ $r_attb16, berserk_atke17 ] {ai_run(25);};
|
||||
void() berserk_atke17 =[ $r_attb17, berserk_atke18 ] {ai_run(19.6);};
|
||||
void() berserk_atke18 =[ $r_attb18, berserk_run1 ] {ai_run(7.8);};
|
||||
*/
|
||||
|
||||
|
||||
mframe_t berserk_frames_pain1 [] =
|
||||
{
|
||||
{ai_move, 0, NULL},
|
||||
|
@ -455,3 +406,4 @@ void SP_monster_berserk (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ void Boss2Rocket (edict_t *self)
|
|||
|
||||
AngleVectors (self->s.angles, forward, right, NULL);
|
||||
|
||||
//1
|
||||
G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_1], forward, right, start);
|
||||
VectorCopy (self->enemy->s.origin, vec);
|
||||
vec[2] += self->enemy->viewheight;
|
||||
|
@ -69,7 +68,6 @@ void Boss2Rocket (edict_t *self)
|
|||
VectorNormalize (dir);
|
||||
monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_1);
|
||||
|
||||
//2
|
||||
G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_2], forward, right, start);
|
||||
VectorCopy (self->enemy->s.origin, vec);
|
||||
vec[2] += self->enemy->viewheight;
|
||||
|
@ -77,7 +75,6 @@ void Boss2Rocket (edict_t *self)
|
|||
VectorNormalize (dir);
|
||||
monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_2);
|
||||
|
||||
//3
|
||||
G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_3], forward, right, start);
|
||||
VectorCopy (self->enemy->s.origin, vec);
|
||||
vec[2] += self->enemy->viewheight;
|
||||
|
@ -85,7 +82,6 @@ void Boss2Rocket (edict_t *self)
|
|||
VectorNormalize (dir);
|
||||
monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_3);
|
||||
|
||||
//4
|
||||
G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_4], forward, right, start);
|
||||
VectorCopy (self->enemy->s.origin, vec);
|
||||
vec[2] += self->enemy->viewheight;
|
||||
|
@ -129,24 +125,7 @@ void boss2_firebullet_left (edict_t *self)
|
|||
|
||||
void Boss2MachineGun (edict_t *self)
|
||||
{
|
||||
/* vec3_t forward, right;
|
||||
vec3_t start;
|
||||
vec3_t dir;
|
||||
vec3_t vec;
|
||||
int flash_number;
|
||||
|
||||
AngleVectors (self->s.angles, forward, right, NULL);
|
||||
|
||||
flash_number = MZ2_BOSS2_MACHINEGUN_1 + (self->s.frame - FRAME_attack10);
|
||||
G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
|
||||
|
||||
VectorCopy (self->enemy->s.origin, vec);
|
||||
vec[2] += self->enemy->viewheight;
|
||||
VectorSubtract (vec, start, dir);
|
||||
VectorNormalize (dir);
|
||||
monster_fire_bullet (self, start, dir, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
|
||||
*/
|
||||
boss2_firebullet_left(self);
|
||||
boss2_firebullet_left(self);
|
||||
boss2_firebullet_right(self);
|
||||
}
|
||||
|
||||
|
@ -476,7 +455,7 @@ void boss2_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
return;
|
||||
|
||||
self->pain_debounce_time = level.time + 3;
|
||||
// American wanted these at no attenuation
|
||||
// American wanted these at no attenuation
|
||||
if (damage < 10)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, sound_pain3, 1, ATTN_NONE, 0);
|
||||
|
@ -511,30 +490,6 @@ void boss2_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
self->takedamage = DAMAGE_NO;
|
||||
self->count = 0;
|
||||
self->monsterinfo.currentmove = &boss2_move_death;
|
||||
#if 0
|
||||
int n;
|
||||
|
||||
self->s.sound = 0;
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
for (n= 0; n < 2; n++)
|
||||
ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
|
||||
for (n= 0; n < 4; n++)
|
||||
ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
|
||||
ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
return;
|
||||
}
|
||||
|
||||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
self->monsterinfo.currentmove = &boss2_move_death;
|
||||
#endif
|
||||
}
|
||||
|
||||
qboolean Boss2_CheckAttack (edict_t *self)
|
||||
|
@ -549,7 +504,7 @@ qboolean Boss2_CheckAttack (edict_t *self)
|
|||
|
||||
if (self->enemy->health > 0)
|
||||
{
|
||||
// see if any entities are in the way of the shot
|
||||
// see if any entities are in the way of the shot
|
||||
VectorCopy (self->s.origin, spot1);
|
||||
spot1[2] += self->viewheight;
|
||||
VectorCopy (self->enemy->s.origin, spot2);
|
||||
|
@ -580,7 +535,7 @@ qboolean Boss2_CheckAttack (edict_t *self)
|
|||
return true;
|
||||
}
|
||||
|
||||
// missile attack
|
||||
// missile attack
|
||||
if (!self->monsterinfo.attack)
|
||||
return false;
|
||||
|
||||
|
@ -677,3 +632,4 @@ void SP_monster_boss2 (edict_t *self)
|
|||
|
||||
flymonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,3 +74,4 @@ void SP_monster_boss3_stand (edict_t *self)
|
|||
self->nextthink = level.time + FRAMETIME;
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -487,15 +487,7 @@ void jorgBFG (edict_t *self)
|
|||
VectorSubtract (vec, start, dir);
|
||||
VectorNormalize (dir);
|
||||
gi.sound (self, CHAN_VOICE, sound_attack2, 1, ATTN_NORM, 0);
|
||||
/*void monster_fire_bfg (edict_t *self,
|
||||
vec3_t start,
|
||||
vec3_t aimdir,
|
||||
int damage,
|
||||
int speed,
|
||||
int kick,
|
||||
float damage_radius,
|
||||
int flashtype)*/
|
||||
monster_fire_bfg (self, start, dir, 50, 300, 100, 200, MZ2_JORG_BFG_1);
|
||||
monster_fire_bfg (self, start, dir, 50, 300, 100, 200, MZ2_JORG_BFG_1);
|
||||
}
|
||||
|
||||
void jorg_firebullet_right (edict_t *self)
|
||||
|
@ -559,30 +551,6 @@ void jorg_attack(edict_t *self)
|
|||
|
||||
void jorg_dead (edict_t *self)
|
||||
{
|
||||
#if 0
|
||||
edict_t *tempent;
|
||||
/*
|
||||
VectorSet (self->mins, -16, -16, -24);
|
||||
VectorSet (self->maxs, 16, 16, -8);
|
||||
*/
|
||||
|
||||
// Jorg is on modelindex2. Do not clear him.
|
||||
VectorSet (self->mins, -60, -60, 0);
|
||||
VectorSet (self->maxs, 60, 60, 72);
|
||||
self->movetype = MOVETYPE_TOSS;
|
||||
self->nextthink = 0;
|
||||
gi.linkentity (self);
|
||||
|
||||
tempent = G_Spawn();
|
||||
VectorCopy (self->s.origin, tempent->s.origin);
|
||||
VectorCopy (self->s.angles, tempent->s.angles);
|
||||
tempent->killtarget = self->killtarget;
|
||||
tempent->target = self->target;
|
||||
tempent->activator = self->enemy;
|
||||
self->killtarget = 0;
|
||||
self->target = 0;
|
||||
SP_monster_makron (tempent);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -608,7 +576,7 @@ qboolean Jorg_CheckAttack (edict_t *self)
|
|||
|
||||
if (self->enemy->health > 0)
|
||||
{
|
||||
// see if any entities are in the way of the shot
|
||||
// see if any entities are in the way of the shot
|
||||
VectorCopy (self->s.origin, spot1);
|
||||
spot1[2] += self->viewheight;
|
||||
VectorCopy (self->enemy->s.origin, spot2);
|
||||
|
@ -639,7 +607,7 @@ qboolean Jorg_CheckAttack (edict_t *self)
|
|||
return true;
|
||||
}
|
||||
|
||||
// missile attack
|
||||
// missile attack
|
||||
if (!self->monsterinfo.attack)
|
||||
return false;
|
||||
|
||||
|
@ -747,3 +715,4 @@ void SP_monster_jorg (edict_t *self)
|
|||
|
||||
walkmonster_start(self);
|
||||
}
|
||||
|
||||
|
|
|
@ -695,7 +695,7 @@ void makron_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NONE, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -753,7 +753,7 @@ qboolean Makron_CheckAttack (edict_t *self)
|
|||
return true;
|
||||
}
|
||||
|
||||
// missile attack
|
||||
// missile attack
|
||||
if (!self->monsterinfo.attack)
|
||||
return false;
|
||||
|
||||
|
@ -862,7 +862,6 @@ void SP_monster_makron (edict_t *self)
|
|||
|
||||
gi.linkentity (self);
|
||||
|
||||
// self->monsterinfo.currentmove = &makron_move_stand;
|
||||
self->monsterinfo.currentmove = &makron_move_sight;
|
||||
self->monsterinfo.scale = MODEL_SCALE;
|
||||
|
||||
|
@ -913,3 +912,4 @@ void MakronToss (edict_t *self)
|
|||
ent->target = self->target;
|
||||
VectorCopy (self->s.origin, ent->s.origin);
|
||||
}
|
||||
|
||||
|
|
|
@ -174,69 +174,10 @@ mframe_t brain_frames_walk1 [] =
|
|||
};
|
||||
mmove_t brain_move_walk1 = {FRAME_walk101, FRAME_walk111, brain_frames_walk1, NULL};
|
||||
|
||||
// walk2 is FUBAR, do not use
|
||||
#if 0
|
||||
void brain_walk2_cycle (edict_t *self)
|
||||
{
|
||||
if (random() > 0.1)
|
||||
self->monsterinfo.nextframe = FRAME_walk220;
|
||||
}
|
||||
|
||||
mframe_t brain_frames_walk2 [] =
|
||||
{
|
||||
{ai_walk, 3, NULL},
|
||||
{ai_walk, -2, NULL},
|
||||
{ai_walk, -4, NULL},
|
||||
{ai_walk, -3, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 1, NULL},
|
||||
{ai_walk, 12, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, -3, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
|
||||
{ai_walk, -2, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 1, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 10, NULL}, // Cycle Start
|
||||
|
||||
{ai_walk, -1, NULL},
|
||||
{ai_walk, 7, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 3, NULL},
|
||||
{ai_walk, -3, NULL},
|
||||
{ai_walk, 2, NULL},
|
||||
{ai_walk, 4, NULL},
|
||||
{ai_walk, -3, NULL},
|
||||
{ai_walk, 2, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
|
||||
{ai_walk, 4, brain_walk2_cycle},
|
||||
{ai_walk, -1, NULL},
|
||||
{ai_walk, -1, NULL},
|
||||
{ai_walk, -8, NULL},
|
||||
{ai_walk, 0, NULL},
|
||||
{ai_walk, 1, NULL},
|
||||
{ai_walk, 5, NULL},
|
||||
{ai_walk, 2, NULL},
|
||||
{ai_walk, -1, NULL},
|
||||
{ai_walk, -5, NULL}
|
||||
};
|
||||
mmove_t brain_move_walk2 = {FRAME_walk201, FRAME_walk240, brain_frames_walk2, NULL};
|
||||
#endif
|
||||
|
||||
void brain_walk (edict_t *self)
|
||||
{
|
||||
// if (random() <= 0.5)
|
||||
self->monsterinfo.currentmove = &brain_move_walk1;
|
||||
// else
|
||||
// self->monsterinfo.currentmove = &brain_move_walk2;
|
||||
}
|
||||
|
||||
|
||||
|
@ -590,7 +531,7 @@ void brain_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
self->s.effects = 0;
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_NONE;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -606,7 +547,7 @@ void brain_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -658,7 +599,6 @@ void SP_monster_brain (edict_t *self)
|
|||
self->monsterinfo.walk = brain_walk;
|
||||
self->monsterinfo.run = brain_run;
|
||||
self->monsterinfo.dodge = brain_dodge;
|
||||
// self->monsterinfo.attack = brain_attack;
|
||||
self->monsterinfo.melee = brain_melee;
|
||||
self->monsterinfo.sight = brain_sight;
|
||||
self->monsterinfo.search = brain_search;
|
||||
|
@ -674,3 +614,4 @@ void SP_monster_brain (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ void chick_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -370,7 +370,7 @@ void chick_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
||||
|
@ -677,3 +677,4 @@ void SP_monster_chick (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -486,3 +486,4 @@ vec3_t monster_flash_offset [] =
|
|||
// end of table
|
||||
{ 0.0, 0.0, 0.0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ void flipper_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -349,7 +349,7 @@ void flipper_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -401,3 +401,4 @@ void SP_monster_flipper (edict_t *self)
|
|||
|
||||
swimmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ void floater_idle (edict_t *self)
|
|||
}
|
||||
|
||||
|
||||
//void floater_stand1 (edict_t *self);
|
||||
void floater_dead (edict_t *self);
|
||||
void floater_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);
|
||||
void floater_run (edict_t *self);
|
||||
|
@ -532,7 +531,6 @@ void floater_zap (edict_t *self)
|
|||
//FIXME use a flash and replace these two lines with the commented one
|
||||
VectorSet (offset, 18.5, -0.9, 10);
|
||||
G_ProjectSource (self->s.origin, offset, forward, right, origin);
|
||||
// G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, origin);
|
||||
|
||||
gi.sound (self, CHAN_WEAPON, sound_attack2, 1, ATTN_NORM, 0);
|
||||
|
||||
|
@ -644,7 +642,6 @@ void SP_monster_floater (edict_t *self)
|
|||
self->monsterinfo.stand = floater_stand;
|
||||
self->monsterinfo.walk = floater_walk;
|
||||
self->monsterinfo.run = floater_run;
|
||||
// self->monsterinfo.dodge = floater_dodge;
|
||||
self->monsterinfo.attack = floater_attack;
|
||||
self->monsterinfo.melee = floater_melee;
|
||||
self->monsterinfo.sight = floater_sight;
|
||||
|
@ -661,3 +658,4 @@ void SP_monster_floater (edict_t *self)
|
|||
|
||||
flymonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -478,9 +478,6 @@ mmove_t flyer_move_loop_melee = {FRAME_attak107, FRAME_attak118, flyer_frames_lo
|
|||
|
||||
void flyer_loop_melee (edict_t *self)
|
||||
{
|
||||
/* if (random() <= 0.5)
|
||||
self->monsterinfo.currentmove = &flyer_move_attack1;
|
||||
else */
|
||||
self->monsterinfo.currentmove = &flyer_move_loop_melee;
|
||||
}
|
||||
|
||||
|
@ -488,9 +485,6 @@ void flyer_loop_melee (edict_t *self)
|
|||
|
||||
void flyer_attack (edict_t *self)
|
||||
{
|
||||
/* if (random() <= 0.5)
|
||||
self->monsterinfo.currentmove = &flyer_move_attack1;
|
||||
else */
|
||||
self->monsterinfo.currentmove = &flyer_move_attack2;
|
||||
}
|
||||
|
||||
|
@ -512,8 +506,6 @@ void flyer_nextmove (edict_t *self)
|
|||
|
||||
void flyer_melee (edict_t *self)
|
||||
{
|
||||
// flyer.nextmove = ACTION_attack1;
|
||||
// self->monsterinfo.currentmove = &flyer_move_stop;
|
||||
self->monsterinfo.currentmove = &flyer_move_start_melee;
|
||||
}
|
||||
|
||||
|
@ -624,3 +616,4 @@ void SP_monster_flyer (edict_t *self)
|
|||
|
||||
flymonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ void gladiator_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int da
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -325,7 +325,7 @@ void gladiator_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int da
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -385,3 +385,4 @@ void SP_monster_gladiator (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ void gunner_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -352,7 +352,7 @@ void gunner_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -459,7 +459,7 @@ void GunnerGrenade (edict_t *self)
|
|||
flash_number = MZ2_GUNNER_GRENADE_2;
|
||||
else if (self->s.frame == FRAME_attak111)
|
||||
flash_number = MZ2_GUNNER_GRENADE_3;
|
||||
else // (self->s.frame == FRAME_attak114)
|
||||
else
|
||||
flash_number = MZ2_GUNNER_GRENADE_4;
|
||||
|
||||
AngleVectors (self->s.angles, forward, right, NULL);
|
||||
|
@ -473,16 +473,6 @@ void GunnerGrenade (edict_t *self)
|
|||
|
||||
mframe_t gunner_frames_attack_chain [] =
|
||||
{
|
||||
/*
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
*/
|
||||
{ai_charge, 0, gunner_opengun},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
|
@ -626,3 +616,4 @@ void SP_monster_gunner (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ void hover_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -558,7 +558,7 @@ void hover_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
if (random() < 0.5)
|
||||
gi.sound (self, CHAN_VOICE, sound_death1, 1, ATTN_NORM, 0);
|
||||
else
|
||||
|
@ -606,7 +606,6 @@ void SP_monster_hover (edict_t *self)
|
|||
self->monsterinfo.stand = hover_stand;
|
||||
self->monsterinfo.walk = hover_walk;
|
||||
self->monsterinfo.run = hover_run;
|
||||
// self->monsterinfo.dodge = hover_dodge;
|
||||
self->monsterinfo.attack = hover_start_attack;
|
||||
self->monsterinfo.sight = hover_sight;
|
||||
self->monsterinfo.search = hover_search;
|
||||
|
@ -618,3 +617,4 @@ void SP_monster_hover (edict_t *self)
|
|||
|
||||
flymonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ void infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dam
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -403,7 +403,7 @@ void infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dam
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
||||
|
@ -605,3 +605,4 @@ void SP_monster_infantry (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -478,9 +478,6 @@ void insane_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
{
|
||||
int l,r;
|
||||
|
||||
// if (self->health < (self->max_health / 2))
|
||||
// self->s.skinnum = 1;
|
||||
|
||||
if (level.time < self->pain_debounce_time)
|
||||
return;
|
||||
|
||||
|
@ -523,7 +520,6 @@ void insane_onground (edict_t *self)
|
|||
|
||||
void insane_checkdown (edict_t *self)
|
||||
{
|
||||
// if ( (self->s.frame == FRAME_stand94) || (self->s.frame == FRAME_stand65) )
|
||||
if (self->spawnflags & 32) // Always stand
|
||||
return;
|
||||
if (random() < 0.3)
|
||||
|
@ -622,8 +618,6 @@ void insane_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
*/
|
||||
void SP_misc_insane (edict_t *self)
|
||||
{
|
||||
// static int skin = 0; //@@
|
||||
|
||||
if (deathmatch->value)
|
||||
{
|
||||
G_FreeEdict (self);
|
||||
|
@ -665,12 +659,6 @@ void SP_misc_insane (edict_t *self)
|
|||
self->monsterinfo.sight = NULL;
|
||||
self->monsterinfo.aiflags |= AI_GOOD_GUY;
|
||||
|
||||
//@@
|
||||
// self->s.skinnum = skin;
|
||||
// skin++;
|
||||
// if (skin > 12)
|
||||
// skin = 0;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
if (self->spawnflags & 16) // Stand Ground
|
||||
|
@ -693,3 +681,4 @@ void SP_misc_insane (edict_t *self)
|
|||
self->s.skinnum = rand()%3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ void medic_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
if ((self->enemy) && (self->enemy->owner == self))
|
||||
self->enemy->owner = NULL;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -434,7 +434,7 @@ void medic_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -767,3 +767,4 @@ void SP_monster_medic (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ qboolean M_CheckBottom (edict_t *ent)
|
|||
VectorAdd (ent->s.origin, ent->mins, mins);
|
||||
VectorAdd (ent->s.origin, ent->maxs, maxs);
|
||||
|
||||
// if all of the points under the corners are solid world, don't bother
|
||||
// with the tougher checks
|
||||
// the corners must be within 16 of the midpoint
|
||||
// if all of the points under the corners are solid world, don't bother
|
||||
// with the tougher checks
|
||||
// the corners must be within 16 of the midpoint
|
||||
start[2] = mins[2] - 1;
|
||||
for (x=0 ; x<=1 ; x++)
|
||||
for (y=0 ; y<=1 ; y++)
|
||||
|
@ -62,12 +62,12 @@ qboolean M_CheckBottom (edict_t *ent)
|
|||
|
||||
realcheck:
|
||||
c_no++;
|
||||
//
|
||||
// check it for real...
|
||||
//
|
||||
//
|
||||
// check it for real...
|
||||
//
|
||||
start[2] = mins[2];
|
||||
|
||||
// the midpoint must be within 16 of the bottom
|
||||
// the midpoint must be within 16 of the bottom
|
||||
start[0] = stop[0] = (mins[0] + maxs[0])*0.5;
|
||||
start[1] = stop[1] = (mins[1] + maxs[1])*0.5;
|
||||
stop[2] = start[2] - 2*STEPSIZE;
|
||||
|
@ -77,7 +77,7 @@ realcheck:
|
|||
return false;
|
||||
mid = bottom = trace.endpos[2];
|
||||
|
||||
// the corners must be within 16 of the midpoint
|
||||
// the corners must be within 16 of the midpoint
|
||||
for (x=0 ; x<=1 ; x++)
|
||||
for (y=0 ; y<=1 ; y++)
|
||||
{
|
||||
|
@ -119,14 +119,14 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
vec3_t test;
|
||||
int contents;
|
||||
|
||||
// try the move
|
||||
// try the move
|
||||
VectorCopy (ent->s.origin, oldorg);
|
||||
VectorAdd (ent->s.origin, move, neworg);
|
||||
|
||||
// flying monsters don't step up
|
||||
// flying monsters don't step up
|
||||
if ( ent->flags & (FL_SWIM | FL_FLY) )
|
||||
{
|
||||
// try one move with vertical motion, then one without
|
||||
// try one move with vertical motion, then one without
|
||||
for (i=0 ; i<2 ; i++)
|
||||
{
|
||||
VectorAdd (ent->s.origin, move, neworg);
|
||||
|
@ -203,7 +203,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
return false;
|
||||
}
|
||||
|
||||
// push down from a step height above the wished position
|
||||
// push down from a step height above the wished position
|
||||
if (!(ent->monsterinfo.aiflags & AI_NOSTEP))
|
||||
stepsize = STEPSIZE;
|
||||
else
|
||||
|
@ -257,7 +257,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
return false; // walked off an edge
|
||||
}
|
||||
|
||||
// check point traces down for dangling corners
|
||||
// check point traces down for dangling corners
|
||||
VectorCopy (trace.endpos, ent->s.origin);
|
||||
|
||||
if (!M_CheckBottom (ent))
|
||||
|
@ -283,7 +283,7 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
|
|||
ent->groundentity = trace.ent;
|
||||
ent->groundentity_linkcount = trace.ent->linkcount;
|
||||
|
||||
// the move is ok
|
||||
// the move is ok
|
||||
if (relink)
|
||||
{
|
||||
gi.linkentity (ent);
|
||||
|
@ -428,7 +428,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
|||
else
|
||||
d[2]= DI_NODIR;
|
||||
|
||||
// try direct route
|
||||
// try direct route
|
||||
if (d[1] != DI_NODIR && d[2] != DI_NODIR)
|
||||
{
|
||||
if (d[1] == 0)
|
||||
|
@ -440,7 +440,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
|||
return;
|
||||
}
|
||||
|
||||
// try other directions
|
||||
// try other directions
|
||||
if ( ((rand()&3) & 1) || abs(deltay)>abs(deltax))
|
||||
{
|
||||
tdir=d[1];
|
||||
|
@ -456,7 +456,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
|||
&& SV_StepDirection(actor, d[2], dist))
|
||||
return;
|
||||
|
||||
/* there is no direct path to the player, so pick another direction */
|
||||
/* there is no direct path to the player, so pick another direction */
|
||||
|
||||
if (olddir!=DI_NODIR && SV_StepDirection(actor, olddir, dist))
|
||||
return;
|
||||
|
@ -479,8 +479,8 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
|||
|
||||
actor->ideal_yaw = olddir; // can't move
|
||||
|
||||
// if a bridge was pulled out from underneath a monster, it may not have
|
||||
// a valid standing position at all
|
||||
// if a bridge was pulled out from underneath a monster, it may not have
|
||||
// a valid standing position at all
|
||||
|
||||
if (!M_CheckBottom (actor))
|
||||
SV_FixCheckBottom (actor);
|
||||
|
@ -521,11 +521,11 @@ void M_MoveToGoal (edict_t *ent, float dist)
|
|||
if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
|
||||
return;
|
||||
|
||||
// if the next step hits the enemy, return immediately
|
||||
// if the next step hits the enemy, return immediately
|
||||
if (ent->enemy && SV_CloseEnough (ent, ent->enemy, dist) )
|
||||
return;
|
||||
|
||||
// bump around...
|
||||
// bump around...
|
||||
if ( (rand()&3)==1 || !SV_StepDirection (ent, ent->ideal_yaw, dist))
|
||||
{
|
||||
if (ent->inuse)
|
||||
|
@ -554,3 +554,4 @@ qboolean M_walkmove (edict_t *ent, float yaw, float dist)
|
|||
|
||||
return SV_movestep(ent, move, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -661,3 +661,4 @@ void SP_monster_mutant (edict_t *self)
|
|||
self->monsterinfo.scale = MODEL_SCALE;
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -432,9 +432,6 @@ Break Stuff Ends
|
|||
|
||||
void parasite_attack (edict_t *self)
|
||||
{
|
||||
// if (random() <= 0.2)
|
||||
// self->monsterinfo.currentmove = ¶site_move_break;
|
||||
// else
|
||||
self->monsterinfo.currentmove = ¶site_move_drain;
|
||||
}
|
||||
|
||||
|
@ -472,7 +469,7 @@ void parasite_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dam
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -488,7 +485,7 @@ void parasite_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dam
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -550,3 +547,4 @@ void SP_monster_parasite (edict_t *self)
|
|||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
||||
|
|
|
@ -144,69 +144,6 @@ mframe_t soldier_frames_stand3 [] =
|
|||
};
|
||||
mmove_t soldier_move_stand3 = {FRAME_stand301, FRAME_stand339, soldier_frames_stand3, soldier_stand};
|
||||
|
||||
#if 0
|
||||
mframe_t soldier_frames_stand4 [] =
|
||||
{
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 4, NULL},
|
||||
{ai_stand, 1, NULL},
|
||||
{ai_stand, -1, NULL},
|
||||
{ai_stand, -2, NULL},
|
||||
|
||||
{ai_stand, 0, NULL},
|
||||
{ai_stand, 0, NULL}
|
||||
};
|
||||
mmove_t soldier_move_stand4 = {FRAME_stand401, FRAME_stand452, soldier_frames_stand4, NULL};
|
||||
#endif
|
||||
|
||||
void soldier_stand (edict_t *self)
|
||||
{
|
||||
|
@ -681,12 +618,7 @@ mmove_t soldier_move_attack3 = {FRAME_attak301, FRAME_attak309, soldier_frames_a
|
|||
void soldier_fire4 (edict_t *self)
|
||||
{
|
||||
soldier_fire (self, 3);
|
||||
//
|
||||
// if (self->enemy->health <= 0)
|
||||
// return;
|
||||
//
|
||||
// if ( ((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE) )
|
||||
// self->monsterinfo.nextframe = FRAME_attak402;
|
||||
self->monsterinfo.nextframe = FRAME_attak402;
|
||||
}
|
||||
|
||||
mframe_t soldier_frames_attack4 [] =
|
||||
|
@ -700,37 +632,6 @@ mframe_t soldier_frames_attack4 [] =
|
|||
};
|
||||
mmove_t soldier_move_attack4 = {FRAME_attak401, FRAME_attak406, soldier_frames_attack4, soldier_run};
|
||||
|
||||
#if 0
|
||||
// ATTACK5 (prone)
|
||||
|
||||
void soldier_fire5 (edict_t *self)
|
||||
{
|
||||
soldier_fire (self, 4);
|
||||
}
|
||||
|
||||
void soldier_attack5_refire (edict_t *self)
|
||||
{
|
||||
if (self->enemy->health <= 0)
|
||||
return;
|
||||
|
||||
if ( ((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE) )
|
||||
self->monsterinfo.nextframe = FRAME_attak505;
|
||||
}
|
||||
|
||||
mframe_t soldier_frames_attack5 [] =
|
||||
{
|
||||
{ai_charge, 8, NULL},
|
||||
{ai_charge, 8, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, soldier_fire5},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, NULL},
|
||||
{ai_charge, 0, soldier_attack5_refire}
|
||||
};
|
||||
mmove_t soldier_move_attack5 = {FRAME_attak501, FRAME_attak508, soldier_frames_attack5, soldier_run};
|
||||
#endif
|
||||
|
||||
// ATTACK6 (run & shoot)
|
||||
|
||||
void soldier_fire8 (edict_t *self)
|
||||
|
@ -1145,7 +1046,7 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -1160,7 +1061,7 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
self->s.skinnum |= 1;
|
||||
|
@ -1169,7 +1070,7 @@ void soldier_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dama
|
|||
gi.sound (self, CHAN_VOICE, sound_death_light, 1, ATTN_NORM, 0);
|
||||
else if (self->s.skinnum == 3)
|
||||
gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
|
||||
else // (self->s.skinnum == 5)
|
||||
else
|
||||
gi.sound (self, CHAN_VOICE, sound_death_ss, 1, ATTN_NORM, 0);
|
||||
|
||||
if (fabs((self->s.origin[2] + self->viewheight) - point[2]) <= 4)
|
||||
|
@ -1297,3 +1198,4 @@ void SP_monster_soldier_ss (edict_t *self)
|
|||
self->health = 40;
|
||||
self->gib_health = -30;
|
||||
}
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ void supertankRocket (edict_t *self)
|
|||
flash_number = MZ2_SUPERTANK_ROCKET_1;
|
||||
else if (self->s.frame == FRAME_attak2_11)
|
||||
flash_number = MZ2_SUPERTANK_ROCKET_2;
|
||||
else // (self->s.frame == FRAME_attak2_14)
|
||||
else
|
||||
flash_number = MZ2_SUPERTANK_ROCKET_3;
|
||||
|
||||
AngleVectors (self->s.angles, forward, right, NULL);
|
||||
|
@ -552,16 +552,10 @@ void supertank_attack(edict_t *self)
|
|||
{
|
||||
vec3_t vec;
|
||||
float range;
|
||||
//float r;
|
||||
|
||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
||||
range = VectorLength (vec);
|
||||
|
||||
//r = random();
|
||||
|
||||
// Attack 1 == Chaingun
|
||||
// Attack 2 == Rocket Launcher
|
||||
|
||||
if (range <= 160)
|
||||
{
|
||||
self->monsterinfo.currentmove = &supertank_move_attack1;
|
||||
|
@ -684,7 +678,6 @@ void SP_monster_supertank (edict_t *self)
|
|||
sound_search1 = gi.soundindex ("bosstank/btkunqv1.wav");
|
||||
sound_search2 = gi.soundindex ("bosstank/btkunqv2.wav");
|
||||
|
||||
// self->s.sound = gi.soundindex ("bosstank/btkengn1.wav");
|
||||
tread_sound = gi.soundindex ("bosstank/btkengn1.wav");
|
||||
|
||||
self->movetype = MOVETYPE_STEP;
|
||||
|
@ -715,3 +708,4 @@ void SP_monster_supertank (edict_t *self)
|
|||
|
||||
walkmonster_start(self);
|
||||
}
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ void TankBlaster (edict_t *self)
|
|||
flash_number = MZ2_TANK_BLASTER_1;
|
||||
else if (self->s.frame == FRAME_attak113)
|
||||
flash_number = MZ2_TANK_BLASTER_2;
|
||||
else // (self->s.frame == FRAME_attak116)
|
||||
else
|
||||
flash_number = MZ2_TANK_BLASTER_3;
|
||||
|
||||
AngleVectors (self->s.angles, forward, right, NULL);
|
||||
|
@ -370,7 +370,7 @@ void TankRocket (edict_t *self)
|
|||
flash_number = MZ2_TANK_ROCKET_1;
|
||||
else if (self->s.frame == FRAME_attak327)
|
||||
flash_number = MZ2_TANK_ROCKET_2;
|
||||
else // (self->s.frame == FRAME_attak330)
|
||||
else
|
||||
flash_number = MZ2_TANK_ROCKET_3;
|
||||
|
||||
AngleVectors (self->s.angles, forward, right, NULL);
|
||||
|
@ -754,7 +754,7 @@ void tank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage,
|
|||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
// check for gib
|
||||
if (self->health <= self->gib_health)
|
||||
{
|
||||
gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -771,7 +771,7 @@ void tank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage,
|
|||
if (self->deadflag == DEAD_DEAD)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
// regular death
|
||||
gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
|
||||
self->deadflag = DEAD_DEAD;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
@ -854,3 +854,4 @@ void SP_monster_tank (edict_t *self)
|
|||
if (strcmp(self->classname, "monster_tank_commander") == 0)
|
||||
self->s.skinnum = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ static void SP_FixCoopSpots (edict_t *self)
|
|||
{
|
||||
if ((!self->targetname) || Q_stricmp(self->targetname, spot->targetname) != 0)
|
||||
{
|
||||
// gi.dprintf("FixCoopSpots changed %s at %s targetname from %s to %s\n", self->classname, vtos(self->s.origin), self->targetname, spot->targetname);
|
||||
self->targetname = spot->targetname;
|
||||
}
|
||||
return;
|
||||
|
@ -517,7 +516,6 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
|
||||
self->maxs[2] = -8;
|
||||
|
||||
// self->solid = SOLID_NOT;
|
||||
self->svflags |= SVF_DEADMONSTER;
|
||||
|
||||
if (!self->deadflag)
|
||||
|
@ -1125,17 +1123,10 @@ void PutClientInServer (edict_t *ent)
|
|||
}
|
||||
else if (coop->value)
|
||||
{
|
||||
// int n;
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
|
||||
resp = client->resp;
|
||||
memcpy (userinfo, client->pers.userinfo, sizeof(userinfo));
|
||||
// this is kind of ugly, but it's how we want to handle keys in coop
|
||||
// for (n = 0; n < game.num_items; n++)
|
||||
// {
|
||||
// if (itemlist[n].flags & IT_KEY)
|
||||
// resp.coop_respawn.inventory[n] = client->pers.inventory[n];
|
||||
// }
|
||||
resp.coop_respawn.game_helpchanged = client->pers.game_helpchanged;
|
||||
resp.coop_respawn.helpchanged = client->pers.helpchanged;
|
||||
client->pers = resp.coop_respawn;
|
||||
|
@ -1178,7 +1169,7 @@ void PutClientInServer (edict_t *ent)
|
|||
ent->waterlevel = 0;
|
||||
ent->watertype = 0;
|
||||
ent->flags &= ~FL_NO_KNOCKBACK;
|
||||
ent->svflags &= ~SVF_DEADMONSTER;
|
||||
ent->svflags &= 0;
|
||||
|
||||
VectorCopy (mins, ent->mins);
|
||||
VectorCopy (maxs, ent->maxs);
|
||||
|
@ -1631,7 +1622,6 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
|
||||
{
|
||||
pm.snapinitial = true;
|
||||
// gi.dprintf ("pmove changed!\n");
|
||||
}
|
||||
|
||||
pm.cmd = *ucmd;
|
||||
|
@ -1813,3 +1803,4 @@ void ClientBeginServerFrame (edict_t *ent)
|
|||
|
||||
client->latched_buttons = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -380,6 +380,8 @@ void G_SetStats (edict_t *ent)
|
|||
int index, cells;
|
||||
int power_armor_type;
|
||||
|
||||
cells = 0;
|
||||
|
||||
//
|
||||
// health
|
||||
//
|
||||
|
|
|
@ -144,3 +144,4 @@ edict_t *PlayerTrail_LastSpot (void)
|
|||
{
|
||||
return trail[PREV(trail_head)];
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ void SV_CalcViewOffset (edict_t *ent)
|
|||
vec3_t v;
|
||||
|
||||
|
||||
//===================================
|
||||
//===================================
|
||||
|
||||
// base angles
|
||||
angles = ent->client->ps.kick_angles;
|
||||
|
@ -289,7 +289,7 @@ void SV_CalcViewOffset (edict_t *ent)
|
|||
angles[ROLL] += delta;
|
||||
}
|
||||
|
||||
//===================================
|
||||
//===================================
|
||||
|
||||
// base origin
|
||||
|
||||
|
@ -377,7 +377,6 @@ void SV_CalcGunOffset (edict_t *ent)
|
|||
|
||||
// gun height
|
||||
VectorClear (ent->client->ps.gunoffset);
|
||||
// ent->ps->gunorigin[2] += bob;
|
||||
|
||||
// gun_x / gun_y / gun_z are development tools
|
||||
for (i=0 ; i<3 ; i++)
|
||||
|
|
|
@ -1430,5 +1430,3 @@ void Weapon_BFG (edict_t *ent)
|
|||
Weapon_Generic (ent, 8, 32, 55, 58, pause_frames, fire_frames, weapon_bfg_fire);
|
||||
}
|
||||
|
||||
|
||||
//======================================================================
|
||||
|
|
|
@ -25,10 +25,6 @@ vec3_t vec3_origin = {0,0,0};
|
|||
|
||||
//============================================================================
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize( "", off )
|
||||
#endif
|
||||
|
||||
void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees )
|
||||
{
|
||||
float m[3][3];
|
||||
|
@ -84,12 +80,6 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void AngleVectors (vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
|
||||
{
|
||||
float angle;
|
||||
|
@ -250,30 +240,11 @@ void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4])
|
|||
|
||||
float Q_fabs (float f)
|
||||
{
|
||||
#if 0
|
||||
if (f >= 0)
|
||||
return f;
|
||||
return -f;
|
||||
#else
|
||||
int tmp = * ( int * ) &f;
|
||||
tmp &= 0x7FFFFFFF;
|
||||
return * ( float * ) &tmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined _M_IX86 && !defined C_ONLY
|
||||
#pragma warning (disable:4035)
|
||||
__declspec( naked ) long Q_ftol( float f )
|
||||
{
|
||||
static int tmp;
|
||||
__asm fld dword ptr [esp+4]
|
||||
__asm fistp tmp
|
||||
__asm mov eax, tmp
|
||||
__asm ret
|
||||
}
|
||||
#pragma warning (default:4035)
|
||||
#endif
|
||||
|
||||
/*
|
||||
===============
|
||||
LerpAngle
|
||||
|
@ -292,12 +263,6 @@ float LerpAngle (float a2, float a1, float frac)
|
|||
|
||||
float anglemod(float a)
|
||||
{
|
||||
#if 0
|
||||
if (a >= 0)
|
||||
a -= 360*(int)(a/360);
|
||||
else
|
||||
a += 360*( 1 + (int)(-a/360) );
|
||||
#endif
|
||||
a = (360.0/65536) * ((int)(a*(65536/360.0)) & 65535);
|
||||
return a;
|
||||
}
|
||||
|
@ -345,13 +310,12 @@ BoxOnPlaneSide
|
|||
Returns 1, 2, or 1 + 2
|
||||
==================
|
||||
*/
|
||||
#if !id386 || defined __linux__ || defined __FreeBSD__ || defined __sun__
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
float dist1, dist2;
|
||||
int sides;
|
||||
|
||||
// fast axial cases
|
||||
// fast axial cases
|
||||
if (p->type < 3)
|
||||
{
|
||||
if (p->dist <= emins[p->type])
|
||||
|
@ -361,42 +325,42 @@ int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
|||
return 3;
|
||||
}
|
||||
|
||||
// general case
|
||||
// general case
|
||||
switch (p->signbits)
|
||||
{
|
||||
case 0:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
case 0:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
break;
|
||||
case 1:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
case 1:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
break;
|
||||
case 2:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
case 2:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
break;
|
||||
case 3:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
case 3:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
break;
|
||||
case 4:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
case 4:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
break;
|
||||
case 5:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
case 5:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
|
||||
break;
|
||||
case 6:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
case 6:
|
||||
dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
break;
|
||||
case 7:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
case 7:
|
||||
dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
|
||||
dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
dist1 = dist2 = 0; // shut up compiler
|
||||
assert( 0 );
|
||||
break;
|
||||
|
@ -412,240 +376,6 @@ dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
|
|||
|
||||
return sides;
|
||||
}
|
||||
#else
|
||||
#pragma warning( disable: 4035 )
|
||||
|
||||
__declspec( naked ) int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
static int bops_initialized;
|
||||
static int Ljmptab[8];
|
||||
|
||||
__asm {
|
||||
|
||||
push ebx
|
||||
|
||||
cmp bops_initialized, 1
|
||||
je initialized
|
||||
mov bops_initialized, 1
|
||||
|
||||
mov Ljmptab[0*4], offset Lcase0
|
||||
mov Ljmptab[1*4], offset Lcase1
|
||||
mov Ljmptab[2*4], offset Lcase2
|
||||
mov Ljmptab[3*4], offset Lcase3
|
||||
mov Ljmptab[4*4], offset Lcase4
|
||||
mov Ljmptab[5*4], offset Lcase5
|
||||
mov Ljmptab[6*4], offset Lcase6
|
||||
mov Ljmptab[7*4], offset Lcase7
|
||||
|
||||
initialized:
|
||||
|
||||
mov edx,ds:dword ptr[4+12+esp]
|
||||
mov ecx,ds:dword ptr[4+4+esp]
|
||||
xor eax,eax
|
||||
mov ebx,ds:dword ptr[4+8+esp]
|
||||
mov al,ds:byte ptr[17+edx]
|
||||
cmp al,8
|
||||
jge Lerror
|
||||
fld ds:dword ptr[0+edx]
|
||||
fld st(0)
|
||||
jmp dword ptr[Ljmptab+eax*4]
|
||||
Lcase0:
|
||||
fmul ds:dword ptr[ebx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase1:
|
||||
fmul ds:dword ptr[ecx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase2:
|
||||
fmul ds:dword ptr[ebx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase3:
|
||||
fmul ds:dword ptr[ecx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase4:
|
||||
fmul ds:dword ptr[ebx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase5:
|
||||
fmul ds:dword ptr[ecx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase6:
|
||||
fmul ds:dword ptr[ebx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ecx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
jmp LSetSides
|
||||
Lcase7:
|
||||
fmul ds:dword ptr[ecx]
|
||||
fld ds:dword ptr[0+4+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[4+ecx]
|
||||
fld ds:dword ptr[0+8+edx]
|
||||
fxch st(2)
|
||||
fmul ds:dword ptr[4+ebx]
|
||||
fxch st(2)
|
||||
fld st(0)
|
||||
fmul ds:dword ptr[8+ecx]
|
||||
fxch st(5)
|
||||
faddp st(3),st(0)
|
||||
fmul ds:dword ptr[8+ebx]
|
||||
fxch st(1)
|
||||
faddp st(3),st(0)
|
||||
fxch st(3)
|
||||
faddp st(2),st(0)
|
||||
LSetSides:
|
||||
faddp st(2),st(0)
|
||||
fcomp ds:dword ptr[12+edx]
|
||||
xor ecx,ecx
|
||||
fnstsw ax
|
||||
fcomp ds:dword ptr[12+edx]
|
||||
and ah,1
|
||||
xor ah,1
|
||||
add cl,ah
|
||||
fnstsw ax
|
||||
and ah,1
|
||||
add ah,ah
|
||||
add cl,ah
|
||||
pop ebx
|
||||
mov eax,ecx
|
||||
ret
|
||||
Lerror:
|
||||
int 3
|
||||
}
|
||||
}
|
||||
#pragma warning( default: 4035 )
|
||||
#endif
|
||||
|
||||
void ClearBounds (vec3_t mins, vec3_t maxs)
|
||||
{
|
||||
|
@ -907,10 +637,10 @@ COM_DefaultExtension
|
|||
void COM_DefaultExtension (char *path, char *extension)
|
||||
{
|
||||
char *src;
|
||||
//
|
||||
// if path doesn't have a .EXT, append extension
|
||||
// (extension should include the .)
|
||||
//
|
||||
//
|
||||
// if path doesn't have a .EXT, append extension
|
||||
// (extension should include the .)
|
||||
//
|
||||
src = path + strlen(path) - 1;
|
||||
|
||||
while (*src != '/' && src != path)
|
||||
|
@ -1012,7 +742,7 @@ void Swap_Init (void)
|
|||
{
|
||||
byte swaptest[2] = {1,0};
|
||||
|
||||
// set the byte swapping variables in a portable manner
|
||||
// set the byte swapping variables in a portable manner
|
||||
if ( *(short *)swaptest == 1)
|
||||
{
|
||||
bigendien = false;
|
||||
|
@ -1085,7 +815,7 @@ char *COM_Parse (char **data_p)
|
|||
return "";
|
||||
}
|
||||
|
||||
// skip whitespace
|
||||
// skip whitespace
|
||||
skipwhite:
|
||||
while ( (c = *data) <= ' ')
|
||||
{
|
||||
|
@ -1097,7 +827,7 @@ skipwhite:
|
|||
data++;
|
||||
}
|
||||
|
||||
// skip // comments
|
||||
// skip // comments
|
||||
if (c=='/' && data[1] == '/')
|
||||
{
|
||||
while (*data && *data != '\n')
|
||||
|
@ -1105,7 +835,7 @@ skipwhite:
|
|||
goto skipwhite;
|
||||
}
|
||||
|
||||
// handle quoted strings specially
|
||||
// handle quoted strings specially
|
||||
if (c == '\"')
|
||||
{
|
||||
data++;
|
||||
|
@ -1126,7 +856,7 @@ skipwhite:
|
|||
}
|
||||
}
|
||||
|
||||
// parse a regular word
|
||||
// parse a regular word
|
||||
do
|
||||
{
|
||||
if (len < MAX_TOKEN_CHARS)
|
||||
|
@ -1140,7 +870,6 @@ skipwhite:
|
|||
|
||||
if (len == MAX_TOKEN_CHARS)
|
||||
{
|
||||
// Com_Printf ("Token exceeded %i chars, discarded.\n", MAX_TOKEN_CHARS);
|
||||
len = 0;
|
||||
}
|
||||
com_token[len] = 0;
|
||||
|
@ -1178,24 +907,10 @@ void Com_PageInMemory (byte *buffer, int size)
|
|||
|
||||
/* PATCH: matt */
|
||||
/* use our own strncasecmp instead of this implementation */
|
||||
#ifdef sun
|
||||
|
||||
#define Q_strncasecmp(s1, s2, n) (strncasecmp(s1, s2, n))
|
||||
|
||||
int Q_stricmp (char *s1, char *s2) {
|
||||
return strcasecmp(s1, s2);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// FIXME: replace all Q_stricmp with Q_strcasecmp
|
||||
int Q_stricmp (char *s1, char *s2)
|
||||
{
|
||||
#if defined(WIN32)
|
||||
return _stricmp (s1, s2);
|
||||
#else
|
||||
return strcasecmp (s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1224,7 +939,6 @@ int Q_strncasecmp (char *s1, char *s2, int n)
|
|||
|
||||
return 0; // strings are equal
|
||||
}
|
||||
#endif
|
||||
|
||||
int Q_strcasecmp (char *s1, char *s2)
|
||||
{
|
||||
|
@ -1314,7 +1028,6 @@ void Info_RemoveKey (char *s, char *key)
|
|||
|
||||
if (strstr (key, "\\"))
|
||||
{
|
||||
// Com_Printf ("Can't use a key with a \\\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1426,6 +1139,3 @@ void Info_SetValueForKey (char *s, char *key, char *value)
|
|||
*s = 0;
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
|
||||
|
||||
|
|
|
@ -20,18 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
// q_shared.h -- included first by ALL program modules
|
||||
|
||||
#ifdef _WIN32
|
||||
// unknown pragmas are SUPPOSED to be ignored, but....
|
||||
#pragma warning(disable : 4244) // MIPS
|
||||
#pragma warning(disable : 4136) // X86
|
||||
#pragma warning(disable : 4051) // ALPHA
|
||||
|
||||
#pragma warning(disable : 4018) // signed/unsigned mismatch
|
||||
#pragma warning(disable : 4305) // truncation from const double to float
|
||||
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
@ -40,18 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#if (defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__
|
||||
#define id386 1
|
||||
#else
|
||||
#define id386 0
|
||||
#endif
|
||||
|
||||
#if defined _M_ALPHA && !defined C_ONLY
|
||||
#define idaxp 1
|
||||
#else
|
||||
#define idaxp 0
|
||||
#endif
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef enum {false, true} qboolean;
|
||||
|
||||
|
@ -146,11 +122,7 @@ extern vec3_t vec3_origin;
|
|||
// microsoft's fabs seems to be ungodly slow...
|
||||
//float Q_fabs (float f);
|
||||
//#define fabs(f) Q_fabs(f)
|
||||
#if defined _WIN32 && !defined C_ONLY
|
||||
extern long Q_ftol( float f );
|
||||
#else
|
||||
#define Q_ftol( f ) ( long ) (f)
|
||||
#endif
|
||||
|
||||
#define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])
|
||||
#define VectorSubtract(a,b,c) (c[0]=a[0]-b[0],c[1]=a[1]-b[1],c[2]=a[2]-b[2])
|
||||
|
@ -381,11 +353,6 @@ COLLISION DETECTION
|
|||
#define SURF_FLOWING 0x40 // scroll towards angle
|
||||
#define SURF_NODRAW 0x80 // don't bother referencing the texture
|
||||
|
||||
#ifdef QMAX
|
||||
#define SURF_WAVES_1 0x100
|
||||
#define SURF_WAVES_2 0x200
|
||||
#endif
|
||||
|
||||
// content masks
|
||||
#define MASK_ALL (-1)
|
||||
#define MASK_SOLID (CONTENTS_SOLID|CONTENTS_WINDOW)
|
||||
|
@ -632,15 +599,6 @@ typedef struct
|
|||
#define RF_USE_DISGUISE 0x00040000
|
||||
//ROGUE
|
||||
|
||||
#ifdef QMAX
|
||||
#define RF_TRANS_ADDITIVE 8192
|
||||
#define RF_MIRRORMODEL 0x00004000
|
||||
|
||||
#define RF2_NOSHADOW 0x00000001 //no shadow..
|
||||
#define RF2_FORCE_SHADOW 0x00000002 //forced shadow...
|
||||
#define RF2_CAMERAMODEL 0x00000004
|
||||
#endif
|
||||
|
||||
// player_state_t->refdef flags
|
||||
#define RDF_UNDERWATER 1 // warp the screen as apropriate
|
||||
#define RDF_NOWORLDMODEL 2 // used for player configuration screen
|
||||
|
@ -962,7 +920,7 @@ typedef enum
|
|||
TE_BLUEHYPERBLASTER,
|
||||
TE_PLASMA_EXPLOSION,
|
||||
TE_TUNNEL_SPARKS,
|
||||
//ROGUE
|
||||
//ROGUE
|
||||
TE_BLASTER2,
|
||||
TE_RAILTRAIL2,
|
||||
TE_FLAME,
|
||||
|
@ -989,7 +947,7 @@ typedef enum
|
|||
TE_EXPLOSION1_BIG,
|
||||
TE_EXPLOSION1_NP,
|
||||
TE_FLECHETTE
|
||||
//ROGUE
|
||||
//ROGUE
|
||||
} temp_event_t;
|
||||
|
||||
#define SPLASH_UNKNOWN 0
|
||||
|
@ -1072,36 +1030,6 @@ typedef enum
|
|||
#define DF_NO_SPHERES 0x00100000
|
||||
//ROGUE
|
||||
|
||||
/*
|
||||
ROGUE - VERSIONS
|
||||
1234 08/13/1998 Activision
|
||||
1235 08/14/1998 Id Software
|
||||
1236 08/15/1998 Steve Tietze
|
||||
1237 08/15/1998 Phil Dobranski
|
||||
1238 08/15/1998 John Sheley
|
||||
1239 08/17/1998 Barrett Alexander
|
||||
1230 08/17/1998 Brandon Fish
|
||||
1245 08/17/1998 Don MacAskill
|
||||
1246 08/17/1998 David "Zoid" Kirsch
|
||||
1247 08/17/1998 Manu Smith
|
||||
1248 08/17/1998 Geoff Scully
|
||||
1249 08/17/1998 Andy Van Fossen
|
||||
1240 08/20/1998 Activision Build 2
|
||||
1256 08/20/1998 Ranger Clan
|
||||
1257 08/20/1998 Ensemble Studios
|
||||
1258 08/21/1998 Robert Duffy
|
||||
1259 08/21/1998 Stephen Seachord
|
||||
1250 08/21/1998 Stephen Heaslip
|
||||
1267 08/21/1998 Samir Sandesara
|
||||
1268 08/21/1998 Oliver Wyman
|
||||
1269 08/21/1998 Steven Marchegiano
|
||||
1260 08/21/1998 Build #2 for Nihilistic
|
||||
1278 08/21/1998 Build #2 for Ensemble
|
||||
|
||||
9999 08/20/1998 Internal Use
|
||||
*/
|
||||
#define ROGUE_VERSION_ID 1278
|
||||
|
||||
#define ROGUE_VERSION_STRING "08/21/1998 Beta 2 for Ensemble"
|
||||
|
||||
// ROGUE
|
||||
|
@ -1239,3 +1167,4 @@ extern int vidref_val;
|
|||
*/
|
||||
size_t verify_fread( void *, size_t, size_t, FILE * );
|
||||
size_t verify_fwrite( void *, size_t, size_t, FILE * );
|
||||
|
||||
|
|
Loading…
Reference in a new issue