This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

ExecuteHamB on Ham_Killed player post won't reset deadflag.


Post New Thread Reply   
 
Thread Tools Display Modes
luxor
Member
Join Date: Jan 2014
Old 01-04-2016 , 17:16   Re: ExecuteHamB on Ham_Killed player post won't reset deadflag.
Reply With Quote #11

hamlet explained me why it doesn't work :
killed pre -> deadflag = 1
spawn pre -> deadflag= 1
spawn post -> deadflag = 0
killed post -> deadflag = 1

so... it is not an amxx issue...
luxor is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-04-2016 , 17:39   Re: ExecuteHamB on Ham_Killed player post won't reset deadflag.
Reply With Quote #12

Hamsandwich is essentially a wrapper around virtual functions of game. it does nothing else than executing/hooking game functions. No custom code. Issue is about game knowledge.

Best way to respawn a dead player is to use wickedd's way, DEAD_RESPAWNABLE + think. Player will respawn 0.1 second later.

pev_deadflag is always reset at spawn, so this is unrelated.

Explanation is likely similar to what KliPPy said. You are marked by the client as dead from DeathMsg and ScoreAttrib message.
DeathMsg uses MSG_ALL and ScoreAttrib uses MSG_ONE. I don't remember exactly how engine works, but if I'm right, when saving messages for current frame, MSG_ONE has the priority before the global one. So, it would make sense that client would receive DeathMsg at the very end of the current frame, and thus client would be still marked as dead at player's spawn.
__________________

Last edited by Arkshine; 01-04-2016 at 17:40.
Arkshine 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 14:54.


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