From 9d3ec2b89caf6e5d0a038364f0a9821782b53701 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Mon, 4 Mar 2024 18:40:57 -0800 Subject: [PATCH] monster_alien_grunt: Fix health value. --- README.md | 1 + src/client/obituary.qc | 8 +++++++- src/server/gamerules.qc | 6 ++---- src/shared/fx_corpse.qc | 21 +++++++++++++-------- zpak001.pk3dir/def/monsters/alien_grunt.def | 2 +- zpak001.pk3dir/sound/monsters_valve.sndshd | 8 ++++++-- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 7c99b16..1229163 100644 --- a/README.md +++ b/README.md @@ -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! - 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. - Any and all people trying it, tinkering with it etc. :) diff --git a/src/client/obituary.qc b/src/client/obituary.qc index 807a5b0..be2b602 100644 --- a/src/client/obituary.qc +++ b/src/client/obituary.qc @@ -110,6 +110,10 @@ Obituary_Add(string attacker, string victim, float weapon, float flags) int x, y; x = OBITUARY_LINES; + if (attacker == "worldspawn" || attacker == victim) { + attacker = ""; + } + /* we're not full yet, so fill up the buffer */ if (g_obituary_count < x) { y = g_obituary_count; @@ -157,6 +161,8 @@ Obituary_Draw(void) g_obituary[i].icon = g_obituary[i+1].icon; } 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_count--; @@ -170,7 +176,7 @@ Obituary_Draw(void) for (i = 0; i < OBITUARY_LINES; i++) { string a, v; - if (!g_obituary[i].attacker) { + if (!g_obituary[i].victim) { break; } diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index 5343c88..c3727ef 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -123,15 +123,13 @@ HLGameRules::PlayerPostFrame(NSClientPlayer pl) void HLGameRules::PlayerConnect(NSClientPlayer pl) { - if (Plugin_PlayerConnect(pl) == FALSE) - bprint(PRINT_HIGH, sprintf("%s connected\n", pl.netname)); + super::PlayerConnect(pl); } void HLGameRules::PlayerDisconnect(NSClientPlayer pl) { - if (Plugin_PlayerDisconnect(pl) == FALSE) - bprint(PRINT_HIGH, sprintf("%s disconnected\n", pl.netname)); + super::PlayerDisconnect(pl); } void diff --git a/src/shared/fx_corpse.qc b/src/shared/fx_corpse.qc index d254546..34614c9 100644 --- a/src/shared/fx_corpse.qc +++ b/src/shared/fx_corpse.qc @@ -58,18 +58,23 @@ entity FX_Corpse_Spawn(player pl, float anim) { 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.SetSolid(SOLID_CORPSE); - setmodel(body_next, pl.model); - setsize(body_next, VEC_HULL_MIN, [16, 16, -16]); - body_next.SetModelindex(pl.modelindex); - body_next.SetAngles(pl.angles); - body_next.velocity = (pl.velocity) + [0,0,120]; - body_next.colormap = pl.colormap; + body_next.SetModel(pl.GetModel()); + body_next.SetSize(VEC_HULL_MIN, [16, 16, -16]); + body_next.SetAngles(pl.GetAngles()); + body_next.SetVelocity(pl.GetVelocity() + [0,0,120]); body_next.SetFrame(anim); - body_next.frame1time = 0.0f; body_next.ScheduleThink(FX_Corpse_Update, 0.0f); + body_next.colormap = pl.colormap; + body_next.frame1time = 0.0f; return (entity)body_next; } #endif diff --git a/zpak001.pk3dir/def/monsters/alien_grunt.def b/zpak001.pk3dir/def/monsters/alien_grunt.def index 4ff3aac..ba43131 100644 --- a/zpak001.pk3dir/def/monsters/alien_grunt.def +++ b/zpak001.pk3dir/def/monsters/alien_grunt.def @@ -3,7 +3,7 @@ entityDef monster_alien_grunt "spawnclass" "NSMonster" "model" "models/agrunt.mdl" "netname" "Alien Grunt" - "health" "skill:alien_grunt_health" + "health" "skill:agrunt_health" "mins" "-16 -16 0" "maxs" "16 16 72" "eye_height" "64" diff --git a/zpak001.pk3dir/sound/monsters_valve.sndshd b/zpak001.pk3dir/sound/monsters_valve.sndshd index 4604304..c357eff 100644 --- a/zpak001.pk3dir/sound/monsters_valve.sndshd +++ b/zpak001.pk3dir/sound/monsters_valve.sndshd @@ -1,8 +1,12 @@ -monster_generic.thud +BodyDrop.Light { - sample common/bodydrop1.wav sample common/bodydrop2.wav sample common/bodydrop3.wav +} + +BodyDrop.Heavy +{ + sample common/bodydrop1.wav sample common/bodydrop4.wav }