monster_alien_grunt: Fix health value.

This commit is contained in:
Marco Cawthorne 2024-03-04 18:40:57 -08:00
parent ba23ecfab0
commit 9d3ec2b89c
Signed by: eukara
GPG key ID: CE2032F0A2882A22
6 changed files with 30 additions and 16 deletions

View file

@ -52,6 +52,7 @@ We've had people ask in the oddest of places for help, please don't do that.
- Spike for FTEQW and for being the most helpful person all around! - Spike for FTEQW and for being the most helpful person all around!
- Xylemon for the hundreds of test maps, verifying entity and game-logic behaviour - Xylemon for the hundreds of test maps, verifying entity and game-logic behaviour
- Theuaredead`, preston22, dqus for various patches
- To my supporters on Patreon, who are always eager to follow what I do. - To my supporters on Patreon, who are always eager to follow what I do.
- Any and all people trying it, tinkering with it etc. :) - Any and all people trying it, tinkering with it etc. :)

View file

@ -110,6 +110,10 @@ Obituary_Add(string attacker, string victim, float weapon, float flags)
int x, y; int x, y;
x = OBITUARY_LINES; x = OBITUARY_LINES;
if (attacker == "worldspawn" || attacker == victim) {
attacker = "";
}
/* we're not full yet, so fill up the buffer */ /* we're not full yet, so fill up the buffer */
if (g_obituary_count < x) { if (g_obituary_count < x) {
y = g_obituary_count; y = g_obituary_count;
@ -157,6 +161,8 @@ Obituary_Draw(void)
g_obituary[i].icon = g_obituary[i+1].icon; g_obituary[i].icon = g_obituary[i+1].icon;
} }
g_obituary[OBITUARY_LINES-1].attacker = ""; g_obituary[OBITUARY_LINES-1].attacker = "";
g_obituary[OBITUARY_LINES-1].victim = "";
g_obituary[OBITUARY_LINES-1].icon = 0;
g_obituary_time = OBITUARY_TIME; g_obituary_time = OBITUARY_TIME;
g_obituary_count--; g_obituary_count--;
@ -170,7 +176,7 @@ Obituary_Draw(void)
for (i = 0; i < OBITUARY_LINES; i++) { for (i = 0; i < OBITUARY_LINES; i++) {
string a, v; string a, v;
if (!g_obituary[i].attacker) { if (!g_obituary[i].victim) {
break; break;
} }

View file

@ -123,15 +123,13 @@ HLGameRules::PlayerPostFrame(NSClientPlayer pl)
void void
HLGameRules::PlayerConnect(NSClientPlayer pl) HLGameRules::PlayerConnect(NSClientPlayer pl)
{ {
if (Plugin_PlayerConnect(pl) == FALSE) super::PlayerConnect(pl);
bprint(PRINT_HIGH, sprintf("%s connected\n", pl.netname));
} }
void void
HLGameRules::PlayerDisconnect(NSClientPlayer pl) HLGameRules::PlayerDisconnect(NSClientPlayer pl)
{ {
if (Plugin_PlayerDisconnect(pl) == FALSE) super::PlayerDisconnect(pl);
bprint(PRINT_HIGH, sprintf("%s disconnected\n", pl.netname));
} }
void void

View file

@ -58,18 +58,23 @@ entity
FX_Corpse_Spawn(player pl, float anim) FX_Corpse_Spawn(player pl, float anim)
{ {
NSRenderableEntity body_next = (NSRenderableEntity)FX_Corpse_Next(); NSRenderableEntity body_next = (NSRenderableEntity)FX_Corpse_Next();
setorigin(body_next, pl.origin + [0,0,32]);
if (pl.flags & FL_CROUCHING) {
body_next.SetOrigin(pl.GetOrigin() + [0,0,32]);
} else {
body_next.SetOrigin(pl.GetOrigin());
}
body_next.SetMovetype(MOVETYPE_BOUNCE); body_next.SetMovetype(MOVETYPE_BOUNCE);
body_next.SetSolid(SOLID_CORPSE); body_next.SetSolid(SOLID_CORPSE);
setmodel(body_next, pl.model); body_next.SetModel(pl.GetModel());
setsize(body_next, VEC_HULL_MIN, [16, 16, -16]); body_next.SetSize(VEC_HULL_MIN, [16, 16, -16]);
body_next.SetModelindex(pl.modelindex); body_next.SetAngles(pl.GetAngles());
body_next.SetAngles(pl.angles); body_next.SetVelocity(pl.GetVelocity() + [0,0,120]);
body_next.velocity = (pl.velocity) + [0,0,120];
body_next.colormap = pl.colormap;
body_next.SetFrame(anim); body_next.SetFrame(anim);
body_next.frame1time = 0.0f;
body_next.ScheduleThink(FX_Corpse_Update, 0.0f); body_next.ScheduleThink(FX_Corpse_Update, 0.0f);
body_next.colormap = pl.colormap;
body_next.frame1time = 0.0f;
return (entity)body_next; return (entity)body_next;
} }
#endif #endif

View file

@ -3,7 +3,7 @@ entityDef monster_alien_grunt
"spawnclass" "NSMonster" "spawnclass" "NSMonster"
"model" "models/agrunt.mdl" "model" "models/agrunt.mdl"
"netname" "Alien Grunt" "netname" "Alien Grunt"
"health" "skill:alien_grunt_health" "health" "skill:agrunt_health"
"mins" "-16 -16 0" "mins" "-16 -16 0"
"maxs" "16 16 72" "maxs" "16 16 72"
"eye_height" "64" "eye_height" "64"

View file

@ -1,8 +1,12 @@
monster_generic.thud BodyDrop.Light
{ {
sample common/bodydrop1.wav
sample common/bodydrop2.wav sample common/bodydrop2.wav
sample common/bodydrop3.wav sample common/bodydrop3.wav
}
BodyDrop.Heavy
{
sample common/bodydrop1.wav
sample common/bodydrop4.wav sample common/bodydrop4.wav
} }