mirror of
https://github.com/id-Software/quake2-rerelease-dll.git
synced 2025-03-14 12:20:45 +00:00
Trying to remove more dependencies from xatrix and rogue
This commit is contained in:
parent
63ac5bcc94
commit
e6f86e95bc
16 changed files with 235 additions and 3335 deletions
|
@ -838,13 +838,13 @@ bool FindTarget(edict_t *self)
|
|||
//
|
||||
// got one
|
||||
//
|
||||
// ROGUE - if we got an enemy, we need to bail out of hint paths, so take over here
|
||||
if (self->monsterinfo.aiflags & AI_HINT_PATH)
|
||||
hintpath_stop(self); // this calls foundtarget for us
|
||||
else
|
||||
FoundTarget(self);
|
||||
// // ROGUE - if we got an enemy, we need to bail out of hint paths, so take over here
|
||||
// if (self->monsterinfo.aiflags & AI_HINT_PATH)
|
||||
// //hintpath_stop(self); // this calls foundtarget for us
|
||||
// else
|
||||
// FoundTarget(self);
|
||||
|
||||
// ROGUE
|
||||
// // ROGUE
|
||||
if (!(self->monsterinfo.aiflags & AI_SOUND_TARGET) && (self->monsterinfo.sight) &&
|
||||
// Paril: adjust to prevent monsters getting stuck in sight loops
|
||||
!ignore_sight_sound)
|
||||
|
@ -1136,7 +1136,7 @@ void ai_run_slide(edict_t *self, float distance)
|
|||
// PMM - if we're dodging, give up on it and go straight
|
||||
if (self->monsterinfo.aiflags & AI_DODGING)
|
||||
{
|
||||
monster_done_dodge(self);
|
||||
//monster_done_dodge(self);
|
||||
// by setting as_straight, caller will know to try straight move
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
return;
|
||||
|
@ -1147,7 +1147,7 @@ void ai_run_slide(edict_t *self, float distance)
|
|||
return;
|
||||
// PMM - if we're dodging, give up on it and go straight
|
||||
if (self->monsterinfo.aiflags & AI_DODGING)
|
||||
monster_done_dodge(self);
|
||||
//monster_done_dodge(self);
|
||||
|
||||
// PMM - the move failed, so signal the caller (ai_run) to try going straight
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
|
@ -1435,20 +1435,20 @@ void ai_run(edict_t *self, float dist)
|
|||
else // uh oh, can't figure out enemy, bail
|
||||
{
|
||||
self->enemy = nullptr;
|
||||
hintpath_stop(self);
|
||||
//hintpath_stop(self);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self->enemy = nullptr;
|
||||
hintpath_stop(self);
|
||||
//hintpath_stop(self);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hintpath_stop(self);
|
||||
//hintpath_stop(self);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1469,7 +1469,7 @@ void ai_run(edict_t *self, float dist)
|
|||
// if we see the player, stop following hintpaths.
|
||||
if (gotcha)
|
||||
// disconnect from hintpaths and start looking normally for players.
|
||||
hintpath_stop(self);
|
||||
//hintpath_stop(self);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -89,10 +89,10 @@ void Killed(edict_t *targ, edict_t *inflictor, edict_t *attacker, int damage, co
|
|||
// [Paril-KEX]
|
||||
if ((targ->svflags & SVF_MONSTER) && targ->monsterinfo.aiflags & AI_MEDIC)
|
||||
{
|
||||
if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
{
|
||||
cleanupHealTarget(targ->enemy);
|
||||
}
|
||||
// if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
// {
|
||||
// cleanupHealTarget(targ->enemy);
|
||||
// }
|
||||
|
||||
// clean up self
|
||||
targ->monsterinfo.aiflags &= ~AI_MEDIC;
|
||||
|
@ -306,13 +306,13 @@ void M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor)
|
|||
// logic for tesla - if you are hit by a tesla, and can't see who you should be mad at (attacker)
|
||||
// attack the tesla
|
||||
// also, target the tesla if it's a "new" tesla
|
||||
if ((inflictor) && (!strcmp(inflictor->classname, "tesla_mine")))
|
||||
{
|
||||
new_tesla = MarkTeslaArea(targ, inflictor);
|
||||
if ((new_tesla || brandom()) && (!targ->enemy || !targ->enemy->classname || strcmp(targ->enemy->classname, "tesla_mine")))
|
||||
TargetTesla(targ, inflictor);
|
||||
return;
|
||||
}
|
||||
// if ((inflictor) && (!strcmp(inflictor->classname, "tesla_mine")))
|
||||
// {
|
||||
// new_tesla = MarkTeslaArea(targ, inflictor);
|
||||
// if ((new_tesla || brandom()) && (!targ->enemy || !targ->enemy->classname || strcmp(targ->enemy->classname, "tesla_mine")))
|
||||
// TargetTesla(targ, inflictor);
|
||||
// return;
|
||||
// }
|
||||
// ROGUE
|
||||
//=======
|
||||
|
||||
|
@ -363,7 +363,7 @@ void M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor)
|
|||
return;
|
||||
|
||||
// remove the medic flag
|
||||
cleanupHealTarget(targ->enemy);
|
||||
//cleanupHealTarget(targ->enemy);
|
||||
targ->monsterinfo.aiflags &= ~AI_MEDIC;
|
||||
}
|
||||
// PMM
|
||||
|
@ -393,10 +393,10 @@ void M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor)
|
|||
// [Paril-KEX]
|
||||
if ((targ->svflags & SVF_MONSTER) && targ->monsterinfo.aiflags & AI_MEDIC)
|
||||
{
|
||||
if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
{
|
||||
cleanupHealTarget(targ->enemy);
|
||||
}
|
||||
// if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
// {
|
||||
// //cleanupHealTarget(targ->enemy);
|
||||
// }
|
||||
|
||||
// clean up self
|
||||
targ->monsterinfo.aiflags &= ~AI_MEDIC;
|
||||
|
@ -421,10 +421,10 @@ void M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor)
|
|||
// [Paril-KEX]
|
||||
if ((targ->svflags & SVF_MONSTER) && targ->monsterinfo.aiflags & AI_MEDIC)
|
||||
{
|
||||
if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
{
|
||||
cleanupHealTarget(targ->enemy);
|
||||
}
|
||||
// if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
// {
|
||||
// cleanupHealTarget(targ->enemy);
|
||||
// }
|
||||
|
||||
// clean up self
|
||||
targ->monsterinfo.aiflags &= ~AI_MEDIC;
|
||||
|
@ -445,10 +445,10 @@ void M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor)
|
|||
// [Paril-KEX]
|
||||
if ((targ->svflags & SVF_MONSTER) && targ->monsterinfo.aiflags & AI_MEDIC)
|
||||
{
|
||||
if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
{
|
||||
cleanupHealTarget(targ->enemy);
|
||||
}
|
||||
// if (targ->enemy && targ->enemy->inuse && (targ->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
// {
|
||||
// cleanupHealTarget(targ->enemy);
|
||||
// }
|
||||
|
||||
// clean up self
|
||||
targ->monsterinfo.aiflags &= ~AI_MEDIC;
|
||||
|
|
|
@ -434,7 +434,7 @@ MOVEINFO_ENDFUNC(plat_hit_bottom) (edict_t *ent) -> void
|
|||
ent->moveinfo.state = STATE_BOTTOM;
|
||||
|
||||
// ROGUE
|
||||
plat2_kill_danger_area(ent);
|
||||
//plat2_kill_danger_area(ent);
|
||||
// ROGUE
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ void plat_go_up(edict_t *ent)
|
|||
Move_Calc(ent, ent->moveinfo.start_origin, plat_hit_top);
|
||||
|
||||
// ROGUE
|
||||
plat2_spawn_danger_area(ent);
|
||||
//plat2_spawn_danger_area(ent);
|
||||
// ROGUE
|
||||
}
|
||||
|
||||
|
|
|
@ -180,21 +180,21 @@ THINK(DoRespawn) (edict_t *ent) -> void
|
|||
ent->s.event = EV_ITEM_RESPAWN;
|
||||
|
||||
// ROGUE
|
||||
if (g_dm_random_items->integer)
|
||||
{
|
||||
item_id_t new_item = DoRandomRespawn(ent);
|
||||
// if (g_dm_random_items->integer)
|
||||
// {
|
||||
// item_id_t new_item = DoRandomRespawn(ent);
|
||||
|
||||
// if we've changed entities, then do some sleight of hand.
|
||||
// otherwise, the old entity will respawn
|
||||
if (new_item)
|
||||
{
|
||||
ent->item = GetItemByIndex(new_item);
|
||||
// // if we've changed entities, then do some sleight of hand.
|
||||
// // otherwise, the old entity will respawn
|
||||
// if (new_item)
|
||||
// {
|
||||
// ent->item = GetItemByIndex(new_item);
|
||||
|
||||
ent->classname = ent->item->classname;
|
||||
ent->s.effects = ent->item->world_model_flags;
|
||||
gi.setmodel(ent, ent->item->world_model);
|
||||
}
|
||||
}
|
||||
// ent->classname = ent->item->classname;
|
||||
// ent->s.effects = ent->item->world_model_flags;
|
||||
// gi.setmodel(ent, ent->item->world_model);
|
||||
// }
|
||||
// }
|
||||
// ROGUE
|
||||
}
|
||||
|
||||
|
@ -1082,7 +1082,7 @@ void SpawnItem(edict_t *ent, gitem_t *item)
|
|||
// [Kex] In instagib, spawn no pickups!
|
||||
if (g_instagib->value)
|
||||
{
|
||||
if (item->pickup == Pickup_Powerup || item->pickup == Pickup_Sphere || item->pickup == Pickup_Doppleganger ||
|
||||
if (item->pickup == Pickup_Powerup ||
|
||||
(item->flags & IF_HEALTH) || (item->flags & IF_AMMO) || item->pickup == Pickup_Weapon || item->pickup == Pickup_Pack)
|
||||
{
|
||||
G_FreeEdict(ent);
|
||||
|
@ -1097,21 +1097,21 @@ void SpawnItem(edict_t *ent, gitem_t *item)
|
|||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
//=====
|
||||
// ROGUE
|
||||
if (item->pickup == Pickup_Sphere)
|
||||
{
|
||||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
if (item->pickup == Pickup_Doppleganger)
|
||||
{
|
||||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
// ROGUE
|
||||
//=====
|
||||
}
|
||||
// //=====
|
||||
// // ROGUE
|
||||
// if (item->pickup == Pickup_Sphere)
|
||||
// {
|
||||
// G_FreeEdict(ent);
|
||||
// return;
|
||||
// }
|
||||
// if (item->pickup == Pickup_Doppleganger)
|
||||
// {
|
||||
// G_FreeEdict(ent);
|
||||
// return;
|
||||
// }
|
||||
// // ROGUE
|
||||
// //=====
|
||||
// }
|
||||
if (g_no_health->integer)
|
||||
{
|
||||
if (item->flags & IF_HEALTH)
|
||||
|
@ -1129,14 +1129,14 @@ void SpawnItem(edict_t *ent, gitem_t *item)
|
|||
}
|
||||
}
|
||||
|
||||
if (g_no_spheres->integer)
|
||||
{
|
||||
if (item->pickup == Pickup_Sphere)
|
||||
{
|
||||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if (g_no_spheres->integer)
|
||||
// {
|
||||
// if (item->pickup == Pickup_Sphere)
|
||||
// {
|
||||
// G_FreeEdict(ent);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// ROGUE
|
||||
//==========
|
||||
}
|
||||
|
@ -1144,21 +1144,21 @@ void SpawnItem(edict_t *ent, gitem_t *item)
|
|||
//==========
|
||||
// ROGUE
|
||||
// DM only items
|
||||
if (!deathmatch->integer)
|
||||
{
|
||||
if (item->pickup == Pickup_Doppleganger || item->pickup == Pickup_Nuke)
|
||||
{
|
||||
gi.Com_PrintFmt("{} spawned in non-DM; freeing...\n", *ent);
|
||||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
if ((item->use == Use_Vengeance) || (item->use == Use_Hunter))
|
||||
{
|
||||
gi.Com_PrintFmt("{} spawned in non-DM; freeing...\n", *ent);
|
||||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if (!deathmatch->integer)
|
||||
// {
|
||||
// if (item->pickup == Pickup_Doppleganger || item->pickup == Pickup_Nuke)
|
||||
// {
|
||||
// gi.Com_PrintFmt("{} spawned in non-DM; freeing...\n", *ent);
|
||||
// G_FreeEdict(ent);
|
||||
// return;
|
||||
// }
|
||||
// if ((item->use == Use_Vengeance) || (item->use == Use_Hunter))
|
||||
// {
|
||||
// gi.Com_PrintFmt("{} spawned in non-DM; freeing...\n", *ent);
|
||||
// G_FreeEdict(ent);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// ZOID
|
||||
// Don't spawn the flags unless enabled
|
||||
if (!ctf->integer && (item->id == IT_FLAG1 || item->id == IT_FLAG2))
|
||||
|
@ -1188,8 +1188,8 @@ void SpawnItem(edict_t *ent, gitem_t *item)
|
|||
if (ent->model)
|
||||
gi.modelindex(ent->model);
|
||||
|
||||
if (ent->spawnflags.has(SPAWNFLAG_ITEM_TRIGGER_SPAWN))
|
||||
SetTriggeredSpawn(ent);
|
||||
// if (ent->spawnflags.has(SPAWNFLAG_ITEM_TRIGGER_SPAWN))
|
||||
// SetTriggeredSpawn(ent);
|
||||
|
||||
// ZOID
|
||||
// flags are server animated and have special handling
|
||||
|
|
|
@ -2272,7 +2272,7 @@ void Killed(edict_t *targ, edict_t *inflictor, edict_t *attacker, int damage, co
|
|||
void T_RadiusNukeDamage(edict_t *inflictor, edict_t *attacker, float damage, edict_t *ignore, float radius, mod_t mod);
|
||||
void T_RadiusClassDamage(edict_t *inflictor, edict_t *attacker, float damage, char *ignoreClass, float radius,
|
||||
mod_t mod);
|
||||
void cleanupHealTarget(edict_t *ent);
|
||||
//void cleanupHealTarget(edict_t *ent);
|
||||
// ROGUE
|
||||
|
||||
constexpr int32_t DEFAULT_BULLET_HSPREAD = 300;
|
||||
|
@ -2310,8 +2310,7 @@ void monster_fire_shotgun(edict_t *self, const vec3_t &start, const vec3_t &aimd
|
|||
int vspread, int count, monster_muzzleflash_id_t flashtype);
|
||||
void monster_fire_blaster(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed,
|
||||
monster_muzzleflash_id_t flashtype, effects_t effect);
|
||||
void monster_fire_flechette(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed,
|
||||
monster_muzzleflash_id_t flashtype);
|
||||
//void monster_fire_flechette(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed, monster_muzzleflash_id_t flashtype);
|
||||
void monster_fire_grenade(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed,
|
||||
monster_muzzleflash_id_t flashtype, float right_adjust, float up_adjust);
|
||||
void monster_fire_rocket(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed,
|
||||
|
@ -2369,7 +2368,7 @@ void monster_fire_tracker(edict_t *self, const vec3_t &start, const vec3_t &dir,
|
|||
void monster_fire_heatbeam(edict_t *self, const vec3_t &start, const vec3_t &dir, const vec3_t &offset, int damage,
|
||||
int kick, monster_muzzleflash_id_t flashtype);
|
||||
void stationarymonster_start(edict_t *self);
|
||||
void monster_done_dodge(edict_t *self);
|
||||
//void monster_done_dodge(edict_t *self);
|
||||
// ROGUE
|
||||
|
||||
stuck_result_t G_FixStuckObject(edict_t *self, vec3_t check);
|
||||
|
@ -2680,16 +2679,16 @@ void GetChaseTarget(edict_t *ent);
|
|||
//
|
||||
// g_newweap.c
|
||||
//
|
||||
void fire_flechette(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed, int kick);
|
||||
void fire_prox(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed);
|
||||
void fire_nuke(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int speed);
|
||||
bool fire_player_melee(edict_t *self, const vec3_t &start, const vec3_t &aim, int reach, int damage, int kick, mod_t mod);
|
||||
void fire_tesla(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed);
|
||||
void fire_blaster2(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed, effects_t effect,
|
||||
bool hyper);
|
||||
void fire_heatbeam(edict_t *self, const vec3_t &start, const vec3_t &aimdir, const vec3_t &offset, int damage, int kick,
|
||||
bool monster);
|
||||
void fire_tracker(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed, edict_t *enemy);
|
||||
// void fire_flechette(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed, int kick);
|
||||
// void fire_prox(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed);
|
||||
// void fire_nuke(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int speed);
|
||||
// bool fire_player_melee(edict_t *self, const vec3_t &start, const vec3_t &aim, int reach, int damage, int kick, mod_t mod);
|
||||
// void fire_tesla(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed);
|
||||
// void fire_blaster2(edict_t *self, const vec3_t &start, const vec3_t &aimdir, int damage, int speed, effects_t effect,
|
||||
// bool hyper);
|
||||
// void fire_heatbeam(edict_t *self, const vec3_t &start, const vec3_t &aimdir, const vec3_t &offset, int damage, int kick,
|
||||
// bool monster);
|
||||
// void fire_tracker(edict_t *self, const vec3_t &start, const vec3_t &dir, int damage, int speed, edict_t *enemy);
|
||||
|
||||
//
|
||||
// g_newai.c
|
||||
|
@ -2710,8 +2709,8 @@ bool inback(edict_t *self, edict_t *other);
|
|||
float realrange(edict_t *self, edict_t *other);
|
||||
edict_t *SpawnBadArea(const vec3_t &mins, const vec3_t &maxs, gtime_t lifespan, edict_t *owner);
|
||||
edict_t *CheckForBadArea(edict_t *ent);
|
||||
bool MarkTeslaArea(edict_t *self, edict_t *tesla);
|
||||
void InitHintPaths();
|
||||
//bool MarkTeslaArea(edict_t *self, edict_t *tesla);
|
||||
//void InitHintPaths();
|
||||
void PredictAim(edict_t *self, edict_t *target, const vec3_t &start, float bolt_speed, bool eye_height, float offset, vec3_t *aimdir,
|
||||
vec3_t *aimpoint);
|
||||
bool M_CalculatePitchToFire(edict_t *self, const vec3_t &target, const vec3_t &start, vec3_t &aim, float speed, float time_remaining, bool mortar, bool destroy_on_touch = false);
|
||||
|
@ -2722,16 +2721,16 @@ void monster_duck_down(edict_t *self);
|
|||
void monster_duck_hold(edict_t *self);
|
||||
void monster_duck_up(edict_t *self);
|
||||
bool has_valid_enemy(edict_t *self);
|
||||
void TargetTesla(edict_t *self, edict_t *tesla);
|
||||
void hintpath_stop(edict_t *self);
|
||||
//void TargetTesla(edict_t *self, edict_t *tesla);
|
||||
//void hintpath_stop(edict_t *self);
|
||||
edict_t *PickCoopTarget(edict_t *self);
|
||||
int CountPlayers();
|
||||
bool monster_jump_finished(edict_t *self);
|
||||
void BossExplode(edict_t *self);
|
||||
|
||||
// g_rogue_func
|
||||
void plat2_spawn_danger_area(edict_t *ent);
|
||||
void plat2_kill_danger_area(edict_t *ent);
|
||||
// void plat2_spawn_danger_area(edict_t *ent);
|
||||
// void plat2_kill_danger_area(edict_t *ent);
|
||||
|
||||
// g_rogue_spawn
|
||||
edict_t *CreateMonster(const vec3_t &origin, const vec3_t &angles, const char *classname);
|
||||
|
@ -2748,18 +2747,18 @@ void SpawnGrow_Spawn(const vec3_t &startpos, float start_size, float end_size);
|
|||
void Widowlegs_Spawn(const vec3_t &startpos, const vec3_t &angles);
|
||||
|
||||
// g_rogue_items
|
||||
bool Pickup_Nuke(edict_t *ent, edict_t *other);
|
||||
void Use_IR(edict_t *ent, gitem_t *item);
|
||||
void Use_Double(edict_t *ent, gitem_t *item);
|
||||
void Use_Nuke(edict_t *ent, gitem_t *item);
|
||||
void Use_Doppleganger(edict_t *ent, gitem_t *item);
|
||||
bool Pickup_Doppleganger(edict_t *ent, edict_t *other);
|
||||
bool Pickup_Sphere(edict_t *ent, edict_t *other);
|
||||
void Use_Defender(edict_t *ent, gitem_t *item);
|
||||
void Use_Hunter(edict_t *ent, gitem_t *item);
|
||||
void Use_Vengeance(edict_t *ent, gitem_t *item);
|
||||
void Item_TriggeredSpawn(edict_t *self, edict_t *other, edict_t *activator);
|
||||
void SetTriggeredSpawn(edict_t *ent);
|
||||
// bool Pickup_Nuke(edict_t *ent, edict_t *other);
|
||||
// void Use_IR(edict_t *ent, gitem_t *item);
|
||||
// void Use_Double(edict_t *ent, gitem_t *item);
|
||||
// void Use_Nuke(edict_t *ent, gitem_t *item);
|
||||
// void Use_Doppleganger(edict_t *ent, gitem_t *item);
|
||||
// bool Pickup_Doppleganger(edict_t *ent, edict_t *other);
|
||||
// bool Pickup_Sphere(edict_t *ent, edict_t *other);
|
||||
// void Use_Defender(edict_t *ent, gitem_t *item);
|
||||
// void Use_Hunter(edict_t *ent, gitem_t *item);
|
||||
// void Use_Vengeance(edict_t *ent, gitem_t *item);
|
||||
// void Item_TriggeredSpawn(edict_t *self, edict_t *other, edict_t *activator);
|
||||
// void SetTriggeredSpawn(edict_t *ent);
|
||||
|
||||
//
|
||||
// g_sphere.c
|
||||
|
@ -2771,12 +2770,12 @@ void Hunter_Launch(edict_t *self);
|
|||
//
|
||||
// g_newdm.c
|
||||
//
|
||||
void InitGameRules();
|
||||
item_id_t DoRandomRespawn(edict_t *ent);
|
||||
void PrecacheForRandomRespawn();
|
||||
bool Tag_PickupToken(edict_t *ent, edict_t *other);
|
||||
void Tag_DropToken(edict_t *ent, gitem_t *item);
|
||||
void fire_doppleganger(edict_t *ent, const vec3_t &start, const vec3_t &aimdir);
|
||||
//void InitGameRules();
|
||||
//item_id_t DoRandomRespawn(edict_t *ent);
|
||||
//void PrecacheForRandomRespawn();
|
||||
//bool Tag_PickupToken(edict_t *ent, edict_t *other);
|
||||
//void Tag_DropToken(edict_t *ent, gitem_t *item);
|
||||
//void fire_doppleganger(edict_t *ent, const vec3_t &start, const vec3_t &aimdir);
|
||||
|
||||
//
|
||||
// p_client.c
|
||||
|
@ -3636,23 +3635,23 @@ enum
|
|||
RDM_DEATHBALL = 3
|
||||
};
|
||||
|
||||
struct dm_game_rt
|
||||
{
|
||||
void (*GameInit)();
|
||||
void (*PostInitSetup)();
|
||||
void (*ClientBegin)(edict_t *ent);
|
||||
bool (*SelectSpawnPoint)(edict_t *ent, vec3_t &origin, vec3_t &angles, bool force_spawn);
|
||||
void (*PlayerDeath)(edict_t *targ, edict_t *inflictor, edict_t *attacker);
|
||||
void (*Score)(edict_t *attacker, edict_t *victim, int scoreChange, const mod_t &mod);
|
||||
void (*PlayerEffects)(edict_t *ent);
|
||||
void (*DogTag)(edict_t *ent, edict_t *killer, const char **pic);
|
||||
void (*PlayerDisconnect)(edict_t *ent);
|
||||
int (*ChangeDamage)(edict_t *targ, edict_t *attacker, int damage, mod_t mod);
|
||||
int (*ChangeKnockback)(edict_t *targ, edict_t *attacker, int knockback, mod_t mod);
|
||||
int (*CheckDMRules)();
|
||||
};
|
||||
// struct dm_game_rt
|
||||
// {
|
||||
// void (*GameInit)();
|
||||
// void (*PostInitSetup)();
|
||||
// void (*ClientBegin)(edict_t *ent);
|
||||
// bool (*SelectSpawnPoint)(edict_t *ent, vec3_t &origin, vec3_t &angles, bool force_spawn);
|
||||
// void (*PlayerDeath)(edict_t *targ, edict_t *inflictor, edict_t *attacker);
|
||||
// void (*Score)(edict_t *attacker, edict_t *victim, int scoreChange, const mod_t &mod);
|
||||
// void (*PlayerEffects)(edict_t *ent);
|
||||
// void (*DogTag)(edict_t *ent, edict_t *killer, const char **pic);
|
||||
// void (*PlayerDisconnect)(edict_t *ent);
|
||||
// int (*ChangeDamage)(edict_t *targ, edict_t *attacker, int damage, mod_t mod);
|
||||
// int (*ChangeKnockback)(edict_t *targ, edict_t *attacker, int knockback, mod_t mod);
|
||||
// int (*CheckDMRules)();
|
||||
// };
|
||||
|
||||
extern dm_game_rt DMGame;
|
||||
// extern dm_game_rt DMGame;
|
||||
|
||||
// ROGUE
|
||||
//============
|
||||
|
|
|
@ -482,8 +482,8 @@ void InitGame()
|
|||
|
||||
//======
|
||||
// ROGUE
|
||||
if (gamerules->integer)
|
||||
InitGameRules(); // if there are game rules to set up, do so now.
|
||||
// if (gamerules->integer)
|
||||
// InitGameRules(); // if there are game rules to set up, do so now.
|
||||
// ROGUE
|
||||
//======
|
||||
|
||||
|
|
|
@ -644,10 +644,10 @@ void M_ProcessPain(edict_t *e)
|
|||
// ROGUE
|
||||
if (e->monsterinfo.aiflags & AI_MEDIC)
|
||||
{
|
||||
if (e->enemy && e->enemy->inuse && (e->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
{
|
||||
cleanupHealTarget(e->enemy);
|
||||
}
|
||||
// if (e->enemy && e->enemy->inuse && (e->enemy->svflags & SVF_MONSTER)) // god, I hope so
|
||||
// {
|
||||
// cleanupHealTarget(e->enemy);
|
||||
// }
|
||||
|
||||
// clean up self
|
||||
e->monsterinfo.aiflags &= ~AI_MEDIC;
|
||||
|
|
|
@ -23,7 +23,7 @@ solid_edge items only clip against bsp models.
|
|||
|
||||
*/
|
||||
|
||||
void SV_Physics_NewToss(edict_t *ent); // PGM
|
||||
//void SV_Physics_NewToss(edict_t *ent); // PGM
|
||||
|
||||
// [Paril-KEX] fetch the clipmask for this entity; certain modifiers
|
||||
// affect the clipping behavior of objects.
|
||||
|
@ -994,9 +994,9 @@ void G_RunEntity(edict_t *ent)
|
|||
SV_Physics_Toss(ent);
|
||||
break;
|
||||
// ROGUE
|
||||
case MOVETYPE_NEWTOSS:
|
||||
SV_Physics_NewToss(ent);
|
||||
break;
|
||||
// case MOVETYPE_NEWTOSS:
|
||||
// SV_Physics_NewToss(ent);
|
||||
// break;
|
||||
// ROGUE
|
||||
default:
|
||||
gi.Com_ErrorFmt("SV_Physics: bad movetype {}", (int32_t) ent->movetype);
|
||||
|
|
|
@ -165,34 +165,34 @@ void SP_monster_medic(edict_t *self);
|
|||
// void SP_monster_chick_heat(edict_t *self);
|
||||
// void SP_monster_gladb(edict_t *self);
|
||||
// void SP_monster_boss5(edict_t *self);
|
||||
void SP_rotating_light(edict_t *self);
|
||||
void SP_object_repair(edict_t *self);
|
||||
void SP_misc_crashviper(edict_t *ent);
|
||||
void SP_misc_viper_missile(edict_t *self);
|
||||
void SP_misc_amb4(edict_t *ent);
|
||||
void SP_target_mal_laser(edict_t *ent);
|
||||
void SP_misc_transport(edict_t *ent);
|
||||
// void SP_rotating_light(edict_t *self);
|
||||
// void SP_object_repair(edict_t *self);
|
||||
// void SP_misc_crashviper(edict_t *ent);
|
||||
// void SP_misc_viper_missile(edict_t *self);
|
||||
// void SP_misc_amb4(edict_t *ent);
|
||||
// void SP_target_mal_laser(edict_t *ent);
|
||||
// void SP_misc_transport(edict_t *ent);
|
||||
// END 14-APR-98
|
||||
|
||||
void SP_misc_nuke(edict_t *ent);
|
||||
|
||||
//===========
|
||||
// ROGUE
|
||||
void SP_func_plat2(edict_t *ent);
|
||||
void SP_func_door_secret2(edict_t *ent);
|
||||
void SP_func_force_wall(edict_t *ent);
|
||||
void SP_info_player_coop_lava(edict_t *self);
|
||||
void SP_info_teleport_destination(edict_t *self);
|
||||
void SP_trigger_teleport(edict_t *self);
|
||||
void SP_trigger_disguise(edict_t *self);
|
||||
// void SP_func_plat2(edict_t *ent);
|
||||
// void SP_func_door_secret2(edict_t *ent);
|
||||
// void SP_func_force_wall(edict_t *ent);
|
||||
// void SP_info_player_coop_lava(edict_t *self);
|
||||
// void SP_info_teleport_destination(edict_t *self);
|
||||
// void SP_trigger_teleport(edict_t *self);
|
||||
// void SP_trigger_disguise(edict_t *self);
|
||||
// void SP_monster_stalker(edict_t *self);
|
||||
// void SP_monster_turret(edict_t *self);
|
||||
void SP_target_steam(edict_t *self);
|
||||
void SP_target_anger(edict_t *self);
|
||||
void SP_target_killplayers(edict_t *self);
|
||||
// void SP_target_steam(edict_t *self);
|
||||
// void SP_target_anger(edict_t *self);
|
||||
// void SP_target_killplayers(edict_t *self);
|
||||
// PMM - still experimental!
|
||||
void SP_target_blacklight(edict_t *self);
|
||||
void SP_target_orb(edict_t *self);
|
||||
// void SP_target_blacklight(edict_t *self);
|
||||
// void SP_target_orb(edict_t *self);
|
||||
// pmm
|
||||
void SP_hint_path(edict_t *self);
|
||||
// void SP_monster_carrier(edict_t *self);
|
||||
|
@ -370,14 +370,14 @@ static const std::initializer_list<spawn_t> spawns = {
|
|||
//{ "turret_driver", SP_turret_driver },
|
||||
|
||||
// RAFAEL
|
||||
{ "func_object_repair", SP_object_repair },
|
||||
{ "rotating_light", SP_rotating_light },
|
||||
{ "target_mal_laser", SP_target_mal_laser },
|
||||
{ "misc_crashviper", SP_misc_crashviper },
|
||||
{ "misc_viper_missile", SP_misc_viper_missile },
|
||||
{ "misc_amb4", SP_misc_amb4 },
|
||||
{ "misc_transport", SP_misc_transport },
|
||||
{ "misc_nuke", SP_misc_nuke },
|
||||
// { "func_object_repair", SP_object_repair },
|
||||
// { "rotating_light", SP_rotating_light },
|
||||
// { "target_mal_laser", SP_target_mal_laser },
|
||||
// { "misc_crashviper", SP_misc_crashviper },
|
||||
// { "misc_viper_missile", SP_misc_viper_missile },
|
||||
// { "misc_amb4", SP_misc_amb4 },
|
||||
// { "misc_transport", SP_misc_transport },
|
||||
// { "misc_nuke", SP_misc_nuke },
|
||||
// { "monster_soldier_hypergun", SP_monster_soldier_hypergun },
|
||||
// { "monster_soldier_lasergun", SP_monster_soldier_lasergun },
|
||||
// { "monster_soldier_ripper", SP_monster_soldier_ripper },
|
||||
|
@ -390,38 +390,38 @@ static const std::initializer_list<spawn_t> spawns = {
|
|||
|
||||
//==============
|
||||
// ROGUE
|
||||
{ "func_plat2", SP_func_plat2 },
|
||||
{ "func_door_secret2", SP_func_door_secret2 },
|
||||
{ "func_force_wall", SP_func_force_wall },
|
||||
{ "trigger_teleport", SP_trigger_teleport },
|
||||
{ "trigger_disguise", SP_trigger_disguise },
|
||||
{ "info_teleport_destination", SP_info_teleport_destination },
|
||||
{ "info_player_coop_lava", SP_info_player_coop_lava },
|
||||
// { "monster_stalker", SP_monster_stalker },
|
||||
// { "monster_turret", SP_monster_turret },
|
||||
{ "target_steam", SP_target_steam },
|
||||
{ "target_anger", SP_target_anger },
|
||||
{ "target_killplayers", SP_target_killplayers },
|
||||
// PMM - experiment
|
||||
{ "target_blacklight", SP_target_blacklight },
|
||||
{ "target_orb", SP_target_orb },
|
||||
// pmm
|
||||
//{ "monster_daedalus", SP_monster_hover },
|
||||
{ "hint_path", SP_hint_path },
|
||||
// { "func_plat2", SP_func_plat2 },
|
||||
// { "func_door_secret2", SP_func_door_secret2 },
|
||||
// { "func_force_wall", SP_func_force_wall },
|
||||
// { "trigger_teleport", SP_trigger_teleport },
|
||||
// { "trigger_disguise", SP_trigger_disguise },
|
||||
// { "info_teleport_destination", SP_info_teleport_destination },
|
||||
// { "info_player_coop_lava", SP_info_player_coop_lava },
|
||||
// // { "monster_stalker", SP_monster_stalker },
|
||||
// // { "monster_turret", SP_monster_turret },
|
||||
// { "target_steam", SP_target_steam },
|
||||
// { "target_anger", SP_target_anger },
|
||||
// { "target_killplayers", SP_target_killplayers },
|
||||
// // PMM - experiment
|
||||
// { "target_blacklight", SP_target_blacklight },
|
||||
// { "target_orb", SP_target_orb },
|
||||
// // pmm
|
||||
// //{ "monster_daedalus", SP_monster_hover },
|
||||
// { "hint_path", SP_hint_path },
|
||||
// { "monster_carrier", SP_monster_carrier },
|
||||
// { "monster_widow", SP_monster_widow },
|
||||
// { "monster_widow2", SP_monster_widow2 },
|
||||
// { "monster_medic_commander", SP_monster_medic },
|
||||
{ "dm_tag_token", SP_dm_tag_token },
|
||||
{ "dm_dball_goal", SP_dm_dball_goal },
|
||||
{ "dm_dball_ball", SP_dm_dball_ball },
|
||||
{ "dm_dball_team1_start", SP_dm_dball_team1_start },
|
||||
{ "dm_dball_team2_start", SP_dm_dball_team2_start },
|
||||
{ "dm_dball_ball_start", SP_dm_dball_ball_start },
|
||||
{ "dm_dball_speed_change", SP_dm_dball_speed_change },
|
||||
//{ "monster_kamikaze", SP_monster_kamikaze },
|
||||
{ "turret_invisible_brain", SP_turret_invisible_brain },
|
||||
{ "misc_nuke_core", SP_misc_nuke_core },
|
||||
// { "dm_tag_token", SP_dm_tag_token },
|
||||
// { "dm_dball_goal", SP_dm_dball_goal },
|
||||
// { "dm_dball_ball", SP_dm_dball_ball },
|
||||
// { "dm_dball_team1_start", SP_dm_dball_team1_start },
|
||||
// { "dm_dball_team2_start", SP_dm_dball_team2_start },
|
||||
// { "dm_dball_ball_start", SP_dm_dball_ball_start },
|
||||
// { "dm_dball_speed_change", SP_dm_dball_speed_change },
|
||||
// //{ "monster_kamikaze", SP_monster_kamikaze },
|
||||
// { "turret_invisible_brain", SP_turret_invisible_brain },
|
||||
// { "misc_nuke_core", SP_misc_nuke_core },
|
||||
// ROGUE
|
||||
//==============
|
||||
// ZOID
|
||||
|
@ -482,17 +482,17 @@ void ED_CallSpawn(edict_t *ent)
|
|||
{
|
||||
// found it
|
||||
// before spawning, pick random item replacement
|
||||
if (g_dm_random_items->integer)
|
||||
{
|
||||
ent->item = item;
|
||||
item_id_t new_item = DoRandomRespawn(ent);
|
||||
// if (g_dm_random_items->integer)
|
||||
// {
|
||||
// ent->item = item;
|
||||
// item_id_t new_item = DoRandomRespawn(ent);
|
||||
|
||||
if (new_item)
|
||||
{
|
||||
item = GetItemByIndex(new_item);
|
||||
ent->classname = item->classname;
|
||||
}
|
||||
}
|
||||
// if (new_item)
|
||||
// {
|
||||
// item = GetItemByIndex(new_item);
|
||||
// ent->classname = item->classname;
|
||||
// }
|
||||
// }
|
||||
|
||||
SpawnItem(ent, item);
|
||||
return;
|
||||
|
@ -1247,15 +1247,15 @@ void SpawnEntities(const char *mapname, const char *entities, const char *spawnp
|
|||
// ZOID
|
||||
|
||||
// ROGUE
|
||||
if (deathmatch->integer)
|
||||
{
|
||||
if (g_dm_random_items->integer)
|
||||
PrecacheForRandomRespawn();
|
||||
}
|
||||
else
|
||||
{
|
||||
InitHintPaths(); // if there aren't hintpaths on this map, enable quick aborts
|
||||
}
|
||||
// if (deathmatch->integer)
|
||||
// {
|
||||
// if (g_dm_random_items->integer)
|
||||
// PrecacheForRandomRespawn();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// InitHintPaths(); // if there aren't hintpaths on this map, enable quick aborts
|
||||
// }
|
||||
// ROGUE
|
||||
|
||||
// ROGUE -- allow dm games to do init stuff right before game starts.
|
||||
|
|
|
@ -1,928 +0,0 @@
|
|||
// Copyright (c) ZeniMax Media Inc.
|
||||
// Licensed under the GNU General Public License 2.0.
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
INFANTRY
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "g_local.h"
|
||||
#include "m_infantry.h"
|
||||
#include "m_flash.h"
|
||||
|
||||
void InfantryMachineGun(edict_t *self);
|
||||
|
||||
static int sound_pain1;
|
||||
static int sound_pain2;
|
||||
static int sound_die1;
|
||||
static int sound_die2;
|
||||
|
||||
static int sound_gunshot;
|
||||
static int sound_weapon_cock;
|
||||
static int sound_punch_swing;
|
||||
static int sound_punch_hit;
|
||||
static int sound_sight;
|
||||
static int sound_search;
|
||||
static int sound_idle;
|
||||
|
||||
// range at which we'll try to initiate a run-attack to close distance
|
||||
constexpr float RANGE_RUN_ATTACK = RANGE_NEAR * 0.75f;
|
||||
|
||||
mframe_t infantry_frames_stand[] = {
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand }
|
||||
};
|
||||
MMOVE_T(infantry_move_stand) = { FRAME_stand50, FRAME_stand71, infantry_frames_stand, nullptr };
|
||||
|
||||
MONSTERINFO_STAND(infantry_stand) (edict_t *self) -> void
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_stand);
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_fidget[] = {
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand, 3 },
|
||||
{ ai_stand, 6 },
|
||||
{ ai_stand, 3, monster_footstep },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand, -1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand, -2 },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand, -1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, -1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, -1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, 1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand },
|
||||
{ ai_stand, -1 },
|
||||
{ ai_stand, -1 },
|
||||
{ ai_stand },
|
||||
{ ai_stand, -3 },
|
||||
{ ai_stand, -2 },
|
||||
{ ai_stand, -3 },
|
||||
{ ai_stand, -3, monster_footstep },
|
||||
{ ai_stand, -2 }
|
||||
};
|
||||
MMOVE_T(infantry_move_fidget) = { FRAME_stand01, FRAME_stand49, infantry_frames_fidget, infantry_stand };
|
||||
|
||||
MONSTERINFO_IDLE(infantry_fidget) (edict_t *self) -> void
|
||||
{
|
||||
if (self->enemy)
|
||||
return;
|
||||
|
||||
M_SetAnimation(self, &infantry_move_fidget);
|
||||
gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_walk[] = {
|
||||
{ ai_walk, 5, monster_footstep },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 5 },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 5 },
|
||||
{ ai_walk, 6, monster_footstep },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 4 },
|
||||
{ ai_walk, 5 }
|
||||
};
|
||||
MMOVE_T(infantry_move_walk) = { FRAME_walk03, FRAME_walk14, infantry_frames_walk, nullptr };
|
||||
|
||||
MONSTERINFO_WALK(infantry_walk) (edict_t *self) -> void
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_walk);
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_run[] = {
|
||||
{ ai_run, 10 },
|
||||
{ ai_run, 15, monster_footstep },
|
||||
{ ai_run, 5 },
|
||||
{ ai_run, 7, monster_done_dodge },
|
||||
{ ai_run, 18 },
|
||||
{ ai_run, 20, monster_footstep },
|
||||
{ ai_run, 2 },
|
||||
{ ai_run, 6 }
|
||||
};
|
||||
MMOVE_T(infantry_move_run) = { FRAME_run01, FRAME_run08, infantry_frames_run, nullptr };
|
||||
|
||||
MONSTERINFO_RUN(infantry_run) (edict_t *self) -> void
|
||||
{
|
||||
monster_done_dodge(self);
|
||||
|
||||
if (self->monsterinfo.aiflags & AI_STAND_GROUND)
|
||||
M_SetAnimation(self, &infantry_move_stand);
|
||||
else
|
||||
M_SetAnimation(self, &infantry_move_run);
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_pain1[] = {
|
||||
{ ai_move, -3 },
|
||||
{ ai_move, -2 },
|
||||
{ ai_move, -1 },
|
||||
{ ai_move, -2 },
|
||||
{ ai_move, -1, monster_footstep },
|
||||
{ ai_move, 1 },
|
||||
{ ai_move, -1 },
|
||||
{ ai_move, 1 },
|
||||
{ ai_move, 6 },
|
||||
{ ai_move, 2, monster_footstep }
|
||||
};
|
||||
MMOVE_T(infantry_move_pain1) = { FRAME_pain101, FRAME_pain110, infantry_frames_pain1, infantry_run };
|
||||
|
||||
mframe_t infantry_frames_pain2[] = {
|
||||
{ ai_move, -3 },
|
||||
{ ai_move, -3 },
|
||||
{ ai_move },
|
||||
{ ai_move, -1 },
|
||||
{ ai_move, -2, monster_footstep },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move, 2 },
|
||||
{ ai_move, 5 },
|
||||
{ ai_move, 2, monster_footstep }
|
||||
};
|
||||
MMOVE_T(infantry_move_pain2) = { FRAME_pain201, FRAME_pain210, infantry_frames_pain2, infantry_run };
|
||||
|
||||
extern const mmove_t infantry_move_jump;
|
||||
extern const mmove_t infantry_move_jump2;
|
||||
|
||||
PAIN(infantry_pain) (edict_t *self, edict_t *other, float kick, int damage, const mod_t &mod) -> void
|
||||
{
|
||||
int n;
|
||||
|
||||
// allow turret to pain
|
||||
if ((self->monsterinfo.active_move == &infantry_move_jump ||
|
||||
self->monsterinfo.active_move == &infantry_move_jump2) && self->think == monster_think)
|
||||
return;
|
||||
|
||||
monster_done_dodge(self);
|
||||
|
||||
if (level.time < self->pain_debounce_time)
|
||||
{
|
||||
if (self->think == monster_think && frandom() < 0.33f)
|
||||
self->monsterinfo.dodge(self, other, FRAME_TIME_S, nullptr, false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
self->pain_debounce_time = level.time + 3_sec;
|
||||
|
||||
n = brandom();
|
||||
|
||||
if (n == 0)
|
||||
gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
|
||||
else
|
||||
gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
|
||||
|
||||
if (self->think != monster_think)
|
||||
return;
|
||||
|
||||
if (!M_ShouldReactToPain(self, mod))
|
||||
{
|
||||
if (self->think == monster_think && frandom() < 0.33f)
|
||||
self->monsterinfo.dodge(self, other, FRAME_TIME_S, nullptr, false);
|
||||
|
||||
return; // no pain anims in nightmare
|
||||
}
|
||||
|
||||
if (n == 0)
|
||||
M_SetAnimation(self, &infantry_move_pain1);
|
||||
else
|
||||
M_SetAnimation(self, &infantry_move_pain2);
|
||||
|
||||
// PMM - clear duck flag
|
||||
if (self->monsterinfo.aiflags & AI_DUCKED)
|
||||
monster_duck_up(self);
|
||||
}
|
||||
|
||||
MONSTERINFO_SETSKIN(infantry_setskin) (edict_t *self) -> void
|
||||
{
|
||||
if (self->health < (self->max_health / 2))
|
||||
self->s.skinnum = 1;
|
||||
else
|
||||
self->s.skinnum = 0;
|
||||
}
|
||||
|
||||
constexpr vec3_t aimangles[] = {
|
||||
{ 0.0f, 5.0f, 0.0f },
|
||||
{ 10.0f, 15.0f, 0.0f },
|
||||
{ 20.0f, 25.0f, 0.0f },
|
||||
{ 25.0f, 35.0f, 0.0f },
|
||||
{ 30.0f, 40.0f, 0.0f },
|
||||
{ 30.0f, 45.0f, 0.0f },
|
||||
{ 25.0f, 50.0f, 0.0f },
|
||||
{ 20.0f, 40.0f, 0.0f },
|
||||
{ 15.0f, 35.0f, 0.0f },
|
||||
{ 40.0f, 35.0f, 0.0f },
|
||||
{ 70.0f, 35.0f, 0.0f },
|
||||
{ 90.0f, 35.0f, 0.0f }
|
||||
};
|
||||
|
||||
void InfantryMachineGun(edict_t *self)
|
||||
{
|
||||
vec3_t start;
|
||||
vec3_t forward, right;
|
||||
vec3_t vec;
|
||||
monster_muzzleflash_id_t flash_number;
|
||||
|
||||
if (!self->enemy || !self->enemy->inuse) // PGM
|
||||
return; // PGM
|
||||
|
||||
bool is_run_attack = (self->s.frame >= FRAME_run201 && self->s.frame <= FRAME_run208);
|
||||
|
||||
if (self->s.frame == FRAME_attak103 || self->s.frame == FRAME_attak311 || is_run_attack || self->s.frame == FRAME_attak416)
|
||||
{
|
||||
if (is_run_attack)
|
||||
flash_number = static_cast<monster_muzzleflash_id_t>(MZ2_INFANTRY_MACHINEGUN_14 + (self->s.frame - MZ2_INFANTRY_MACHINEGUN_14));
|
||||
else if (self->s.frame == FRAME_attak416)
|
||||
flash_number = MZ2_INFANTRY_MACHINEGUN_22;
|
||||
else
|
||||
flash_number = MZ2_INFANTRY_MACHINEGUN_1;
|
||||
AngleVectors(self->s.angles, forward, right, nullptr);
|
||||
start = M_ProjectFlashSource(self, monster_flash_offset[flash_number], forward, right);
|
||||
|
||||
if (self->enemy)
|
||||
PredictAim(self, self->enemy, start, 0, true, -0.2f, &forward, nullptr);
|
||||
else
|
||||
{
|
||||
AngleVectors(self->s.angles, forward, right, nullptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
flash_number = static_cast<monster_muzzleflash_id_t>(MZ2_INFANTRY_MACHINEGUN_2 + (self->s.frame - FRAME_death211));
|
||||
|
||||
AngleVectors(self->s.angles, forward, right, nullptr);
|
||||
start = M_ProjectFlashSource(self, monster_flash_offset[flash_number], forward, right);
|
||||
|
||||
vec = self->s.angles - aimangles[flash_number - MZ2_INFANTRY_MACHINEGUN_2];
|
||||
AngleVectors(vec, forward, nullptr, nullptr);
|
||||
}
|
||||
|
||||
monster_fire_bullet(self, start, forward, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
|
||||
}
|
||||
|
||||
MONSTERINFO_SIGHT(infantry_sight) (edict_t *self, edict_t *other) -> void
|
||||
{
|
||||
if (brandom())
|
||||
gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
|
||||
else
|
||||
gi.sound(self, CHAN_VOICE, sound_search, 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
||||
void infantry_dead(edict_t *self)
|
||||
{
|
||||
self->mins = { -16, -16, -24 };
|
||||
self->maxs = { 16, 16, -8 };
|
||||
monster_dead(self);
|
||||
}
|
||||
|
||||
static void infantry_shrink(edict_t *self)
|
||||
{
|
||||
self->maxs[2] = 0;
|
||||
self->svflags |= SVF_DEADMONSTER;
|
||||
gi.linkentity(self);
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_death1[] = {
|
||||
{ ai_move, -4, nullptr, FRAME_death102 },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move, -1 },
|
||||
{ ai_move, -4, monster_footstep },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move, -1, monster_footstep },
|
||||
{ ai_move, 3 },
|
||||
{ ai_move, 1 },
|
||||
{ ai_move, 1 },
|
||||
{ ai_move, -2 },
|
||||
{ ai_move, 2 },
|
||||
{ ai_move, 2 },
|
||||
{ ai_move, 9, [](edict_t *self) { infantry_shrink(self); monster_footstep(self); } },
|
||||
{ ai_move, 9 },
|
||||
{ ai_move, 5, monster_footstep },
|
||||
{ ai_move, -3 },
|
||||
{ ai_move, -3 }
|
||||
};
|
||||
MMOVE_T(infantry_move_death1) = { FRAME_death101, FRAME_death120, infantry_frames_death1, infantry_dead };
|
||||
|
||||
// Off with his head
|
||||
mframe_t infantry_frames_death2[] = {
|
||||
{ ai_move, 0, nullptr, FRAME_death202 },
|
||||
{ ai_move, 1 },
|
||||
{ ai_move, 5 },
|
||||
{ ai_move, -1 },
|
||||
{ ai_move },
|
||||
{ ai_move, 1, monster_footstep },
|
||||
{ ai_move, 1, monster_footstep },
|
||||
{ ai_move, 4 },
|
||||
{ ai_move, 3 },
|
||||
{ ai_move },
|
||||
{ ai_move, -2, InfantryMachineGun },
|
||||
{ ai_move, -2, InfantryMachineGun },
|
||||
{ ai_move, -3, InfantryMachineGun },
|
||||
{ ai_move, -1, InfantryMachineGun },
|
||||
{ ai_move, -2, InfantryMachineGun },
|
||||
{ ai_move, 0, InfantryMachineGun },
|
||||
{ ai_move, 2, InfantryMachineGun },
|
||||
{ ai_move, 2, InfantryMachineGun },
|
||||
{ ai_move, 3, InfantryMachineGun },
|
||||
{ ai_move, -10, InfantryMachineGun },
|
||||
{ ai_move, -7, InfantryMachineGun },
|
||||
{ ai_move, -8, InfantryMachineGun },
|
||||
{ ai_move, -6, [](edict_t *self) { infantry_shrink(self); monster_footstep(self); } },
|
||||
{ ai_move, 4 },
|
||||
{ ai_move }
|
||||
};
|
||||
MMOVE_T(infantry_move_death2) = { FRAME_death201, FRAME_death225, infantry_frames_death2, infantry_dead };
|
||||
|
||||
mframe_t infantry_frames_death3[] = {
|
||||
{ ai_move, 0 },
|
||||
{ ai_move },
|
||||
{ ai_move, 0, [](edict_t *self) { infantry_shrink(self); monster_footstep(self); } },
|
||||
{ ai_move, -6 },
|
||||
{ ai_move, -11, [](edict_t *self) { self->monsterinfo.nextframe = FRAME_death307; } },
|
||||
{ ai_move, -3 },
|
||||
{ ai_move, -11 },
|
||||
{ ai_move, 0, monster_footstep },
|
||||
{ ai_move }
|
||||
};
|
||||
MMOVE_T(infantry_move_death3) = { FRAME_death301, FRAME_death309, infantry_frames_death3, infantry_dead };
|
||||
|
||||
DIE(infantry_die) (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, const vec3_t &point, const mod_t &mod) -> void
|
||||
{
|
||||
int n;
|
||||
|
||||
// check for gib
|
||||
if (M_CheckGib(self, mod))
|
||||
{
|
||||
gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
|
||||
|
||||
const char *head_gib = (self->monsterinfo.active_move != &infantry_move_death3) ? "models/objects/gibs/sm_meat/tris.md2" : "models/monsters/infantry/gibs/head.md2";
|
||||
|
||||
self->s.skinnum /= 2;
|
||||
|
||||
ThrowGibs(self, damage, {
|
||||
{ "models/objects/gibs/bone/tris.md2" },
|
||||
{ 3, "models/objects/gibs/sm_meat/tris.md2" },
|
||||
{ "models/monsters/infantry/gibs/chest.md2", GIB_SKINNED },
|
||||
{ "models/monsters/infantry/gibs/gun.md2", GIB_SKINNED | GIB_UPRIGHT },
|
||||
{ 2, "models/monsters/infantry/gibs/foot.md2", GIB_SKINNED },
|
||||
{ 2, "models/monsters/infantry/gibs/arm.md2", GIB_SKINNED },
|
||||
{ head_gib, GIB_HEAD | GIB_SKINNED }
|
||||
});
|
||||
self->deadflag = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (self->deadflag)
|
||||
return;
|
||||
|
||||
// regular death
|
||||
self->deadflag = true;
|
||||
self->takedamage = true;
|
||||
|
||||
n = irandom(3);
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_death1);
|
||||
gi.sound(self, CHAN_VOICE, sound_die2, 1, ATTN_NORM, 0);
|
||||
}
|
||||
else if (n == 1)
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_death2);
|
||||
gi.sound(self, CHAN_VOICE, sound_die1, 1, ATTN_NORM, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_death3);
|
||||
gi.sound(self, CHAN_VOICE, sound_die2, 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
||||
// don't always pop a head gib, it gets old
|
||||
if (n != 2 && frandom() <= 0.25f)
|
||||
{
|
||||
edict_t *head = ThrowGib(self, "models/monsters/infantry/gibs/head.md2", damage, GIB_NONE, self->s.scale);
|
||||
|
||||
if (head)
|
||||
{
|
||||
head->s.angles = self->s.angles;
|
||||
head->s.origin = self->s.origin + vec3_t{0, 0, 32.f};
|
||||
vec3_t headDir = (self->s.origin - inflictor->s.origin);
|
||||
head->velocity = headDir / headDir.length() * 100.0f;
|
||||
head->velocity[2] = 200.0f;
|
||||
head->avelocity *= 0.15f;
|
||||
head->s.skinnum = 0;
|
||||
gi.linkentity(head);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_duck[] = {
|
||||
{ ai_move, -2, monster_duck_down },
|
||||
{ ai_move, -5, monster_duck_hold },
|
||||
{ ai_move, 3 },
|
||||
{ ai_move, 4, monster_duck_up },
|
||||
{ ai_move }
|
||||
};
|
||||
MMOVE_T(infantry_move_duck) = { FRAME_duck01, FRAME_duck05, infantry_frames_duck, infantry_run };
|
||||
|
||||
// PMM - dodge code moved below so I can see the attack frames
|
||||
|
||||
extern const mmove_t infantry_move_attack4;
|
||||
|
||||
void infantry_set_firetime(edict_t *self)
|
||||
{
|
||||
self->monsterinfo.fire_wait = level.time + random_time(0.7_sec, 2_sec);
|
||||
|
||||
if (!(self->monsterinfo.aiflags & AI_STAND_GROUND) && self->enemy && range_to(self, self->enemy) >= RANGE_RUN_ATTACK && ai_check_move(self, 8.0f))
|
||||
M_SetAnimation(self, &infantry_move_attack4, false);
|
||||
}
|
||||
|
||||
void infantry_cock_gun(edict_t *self)
|
||||
{
|
||||
gi.sound(self, CHAN_WEAPON, sound_weapon_cock, 1, ATTN_NORM, 0);
|
||||
|
||||
// gun cocked
|
||||
self->count = 1;
|
||||
}
|
||||
|
||||
void infantry_fire(edict_t *self);
|
||||
|
||||
// cock-less attack, used if he has already cocked his gun
|
||||
mframe_t infantry_frames_attack1[] = {
|
||||
{ ai_charge },
|
||||
{ ai_charge, 6, [](edict_t *self) { infantry_set_firetime(self); monster_footstep(self); } },
|
||||
{ ai_charge, 0, infantry_fire },
|
||||
{ ai_charge },
|
||||
{ ai_charge, 1 },
|
||||
{ ai_charge, -7 },
|
||||
{ ai_charge, -6, [](edict_t *self) { self->monsterinfo.nextframe = FRAME_attak114; monster_footstep(self); } },
|
||||
// dead frames start
|
||||
{ ai_charge, -1 },
|
||||
{ ai_charge, 0, infantry_cock_gun },
|
||||
{ ai_charge },
|
||||
{ ai_charge },
|
||||
{ ai_charge },
|
||||
{ ai_charge },
|
||||
// dead frames end
|
||||
{ ai_charge, -1 },
|
||||
{ ai_charge, -1 }
|
||||
};
|
||||
MMOVE_T(infantry_move_attack1) = { FRAME_attak101, FRAME_attak115, infantry_frames_attack1, infantry_run };
|
||||
|
||||
// old animation, full cock + shoot
|
||||
mframe_t infantry_frames_attack3[] = {
|
||||
{ ai_charge, 4, NULL },
|
||||
{ ai_charge, -1, NULL },
|
||||
{ ai_charge, -1, NULL },
|
||||
{ ai_charge, 0, infantry_cock_gun },
|
||||
{ ai_charge, -1, NULL },
|
||||
{ ai_charge, 1, NULL },
|
||||
{ ai_charge, 1, NULL },
|
||||
{ ai_charge, 2, NULL },
|
||||
{ ai_charge, -2, NULL },
|
||||
{ ai_charge, -3, [](edict_t *self) { infantry_set_firetime(self); monster_footstep(self); } },
|
||||
{ ai_charge, 1, infantry_fire },
|
||||
{ ai_charge, 5, NULL },
|
||||
{ ai_charge, -1, NULL },
|
||||
{ ai_charge, -2, NULL },
|
||||
{ ai_charge, -3, NULL },
|
||||
};
|
||||
MMOVE_T(infantry_move_attack3) = { FRAME_attak301, FRAME_attak315, infantry_frames_attack3, infantry_run };
|
||||
|
||||
// even older animation, full cock + shoot
|
||||
mframe_t infantry_frames_attack5[] = {
|
||||
// skipped frames
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, NULL },
|
||||
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, nullptr },
|
||||
{ ai_charge, 0, monster_footstep },
|
||||
{ ai_charge, 0, infantry_cock_gun },
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, [](edict_t *self) { self->monsterinfo.nextframe = self->s.frame + 1; } },
|
||||
{ ai_charge, 0, NULL }, // skipped frame
|
||||
{ ai_charge, 0, NULL },
|
||||
{ ai_charge, 0, nullptr },
|
||||
{ ai_charge, 0, infantry_set_firetime },
|
||||
{ ai_charge, 0, infantry_fire },
|
||||
|
||||
// skipped frames
|
||||
{ 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, monster_footstep }
|
||||
};
|
||||
MMOVE_T(infantry_move_attack5) = { FRAME_attak401, FRAME_attak423, infantry_frames_attack5, infantry_run };
|
||||
|
||||
extern const mmove_t infantry_move_attack4;
|
||||
|
||||
void infantry_fire(edict_t *self)
|
||||
{
|
||||
InfantryMachineGun(self);
|
||||
|
||||
// we fired, so we must cock again before firing
|
||||
self->count = 0;
|
||||
|
||||
// check if we ran out of firing time
|
||||
if (self->monsterinfo.active_move == &infantry_move_attack4)
|
||||
{
|
||||
if (level.time >= self->monsterinfo.fire_wait)
|
||||
{
|
||||
monster_done_dodge(self);
|
||||
M_SetAnimation(self, &infantry_move_attack1, false);
|
||||
self->monsterinfo.nextframe = FRAME_attak114;
|
||||
}
|
||||
// got close to an edge
|
||||
else if (!ai_check_move(self, 8.0f))
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_attack1, false);
|
||||
self->monsterinfo.nextframe = FRAME_attak103;
|
||||
monster_done_dodge(self);
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
}
|
||||
else if ((self->s.frame >= FRAME_attak101 && self->s.frame <= FRAME_attak115) ||
|
||||
(self->s.frame >= FRAME_attak301 && self->s.frame <= FRAME_attak315) ||
|
||||
(self->s.frame >= FRAME_attak401 && self->s.frame <= FRAME_attak424))
|
||||
{
|
||||
if (level.time >= self->monsterinfo.fire_wait)
|
||||
{
|
||||
self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
|
||||
|
||||
if (self->s.frame == FRAME_attak416)
|
||||
self->monsterinfo.nextframe = FRAME_attak420;
|
||||
}
|
||||
else
|
||||
self->monsterinfo.aiflags |= AI_HOLD_FRAME;
|
||||
}
|
||||
}
|
||||
|
||||
void infantry_swing(edict_t *self)
|
||||
{
|
||||
gi.sound(self, CHAN_WEAPON, sound_punch_swing, 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
||||
void infantry_smack(edict_t *self)
|
||||
{
|
||||
vec3_t aim = { MELEE_DISTANCE, 0, 0 };
|
||||
|
||||
if (fire_hit(self, aim, irandom(5, 10), 50))
|
||||
gi.sound(self, CHAN_WEAPON, sound_punch_hit, 1, ATTN_NORM, 0);
|
||||
else
|
||||
self->monsterinfo.melee_debounce_time = level.time + 1.5_sec;
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_attack2[] = {
|
||||
{ ai_charge, 3 },
|
||||
{ ai_charge, 6 },
|
||||
{ ai_charge, 0, infantry_swing },
|
||||
{ ai_charge, 8, monster_footstep },
|
||||
{ ai_charge, 5 },
|
||||
{ ai_charge, 8, infantry_smack },
|
||||
{ ai_charge, 6 },
|
||||
{ ai_charge, 3 }
|
||||
};
|
||||
MMOVE_T(infantry_move_attack2) = { FRAME_attak201, FRAME_attak208, infantry_frames_attack2, infantry_run };
|
||||
|
||||
// [Paril-KEX] run-attack, inspired by q2test
|
||||
void infantry_attack4_refire(edict_t *self)
|
||||
{
|
||||
// ran out of firing time
|
||||
if (level.time >= self->monsterinfo.fire_wait)
|
||||
{
|
||||
monster_done_dodge(self);
|
||||
M_SetAnimation(self, &infantry_move_attack1, false);
|
||||
self->monsterinfo.nextframe = FRAME_attak114;
|
||||
}
|
||||
// we got too close, or we can't move forward, switch us back to regular attack
|
||||
else if ((self->monsterinfo.aiflags & AI_STAND_GROUND) || (self->enemy && (range_to(self, self->enemy) < RANGE_RUN_ATTACK || !ai_check_move(self, 8.0f))))
|
||||
{
|
||||
M_SetAnimation(self, &infantry_move_attack1, false);
|
||||
self->monsterinfo.nextframe = FRAME_attak103;
|
||||
monster_done_dodge(self);
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
else
|
||||
self->monsterinfo.nextframe = FRAME_run201;
|
||||
|
||||
infantry_fire(self);
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_attack4[] = {
|
||||
{ ai_charge, 16, infantry_fire },
|
||||
{ ai_charge, 16, [](edict_t *self) { monster_footstep(self); infantry_fire(self); } },
|
||||
{ ai_charge, 13, infantry_fire },
|
||||
{ ai_charge, 10, infantry_fire },
|
||||
{ ai_charge, 16, infantry_fire },
|
||||
{ ai_charge, 16, [](edict_t *self) { monster_footstep(self); infantry_fire(self); } },
|
||||
{ ai_charge, 16, infantry_fire },
|
||||
{ ai_charge, 16, infantry_attack4_refire }
|
||||
};
|
||||
MMOVE_T(infantry_move_attack4) = { FRAME_run201, FRAME_run208, infantry_frames_attack4, infantry_run, 0.5f };
|
||||
|
||||
MONSTERINFO_ATTACK(infantry_attack) (edict_t *self) -> void
|
||||
{
|
||||
monster_done_dodge(self);
|
||||
|
||||
float r = range_to(self, self->enemy);
|
||||
|
||||
if (r <= RANGE_MELEE && self->monsterinfo.melee_debounce_time <= level.time)
|
||||
M_SetAnimation(self, &infantry_move_attack2);
|
||||
else if (M_CheckClearShot(self, monster_flash_offset[MZ2_INFANTRY_MACHINEGUN_1]))
|
||||
{
|
||||
if (self->count)
|
||||
M_SetAnimation(self, &infantry_move_attack1);
|
||||
else
|
||||
{
|
||||
M_SetAnimation(self, frandom() <= 0.1f ? &infantry_move_attack5 : &infantry_move_attack3);
|
||||
self->monsterinfo.nextframe = FRAME_attak405;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===========
|
||||
// PGM
|
||||
void infantry_jump_now(edict_t *self)
|
||||
{
|
||||
vec3_t forward, up;
|
||||
|
||||
AngleVectors(self->s.angles, forward, nullptr, up);
|
||||
self->velocity += (forward * 100);
|
||||
self->velocity += (up * 300);
|
||||
}
|
||||
|
||||
void infantry_jump2_now(edict_t *self)
|
||||
{
|
||||
vec3_t forward, up;
|
||||
|
||||
AngleVectors(self->s.angles, forward, nullptr, up);
|
||||
self->velocity += (forward * 150);
|
||||
self->velocity += (up * 400);
|
||||
}
|
||||
|
||||
void infantry_jump_wait_land(edict_t *self)
|
||||
{
|
||||
if (self->groundentity == nullptr)
|
||||
{
|
||||
self->monsterinfo.nextframe = self->s.frame;
|
||||
|
||||
if (monster_jump_finished(self))
|
||||
self->monsterinfo.nextframe = self->s.frame + 1;
|
||||
}
|
||||
else
|
||||
self->monsterinfo.nextframe = self->s.frame + 1;
|
||||
}
|
||||
|
||||
mframe_t infantry_frames_jump[] = {
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move, 0, infantry_jump_now },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move, 0, infantry_jump_wait_land },
|
||||
{ ai_move },
|
||||
{ ai_move }
|
||||
};
|
||||
MMOVE_T(infantry_move_jump) = { FRAME_jump01, FRAME_jump10, infantry_frames_jump, infantry_run };
|
||||
|
||||
mframe_t infantry_frames_jump2[] = {
|
||||
{ ai_move, -8 },
|
||||
{ ai_move, -4 },
|
||||
{ ai_move, -4 },
|
||||
{ ai_move, 0, infantry_jump2_now },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move },
|
||||
{ ai_move, 0, infantry_jump_wait_land },
|
||||
{ ai_move },
|
||||
{ ai_move }
|
||||
};
|
||||
MMOVE_T(infantry_move_jump2) = { FRAME_jump01, FRAME_jump10, infantry_frames_jump2, infantry_run };
|
||||
|
||||
void infantry_jump(edict_t *self, blocked_jump_result_t result)
|
||||
{
|
||||
if (!self->enemy)
|
||||
return;
|
||||
|
||||
monster_done_dodge(self);
|
||||
|
||||
if (result == blocked_jump_result_t::JUMP_JUMP_UP)
|
||||
M_SetAnimation(self, &infantry_move_jump2);
|
||||
else
|
||||
M_SetAnimation(self, &infantry_move_jump);
|
||||
}
|
||||
|
||||
MONSTERINFO_BLOCKED(infantry_blocked) (edict_t *self, float dist) -> bool
|
||||
{
|
||||
if (auto result = blocked_checkjump(self, dist); result != blocked_jump_result_t::NO_JUMP)
|
||||
{
|
||||
if (result != blocked_jump_result_t::JUMP_TURN)
|
||||
infantry_jump(self, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (blocked_checkplat(self, dist))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
MONSTERINFO_DUCK(infantry_duck) (edict_t *self, gtime_t eta) -> bool
|
||||
{
|
||||
// if we're jumping, don't dodge
|
||||
if ((self->monsterinfo.active_move == &infantry_move_jump) ||
|
||||
(self->monsterinfo.active_move == &infantry_move_jump2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// don't duck during our firing or melee frames
|
||||
if (self->s.frame == FRAME_attak103 ||
|
||||
self->s.frame == FRAME_attak315 ||
|
||||
(self->monsterinfo.active_move == &infantry_move_attack2))
|
||||
{
|
||||
self->monsterinfo.unduck(self);
|
||||
return false;
|
||||
}
|
||||
|
||||
M_SetAnimation(self, &infantry_move_duck);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
MONSTERINFO_SIDESTEP(infantry_sidestep) (edict_t *self) -> bool
|
||||
{
|
||||
// if we're jumping, don't dodge
|
||||
if ((self->monsterinfo.active_move == &infantry_move_jump) ||
|
||||
(self->monsterinfo.active_move == &infantry_move_jump2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (self->monsterinfo.active_move == &infantry_move_run)
|
||||
return true;
|
||||
|
||||
// Don't sidestep if we're already sidestepping, and def not unless we're actually shooting
|
||||
// or if we already cocked
|
||||
if (self->monsterinfo.active_move != &infantry_move_attack4 &&
|
||||
self->monsterinfo.next_move != &infantry_move_attack4 &&
|
||||
((self->s.frame == FRAME_attak103 ||
|
||||
self->s.frame == FRAME_attak311 ||
|
||||
self->s.frame == FRAME_attak416) &&
|
||||
!self->count))
|
||||
{
|
||||
// give us a fire time boost so we don't end up firing for 1 frame
|
||||
self->monsterinfo.fire_wait += random_time(300_ms, 600_ms);
|
||||
|
||||
M_SetAnimation(self, &infantry_move_attack4, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void InfantryPrecache()
|
||||
{
|
||||
sound_pain1 = gi.soundindex("infantry/infpain1.wav");
|
||||
sound_pain2 = gi.soundindex("infantry/infpain2.wav");
|
||||
sound_die1 = gi.soundindex("infantry/infdeth1.wav");
|
||||
sound_die2 = gi.soundindex("infantry/infdeth2.wav");
|
||||
|
||||
sound_gunshot = gi.soundindex("infantry/infatck1.wav");
|
||||
sound_weapon_cock = gi.soundindex("infantry/infatck3.wav");
|
||||
sound_punch_swing = gi.soundindex("infantry/infatck2.wav");
|
||||
sound_punch_hit = gi.soundindex("infantry/melee2.wav");
|
||||
|
||||
sound_sight = gi.soundindex("infantry/infsght1.wav");
|
||||
sound_search = gi.soundindex("infantry/infsrch1.wav");
|
||||
sound_idle = gi.soundindex("infantry/infidle1.wav");
|
||||
}
|
||||
|
||||
constexpr spawnflags_t SPAWNFLAG_INFANTRY_NOJUMPING = 8_spawnflag;
|
||||
|
||||
/*QUAKED monster_infantry (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight NoJumping
|
||||
*/
|
||||
void SP_monster_infantry(edict_t *self)
|
||||
{
|
||||
if ( !M_AllowSpawn( self ) ) {
|
||||
G_FreeEdict( self );
|
||||
return;
|
||||
}
|
||||
|
||||
InfantryPrecache();
|
||||
|
||||
self->monsterinfo.aiflags |= AI_STINKY;
|
||||
|
||||
self->movetype = MOVETYPE_STEP;
|
||||
self->solid = SOLID_BBOX;
|
||||
self->s.modelindex = gi.modelindex("models/monsters/infantry/tris.md2");
|
||||
|
||||
gi.modelindex("models/monsters/infantry/gibs/head.md2");
|
||||
gi.modelindex("models/monsters/infantry/gibs/chest.md2");
|
||||
gi.modelindex("models/monsters/infantry/gibs/gun.md2");
|
||||
gi.modelindex("models/monsters/infantry/gibs/arm.md2");
|
||||
gi.modelindex("models/monsters/infantry/gibs/foot.md2");
|
||||
|
||||
self->mins = { -16, -16, -24 };
|
||||
self->maxs = { 16, 16, 32 };
|
||||
|
||||
self->health = 100 * st.health_multiplier;
|
||||
self->gib_health = -65;
|
||||
self->mass = 200;
|
||||
|
||||
self->pain = infantry_pain;
|
||||
self->die = infantry_die;
|
||||
|
||||
self->monsterinfo.combat_style = COMBAT_MIXED;
|
||||
|
||||
self->monsterinfo.stand = infantry_stand;
|
||||
self->monsterinfo.walk = infantry_walk;
|
||||
self->monsterinfo.run = infantry_run;
|
||||
// pmm
|
||||
self->monsterinfo.dodge = M_MonsterDodge;
|
||||
self->monsterinfo.duck = infantry_duck;
|
||||
self->monsterinfo.unduck = monster_duck_up;
|
||||
self->monsterinfo.sidestep = infantry_sidestep;
|
||||
self->monsterinfo.blocked = infantry_blocked;
|
||||
// pmm
|
||||
self->monsterinfo.attack = infantry_attack;
|
||||
self->monsterinfo.melee = nullptr;
|
||||
self->monsterinfo.sight = infantry_sight;
|
||||
self->monsterinfo.idle = infantry_fidget;
|
||||
self->monsterinfo.setskin = infantry_setskin;
|
||||
|
||||
gi.linkentity(self);
|
||||
|
||||
M_SetAnimation(self, &infantry_move_stand);
|
||||
self->monsterinfo.scale = MODEL_SCALE;
|
||||
self->monsterinfo.can_jump = !self->spawnflags.has(SPAWNFLAG_INFANTRY_NOJUMPING);
|
||||
self->monsterinfo.drop_height = 192;
|
||||
self->monsterinfo.jump_height = 40;
|
||||
|
||||
walkmonster_start(self);
|
||||
}
|
|
@ -1,280 +0,0 @@
|
|||
// Copyright (c) ZeniMax Media Inc.
|
||||
// Licensed under the GNU General Public License 2.0.
|
||||
// G:\quake2\baseq2\models/monsters/infantry
|
||||
|
||||
// This file generated by ModelGen - Do NOT Modify
|
||||
|
||||
enum
|
||||
{
|
||||
FRAME_gun02,
|
||||
FRAME_stand01,
|
||||
FRAME_stand02,
|
||||
FRAME_stand03,
|
||||
FRAME_stand04,
|
||||
FRAME_stand05,
|
||||
FRAME_stand06,
|
||||
FRAME_stand07,
|
||||
FRAME_stand08,
|
||||
FRAME_stand09,
|
||||
FRAME_stand10,
|
||||
FRAME_stand11,
|
||||
FRAME_stand12,
|
||||
FRAME_stand13,
|
||||
FRAME_stand14,
|
||||
FRAME_stand15,
|
||||
FRAME_stand16,
|
||||
FRAME_stand17,
|
||||
FRAME_stand18,
|
||||
FRAME_stand19,
|
||||
FRAME_stand20,
|
||||
FRAME_stand21,
|
||||
FRAME_stand22,
|
||||
FRAME_stand23,
|
||||
FRAME_stand24,
|
||||
FRAME_stand25,
|
||||
FRAME_stand26,
|
||||
FRAME_stand27,
|
||||
FRAME_stand28,
|
||||
FRAME_stand29,
|
||||
FRAME_stand30,
|
||||
FRAME_stand31,
|
||||
FRAME_stand32,
|
||||
FRAME_stand33,
|
||||
FRAME_stand34,
|
||||
FRAME_stand35,
|
||||
FRAME_stand36,
|
||||
FRAME_stand37,
|
||||
FRAME_stand38,
|
||||
FRAME_stand39,
|
||||
FRAME_stand40,
|
||||
FRAME_stand41,
|
||||
FRAME_stand42,
|
||||
FRAME_stand43,
|
||||
FRAME_stand44,
|
||||
FRAME_stand45,
|
||||
FRAME_stand46,
|
||||
FRAME_stand47,
|
||||
FRAME_stand48,
|
||||
FRAME_stand49,
|
||||
FRAME_stand50,
|
||||
FRAME_stand51,
|
||||
FRAME_stand52,
|
||||
FRAME_stand53,
|
||||
FRAME_stand54,
|
||||
FRAME_stand55,
|
||||
FRAME_stand56,
|
||||
FRAME_stand57,
|
||||
FRAME_stand58,
|
||||
FRAME_stand59,
|
||||
FRAME_stand60,
|
||||
FRAME_stand61,
|
||||
FRAME_stand62,
|
||||
FRAME_stand63,
|
||||
FRAME_stand64,
|
||||
FRAME_stand65,
|
||||
FRAME_stand66,
|
||||
FRAME_stand67,
|
||||
FRAME_stand68,
|
||||
FRAME_stand69,
|
||||
FRAME_stand70,
|
||||
FRAME_stand71,
|
||||
FRAME_walk01,
|
||||
FRAME_walk02,
|
||||
FRAME_walk03,
|
||||
FRAME_walk04,
|
||||
FRAME_walk05,
|
||||
FRAME_walk06,
|
||||
FRAME_walk07,
|
||||
FRAME_walk08,
|
||||
FRAME_walk09,
|
||||
FRAME_walk10,
|
||||
FRAME_walk11,
|
||||
FRAME_walk12,
|
||||
FRAME_walk13,
|
||||
FRAME_walk14,
|
||||
FRAME_walk15,
|
||||
FRAME_walk16,
|
||||
FRAME_walk17,
|
||||
FRAME_walk18,
|
||||
FRAME_walk19,
|
||||
FRAME_walk20,
|
||||
FRAME_run01,
|
||||
FRAME_run02,
|
||||
FRAME_run03,
|
||||
FRAME_run04,
|
||||
FRAME_run05,
|
||||
FRAME_run06,
|
||||
FRAME_run07,
|
||||
FRAME_run08,
|
||||
FRAME_pain101,
|
||||
FRAME_pain102,
|
||||
FRAME_pain103,
|
||||
FRAME_pain104,
|
||||
FRAME_pain105,
|
||||
FRAME_pain106,
|
||||
FRAME_pain107,
|
||||
FRAME_pain108,
|
||||
FRAME_pain109,
|
||||
FRAME_pain110,
|
||||
FRAME_pain201,
|
||||
FRAME_pain202,
|
||||
FRAME_pain203,
|
||||
FRAME_pain204,
|
||||
FRAME_pain205,
|
||||
FRAME_pain206,
|
||||
FRAME_pain207,
|
||||
FRAME_pain208,
|
||||
FRAME_pain209,
|
||||
FRAME_pain210,
|
||||
FRAME_duck01,
|
||||
FRAME_duck02,
|
||||
FRAME_duck03,
|
||||
FRAME_duck04,
|
||||
FRAME_duck05,
|
||||
FRAME_death101,
|
||||
FRAME_death102,
|
||||
FRAME_death103,
|
||||
FRAME_death104,
|
||||
FRAME_death105,
|
||||
FRAME_death106,
|
||||
FRAME_death107,
|
||||
FRAME_death108,
|
||||
FRAME_death109,
|
||||
FRAME_death110,
|
||||
FRAME_death111,
|
||||
FRAME_death112,
|
||||
FRAME_death113,
|
||||
FRAME_death114,
|
||||
FRAME_death115,
|
||||
FRAME_death116,
|
||||
FRAME_death117,
|
||||
FRAME_death118,
|
||||
FRAME_death119,
|
||||
FRAME_death120,
|
||||
FRAME_death201,
|
||||
FRAME_death202,
|
||||
FRAME_death203,
|
||||
FRAME_death204,
|
||||
FRAME_death205,
|
||||
FRAME_death206,
|
||||
FRAME_death207,
|
||||
FRAME_death208,
|
||||
FRAME_death209,
|
||||
FRAME_death210,
|
||||
FRAME_death211,
|
||||
FRAME_death212,
|
||||
FRAME_death213,
|
||||
FRAME_death214,
|
||||
FRAME_death215,
|
||||
FRAME_death216,
|
||||
FRAME_death217,
|
||||
FRAME_death218,
|
||||
FRAME_death219,
|
||||
FRAME_death220,
|
||||
FRAME_death221,
|
||||
FRAME_death222,
|
||||
FRAME_death223,
|
||||
FRAME_death224,
|
||||
FRAME_death225,
|
||||
FRAME_death301,
|
||||
FRAME_death302,
|
||||
FRAME_death303,
|
||||
FRAME_death304,
|
||||
FRAME_death305,
|
||||
FRAME_death306,
|
||||
FRAME_death307,
|
||||
FRAME_death308,
|
||||
FRAME_death309,
|
||||
FRAME_block01,
|
||||
FRAME_block02,
|
||||
FRAME_block03,
|
||||
FRAME_block04,
|
||||
FRAME_block05,
|
||||
FRAME_attak101,
|
||||
FRAME_attak102,
|
||||
FRAME_attak103,
|
||||
FRAME_attak104,
|
||||
FRAME_attak105,
|
||||
FRAME_attak106,
|
||||
FRAME_attak107,
|
||||
FRAME_attak108,
|
||||
FRAME_attak109,
|
||||
FRAME_attak110,
|
||||
FRAME_attak111,
|
||||
FRAME_attak112,
|
||||
FRAME_attak113,
|
||||
FRAME_attak114,
|
||||
FRAME_attak115,
|
||||
FRAME_attak201,
|
||||
FRAME_attak202,
|
||||
FRAME_attak203,
|
||||
FRAME_attak204,
|
||||
FRAME_attak205,
|
||||
FRAME_attak206,
|
||||
FRAME_attak207,
|
||||
FRAME_attak208,
|
||||
// ROGUE
|
||||
FRAME_jump01,
|
||||
FRAME_jump02,
|
||||
FRAME_jump03,
|
||||
FRAME_jump04,
|
||||
FRAME_jump05,
|
||||
FRAME_jump06,
|
||||
FRAME_jump07,
|
||||
FRAME_jump08,
|
||||
FRAME_jump09,
|
||||
FRAME_jump10,
|
||||
// ROGUE
|
||||
// [Paril-KEX] old attack, for demos
|
||||
FRAME_attak301,
|
||||
FRAME_attak302,
|
||||
FRAME_attak303,
|
||||
FRAME_attak304,
|
||||
FRAME_attak305,
|
||||
FRAME_attak306,
|
||||
FRAME_attak307,
|
||||
FRAME_attak308,
|
||||
FRAME_attak309,
|
||||
FRAME_attak310,
|
||||
FRAME_attak311,
|
||||
FRAME_attak312,
|
||||
FRAME_attak313,
|
||||
FRAME_attak314,
|
||||
FRAME_attak315,
|
||||
// [Paril-KEX] run attack
|
||||
FRAME_run201,
|
||||
FRAME_run202,
|
||||
FRAME_run203,
|
||||
FRAME_run204,
|
||||
FRAME_run205,
|
||||
FRAME_run206,
|
||||
FRAME_run207,
|
||||
FRAME_run208,
|
||||
// [Paril-KEX]
|
||||
FRAME_attak401,
|
||||
FRAME_attak402,
|
||||
FRAME_attak403,
|
||||
FRAME_attak404,
|
||||
FRAME_attak405,
|
||||
FRAME_attak406,
|
||||
FRAME_attak407,
|
||||
FRAME_attak408,
|
||||
FRAME_attak409,
|
||||
FRAME_attak410,
|
||||
FRAME_attak411,
|
||||
FRAME_attak412,
|
||||
FRAME_attak413,
|
||||
FRAME_attak414,
|
||||
FRAME_attak415,
|
||||
FRAME_attak416,
|
||||
FRAME_attak417,
|
||||
FRAME_attak418,
|
||||
FRAME_attak419,
|
||||
FRAME_attak420,
|
||||
FRAME_attak421,
|
||||
FRAME_attak422,
|
||||
FRAME_attak423,
|
||||
FRAME_attak424
|
||||
};
|
||||
|
||||
constexpr float MODEL_SCALE = 1.000000f;
|
File diff suppressed because it is too large
Load diff
|
@ -1,248 +0,0 @@
|
|||
// Copyright (c) ZeniMax Media Inc.
|
||||
// Licensed under the GNU General Public License 2.0.
|
||||
// G:\quake2\baseq2\models/monsters/medic
|
||||
|
||||
// This file generated by ModelGen - Do NOT Modify
|
||||
|
||||
enum
|
||||
{
|
||||
FRAME_walk1,
|
||||
FRAME_walk2,
|
||||
FRAME_walk3,
|
||||
FRAME_walk4,
|
||||
FRAME_walk5,
|
||||
FRAME_walk6,
|
||||
FRAME_walk7,
|
||||
FRAME_walk8,
|
||||
FRAME_walk9,
|
||||
FRAME_walk10,
|
||||
FRAME_walk11,
|
||||
FRAME_walk12,
|
||||
FRAME_wait1,
|
||||
FRAME_wait2,
|
||||
FRAME_wait3,
|
||||
FRAME_wait4,
|
||||
FRAME_wait5,
|
||||
FRAME_wait6,
|
||||
FRAME_wait7,
|
||||
FRAME_wait8,
|
||||
FRAME_wait9,
|
||||
FRAME_wait10,
|
||||
FRAME_wait11,
|
||||
FRAME_wait12,
|
||||
FRAME_wait13,
|
||||
FRAME_wait14,
|
||||
FRAME_wait15,
|
||||
FRAME_wait16,
|
||||
FRAME_wait17,
|
||||
FRAME_wait18,
|
||||
FRAME_wait19,
|
||||
FRAME_wait20,
|
||||
FRAME_wait21,
|
||||
FRAME_wait22,
|
||||
FRAME_wait23,
|
||||
FRAME_wait24,
|
||||
FRAME_wait25,
|
||||
FRAME_wait26,
|
||||
FRAME_wait27,
|
||||
FRAME_wait28,
|
||||
FRAME_wait29,
|
||||
FRAME_wait30,
|
||||
FRAME_wait31,
|
||||
FRAME_wait32,
|
||||
FRAME_wait33,
|
||||
FRAME_wait34,
|
||||
FRAME_wait35,
|
||||
FRAME_wait36,
|
||||
FRAME_wait37,
|
||||
FRAME_wait38,
|
||||
FRAME_wait39,
|
||||
FRAME_wait40,
|
||||
FRAME_wait41,
|
||||
FRAME_wait42,
|
||||
FRAME_wait43,
|
||||
FRAME_wait44,
|
||||
FRAME_wait45,
|
||||
FRAME_wait46,
|
||||
FRAME_wait47,
|
||||
FRAME_wait48,
|
||||
FRAME_wait49,
|
||||
FRAME_wait50,
|
||||
FRAME_wait51,
|
||||
FRAME_wait52,
|
||||
FRAME_wait53,
|
||||
FRAME_wait54,
|
||||
FRAME_wait55,
|
||||
FRAME_wait56,
|
||||
FRAME_wait57,
|
||||
FRAME_wait58,
|
||||
FRAME_wait59,
|
||||
FRAME_wait60,
|
||||
FRAME_wait61,
|
||||
FRAME_wait62,
|
||||
FRAME_wait63,
|
||||
FRAME_wait64,
|
||||
FRAME_wait65,
|
||||
FRAME_wait66,
|
||||
FRAME_wait67,
|
||||
FRAME_wait68,
|
||||
FRAME_wait69,
|
||||
FRAME_wait70,
|
||||
FRAME_wait71,
|
||||
FRAME_wait72,
|
||||
FRAME_wait73,
|
||||
FRAME_wait74,
|
||||
FRAME_wait75,
|
||||
FRAME_wait76,
|
||||
FRAME_wait77,
|
||||
FRAME_wait78,
|
||||
FRAME_wait79,
|
||||
FRAME_wait80,
|
||||
FRAME_wait81,
|
||||
FRAME_wait82,
|
||||
FRAME_wait83,
|
||||
FRAME_wait84,
|
||||
FRAME_wait85,
|
||||
FRAME_wait86,
|
||||
FRAME_wait87,
|
||||
FRAME_wait88,
|
||||
FRAME_wait89,
|
||||
FRAME_wait90,
|
||||
FRAME_run1,
|
||||
FRAME_run2,
|
||||
FRAME_run3,
|
||||
FRAME_run4,
|
||||
FRAME_run5,
|
||||
FRAME_run6,
|
||||
FRAME_paina1,
|
||||
FRAME_paina2,
|
||||
FRAME_paina3,
|
||||
FRAME_paina4,
|
||||
FRAME_paina5,
|
||||
FRAME_paina6,
|
||||
FRAME_paina7,
|
||||
FRAME_paina8,
|
||||
FRAME_painb1,
|
||||
FRAME_painb2,
|
||||
FRAME_painb3,
|
||||
FRAME_painb4,
|
||||
FRAME_painb5,
|
||||
FRAME_painb6,
|
||||
FRAME_painb7,
|
||||
FRAME_painb8,
|
||||
FRAME_painb9,
|
||||
FRAME_painb10,
|
||||
FRAME_painb11,
|
||||
FRAME_painb12,
|
||||
FRAME_painb13,
|
||||
FRAME_painb14,
|
||||
FRAME_painb15,
|
||||
FRAME_duck1,
|
||||
FRAME_duck2,
|
||||
FRAME_duck3,
|
||||
FRAME_duck4,
|
||||
FRAME_duck5,
|
||||
FRAME_duck6,
|
||||
FRAME_duck7,
|
||||
FRAME_duck8,
|
||||
FRAME_duck9,
|
||||
FRAME_duck10,
|
||||
FRAME_duck11,
|
||||
FRAME_duck12,
|
||||
FRAME_duck13,
|
||||
FRAME_duck14,
|
||||
FRAME_duck15,
|
||||
FRAME_duck16,
|
||||
FRAME_death1,
|
||||
FRAME_death2,
|
||||
FRAME_death3,
|
||||
FRAME_death4,
|
||||
FRAME_death5,
|
||||
FRAME_death6,
|
||||
FRAME_death7,
|
||||
FRAME_death8,
|
||||
FRAME_death9,
|
||||
FRAME_death10,
|
||||
FRAME_death11,
|
||||
FRAME_death12,
|
||||
FRAME_death13,
|
||||
FRAME_death14,
|
||||
FRAME_death15,
|
||||
FRAME_death16,
|
||||
FRAME_death17,
|
||||
FRAME_death18,
|
||||
FRAME_death19,
|
||||
FRAME_death20,
|
||||
FRAME_death21,
|
||||
FRAME_death22,
|
||||
FRAME_death23,
|
||||
FRAME_death24,
|
||||
FRAME_death25,
|
||||
FRAME_death26,
|
||||
FRAME_death27,
|
||||
FRAME_death28,
|
||||
FRAME_death29,
|
||||
FRAME_death30,
|
||||
FRAME_attack1,
|
||||
FRAME_attack2,
|
||||
FRAME_attack3,
|
||||
FRAME_attack4,
|
||||
FRAME_attack5,
|
||||
FRAME_attack6,
|
||||
FRAME_attack7,
|
||||
FRAME_attack8,
|
||||
FRAME_attack9,
|
||||
FRAME_attack10,
|
||||
FRAME_attack11,
|
||||
FRAME_attack12,
|
||||
FRAME_attack13,
|
||||
FRAME_attack14,
|
||||
FRAME_attack15,
|
||||
FRAME_attack16,
|
||||
FRAME_attack17,
|
||||
FRAME_attack18,
|
||||
FRAME_attack19,
|
||||
FRAME_attack20,
|
||||
FRAME_attack21,
|
||||
FRAME_attack22,
|
||||
FRAME_attack23,
|
||||
FRAME_attack24,
|
||||
FRAME_attack25,
|
||||
FRAME_attack26,
|
||||
FRAME_attack27,
|
||||
FRAME_attack28,
|
||||
FRAME_attack29,
|
||||
FRAME_attack30,
|
||||
FRAME_attack31,
|
||||
FRAME_attack32,
|
||||
FRAME_attack33,
|
||||
FRAME_attack34,
|
||||
FRAME_attack35,
|
||||
FRAME_attack36,
|
||||
FRAME_attack37,
|
||||
FRAME_attack38,
|
||||
FRAME_attack39,
|
||||
FRAME_attack40,
|
||||
FRAME_attack41,
|
||||
FRAME_attack42,
|
||||
FRAME_attack43,
|
||||
FRAME_attack44,
|
||||
FRAME_attack45,
|
||||
FRAME_attack46,
|
||||
FRAME_attack47,
|
||||
FRAME_attack48,
|
||||
FRAME_attack49,
|
||||
FRAME_attack50,
|
||||
FRAME_attack51,
|
||||
FRAME_attack52,
|
||||
FRAME_attack53,
|
||||
FRAME_attack54,
|
||||
FRAME_attack55,
|
||||
FRAME_attack56,
|
||||
FRAME_attack57,
|
||||
FRAME_attack58,
|
||||
FRAME_attack59,
|
||||
FRAME_attack60
|
||||
};
|
||||
|
||||
constexpr float MODEL_SCALE = 1.000000f;
|
|
@ -785,7 +785,7 @@ bool SV_movestep(edict_t *ent, vec3_t move, bool relink)
|
|||
{
|
||||
if ((!(ent->enemy)) || (!(ent->enemy->inuse)))
|
||||
{
|
||||
TargetTesla(ent, new_bad->owner);
|
||||
//TargetTesla(ent, new_bad->owner);
|
||||
ent->monsterinfo.aiflags |= AI_BLOCKED;
|
||||
}
|
||||
else if (!strcmp(ent->enemy->classname, "tesla_mine"))
|
||||
|
@ -795,13 +795,13 @@ bool SV_movestep(edict_t *ent, vec3_t move, bool relink)
|
|||
{
|
||||
if (!visible(ent, ent->enemy))
|
||||
{
|
||||
TargetTesla(ent, new_bad->owner);
|
||||
//TargetTesla(ent, new_bad->owner);
|
||||
ent->monsterinfo.aiflags |= AI_BLOCKED;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TargetTesla(ent, new_bad->owner);
|
||||
//TargetTesla(ent, new_bad->owner);
|
||||
ent->monsterinfo.aiflags |= AI_BLOCKED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ bool blocked_checkplat(edict_t *self, float dist)
|
|||
|
||||
inline void monster_jump_start(edict_t *self)
|
||||
{
|
||||
monster_done_dodge(self);
|
||||
//monster_done_dodge(self);
|
||||
|
||||
self->monsterinfo.jump_time = level.time + 3_sec;
|
||||
}
|
||||
|
@ -1400,7 +1400,7 @@ MONSTERINFO_DODGE(M_MonsterDodge) (edict_t *self, edict_t *attacker, gtime_t eta
|
|||
if (self->monsterinfo.next_duck_time > level.time)
|
||||
return;
|
||||
|
||||
monster_done_dodge(self);
|
||||
//monster_done_dodge(self);
|
||||
|
||||
if (self->monsterinfo.duck(self, eta))
|
||||
{
|
||||
|
|
|
@ -716,7 +716,7 @@ mframe_t stalker_frames_dodge_run[] = {
|
|||
{ ai_run, 13 },
|
||||
{ ai_run, 17 },
|
||||
{ ai_run, 21 },
|
||||
{ ai_run, 18, monster_done_dodge }
|
||||
{ ai_run, 18 }
|
||||
};
|
||||
MMOVE_T(stalker_move_dodge_run) = { FRAME_run01, FRAME_run04, stalker_frames_dodge_run, nullptr };
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue