Raised This Month: $51 Target: $400
 12% 

Solved Make entity non-solid on death


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 02-15-2024 , 09:27   Make entity non-solid on death
Reply With Quote #1

In HL: Opposing Force (gearbox) multiplayer, the corpse (or player?) entity stays solid for a solid second after death, leading to the effect of getting stuck on them for a bit. This is especially apparent on func_trains which come to a complete stop for a bit after running someone over.

Is it possible to make the entity non-solid instantly on death, so this wouldn't happen?
__________________

Last edited by anssik; 02-15-2024 at 22:45.
anssik is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-15-2024 , 11:35   Re: Make entity non-solid on death
Reply With Quote #2

I am not sure about hlf but usually on HL you must play with bodyque locations
Hook death and try this:
Code:
new iEnt
while((iEnt = find_ent_by_class(iEnt, “bodyque”)))
     entity_set_vector(iEnt, EV_VEC_origin, Float:{ 9999.0, 9999.0, 9999.0 })
__________________
Jhob94 is offline
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 02-15-2024 , 21:26   Re: Make entity non-solid on death
Reply With Quote #3

I did it this way:
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

#define AUTHOR "Anon"
#define PLUGIN "HL Solid Corpse Fix"
#define VERSION "1.0"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Killed,"player","fw_PlayerKilled")
}

public 
fw_PlayerKilled(ident) {
    new 
iEnt
    
while((iEnt find_ent_by_class(iEnt"bodyque")))
        
entity_set_vector(iEntEV_VEC_originFloat:{ 9999.09999.09999.0 })

    return 
HAM_IGNORED

To no effect.
__________________
anssik is offline
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 02-15-2024 , 21:39   Re: Make entity non-solid on death
Reply With Quote #4

This however seems to work correctly, I'll mark as solved after some more testing.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define AUTHOR "Anon"
#define PLUGIN "HL Solid Corpse Fix"
#define VERSION "1.0"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Killed,"player","fw_PlayerKilled")
}

public 
fw_PlayerKilled(iVictim)
{
    
set_pev(iVictimpev_solidSOLID_NOT)

__________________

Last edited by anssik; 02-15-2024 at 21:40.
anssik is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 02-15-2024 , 23:21   Re: Make entity non-solid on death
Reply With Quote #5

I use this on my HL server:
Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "Not Solid Dead Player" #define VERSION "1.0" #define AUTHOR "Phant" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("DeathMsg", "eDeathMsg", "a") } public eDeathMsg() {     new iVictim = read_data(2)     set_pev(iVictim, pev_solid, SOLID_NOT) }
But unfortunately it's impossible to gibs body by crowbar .
Phant is offline
Send a message via ICQ to Phant
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 02-16-2024 , 17:19   Re: Make entity non-solid on death
Reply With Quote #6

engine forever

PHP Code:
entity_set_int(iVictimEV_INT_solidSOLID_NOT
__________________
mlibre is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode