Fix monster blood not working.
Fix monster hitboxes not working.
This commit is contained in:
@@ -30,8 +30,7 @@
|
|||||||
#include "weapons.h"
|
#include "weapons.h"
|
||||||
#include "func_break.h"
|
#include "func_break.h"
|
||||||
|
|
||||||
const Vector g_vecZero = Vector(0,0,0);
|
extern DLL_GLOBAL Vector g_vecAttackDir;
|
||||||
Vector g_vecAttackDir;
|
|
||||||
entvars_t *g_pevLastInflictor;
|
entvars_t *g_pevLastInflictor;
|
||||||
|
|
||||||
#define HUMAN_GIB_COUNT 6
|
#define HUMAN_GIB_COUNT 6
|
||||||
@@ -1323,32 +1322,32 @@ void CMBaseMonster :: TraceAttack( entvars_t *pevAttacker, float flDamage, Vecto
|
|||||||
{
|
{
|
||||||
m_LastHitGroup = ptr->iHitgroup;
|
m_LastHitGroup = ptr->iHitgroup;
|
||||||
|
|
||||||
/*jlb
|
// do we need the hitboxes to be customizable? use vanilla HL skill.cfg for now
|
||||||
switch ( ptr->iHitgroup )
|
switch ( ptr->iHitgroup )
|
||||||
{
|
{
|
||||||
case HITGROUP_GENERIC:
|
case HITGROUP_GENERIC:
|
||||||
break;
|
break;
|
||||||
case HITGROUP_HEAD:
|
case HITGROUP_HEAD:
|
||||||
flDamage *= gSkillData.monHead;
|
flDamage *= 3; //gSkillData.monHead;
|
||||||
break;
|
break;
|
||||||
case HITGROUP_CHEST:
|
case HITGROUP_CHEST:
|
||||||
flDamage *= gSkillData.monChest;
|
flDamage *= 1; //gSkillData.monChest;
|
||||||
break;
|
break;
|
||||||
case HITGROUP_STOMACH:
|
case HITGROUP_STOMACH:
|
||||||
flDamage *= gSkillData.monStomach;
|
flDamage *= 1; //gSkillData.monStomach;
|
||||||
break;
|
break;
|
||||||
case HITGROUP_LEFTARM:
|
case HITGROUP_LEFTARM:
|
||||||
case HITGROUP_RIGHTARM:
|
case HITGROUP_RIGHTARM:
|
||||||
flDamage *= gSkillData.monArm;
|
flDamage *= 1; //gSkillData.monArm;
|
||||||
break;
|
break;
|
||||||
case HITGROUP_LEFTLEG:
|
case HITGROUP_LEFTLEG:
|
||||||
case HITGROUP_RIGHTLEG:
|
case HITGROUP_RIGHTLEG:
|
||||||
flDamage *= gSkillData.monLeg;
|
flDamage *= 1; //gSkillData.monLeg;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
jlb*/
|
|
||||||
SpawnBlood(ptr->vecEndPos, BloodColor(), flDamage);// a little surface blood.
|
SpawnBlood(ptr->vecEndPos, BloodColor(), flDamage);// a little surface blood.
|
||||||
TraceBleed( flDamage, vecDir, ptr, bitsDamageType );
|
TraceBleed( flDamage, vecDir, ptr, bitsDamageType );
|
||||||
AddMultiDamage( pevAttacker, this->edict(), flDamage, bitsDamageType );
|
AddMultiDamage( pevAttacker, this->edict(), flDamage, bitsDamageType );
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ void check_monster_hurt(edict_t *pAttacker)
|
|||||||
vecSpot = vecSrc + gpGlobals->v_forward * distance;
|
vecSpot = vecSrc + gpGlobals->v_forward * distance;
|
||||||
|
|
||||||
// trace a line ignoring enemies body...
|
// trace a line ignoring enemies body...
|
||||||
UTIL_TraceLine ( vecSrc, vecSpot, dont_ignore_monsters, pent, &tr );
|
UTIL_TraceLine ( vecSrc, vecSpot, dont_ignore_monsters, pAttacker, &tr );
|
||||||
|
|
||||||
damage = pent->v.fuser4 - pent->v.health;
|
damage = pent->v.fuser4 - pent->v.health;
|
||||||
|
|
||||||
@@ -795,7 +795,6 @@ void check_respawn(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DLL_GLOBAL short g_sModelIndexFireball;// holds the index for the fireball
|
DLL_GLOBAL short g_sModelIndexFireball;// holds the index for the fireball
|
||||||
DLL_GLOBAL short g_sModelIndexSmoke;// holds the index for the smoke cloud
|
DLL_GLOBAL short g_sModelIndexSmoke;// holds the index for the smoke cloud
|
||||||
DLL_GLOBAL short g_sModelIndexTinySpit;// holds the index for the spore grenade explosion
|
DLL_GLOBAL short g_sModelIndexTinySpit;// holds the index for the spore grenade explosion
|
||||||
@@ -807,6 +806,11 @@ DLL_GLOBAL short g_sModelIndexLaser;// holds the index for the laser beam
|
|||||||
DLL_GLOBAL const char *g_pModelNameLaser = "sprites/laserbeam.spr";
|
DLL_GLOBAL const char *g_pModelNameLaser = "sprites/laserbeam.spr";
|
||||||
DLL_GLOBAL short g_sModelIndexLaserDot;// holds the index for the laser beam dot
|
DLL_GLOBAL short g_sModelIndexLaserDot;// holds the index for the laser beam dot
|
||||||
|
|
||||||
|
// globals.cpp
|
||||||
|
DLL_GLOBAL const Vector g_vecZero = Vector(0, 0, 0); // null vector
|
||||||
|
DLL_GLOBAL Vector g_vecAttackDir; // attack direction
|
||||||
|
|
||||||
|
|
||||||
void world_precache(void)
|
void world_precache(void)
|
||||||
{
|
{
|
||||||
g_sModelIndexFireball = PRECACHE_MODELINDEX("sprites/zerogxplode.spr");// fireball
|
g_sModelIndexFireball = PRECACHE_MODELINDEX("sprites/zerogxplode.spr");// fireball
|
||||||
@@ -1254,10 +1258,11 @@ int mmDispatchSpawn( edict_t *pent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// free any allocated keyvalue memory
|
// free any allocated keyvalue memory
|
||||||
for (index = 0; index < monster_spawn_count; index++)
|
for (index = 0; index < MAX_MONSTERS; index++)
|
||||||
{
|
{
|
||||||
if (monster_spawnpoint[index].keyvalue)
|
if (monster_spawnpoint[index].keyvalue != NULL)
|
||||||
free(monster_spawnpoint[index].keyvalue);
|
free(monster_spawnpoint[index].keyvalue);
|
||||||
|
monster_spawnpoint[index].keyvalue = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do level initialization stuff here...
|
// do level initialization stuff here...
|
||||||
|
|||||||
Reference in New Issue
Block a user