Half-Life и Adrenaline Gamer форум
http://aghl.ru/forum/

corpse model on death find ?
http://aghl.ru/forum/viewtopic.php?f=12&t=2666
Страница 1 из 1

Автор:  abdobiskra [ 02 май 2017, 17:48 ]
Заголовок сообщения:  corpse model on death find ?

How i can found the corpse of model when client death ?
my general ida make plugin similar like this :
https://www.youtube.com/watch?v=XpFqwYJPz6o
btw this plugin used :
Код:
register_event("ClCorpse", "event_cl_corpse", "a")
i thing this stuff not found in Hl1 !
any ida ?

Автор:  Lev [ 02 май 2017, 19:33 ]
Заголовок сообщения:  Re: corpse model on death find ?

There is a global body queue in hl.dll. It is limited to 4 bodies. I think you can access it only via something like Orpheu. Probably easier will be to block body copying to corpse and create corpse on your own.
And, there is another note: in pure HL (non bugfixed) there was such behavior: until dead client spawned again, it was SOLID_SLIDEBOX, so it behaved the same as on video - crowbar hit it with blood spawn.

Автор:  abdobiskra [ 02 май 2017, 20:01 ]
Заголовок сообщения:  Re: corpse model on death find ?

Lev писал(а):
There is a global body queue in hl.dll. It is limited to 4 bodies. I think you can access it only via something like Orpheu. Probably easier will be to block body copying to corpse and create corpse on your own.

as i think when i test Orpheu in the past did not work with last version in ur bugfixed .... and other guys said this module work only in old version from bugfixed

Автор:  Lev [ 03 май 2017, 16:27 ]
Заголовок сообщения:  Re: corpse model on death find ?

Just different signature.

Автор:  abdobiskra [ 18 авг 2017, 23:13 ]
Заголовок сообщения:  Re: corpse model on death find ?

i try to make new corpse :

 

But it is not solid and shows no effect
Where is the problem ? (Do i also need to make new effects, such as blood and sound, etc.)

Автор:  Lev [ 18 авг 2017, 23:41 ]
Заголовок сообщения:  Re: corpse model on death find ?

Your code looks like a mess of all.
Код:
void CBasePlayer::PlayerDeathThink(void)
{
...
   // Clear inclination came from client view
   pev->angles.x = 0;

   if (pev->modelindex && (!m_fSequenceFinished) && (pev->deadflag == DEAD_DYING))
      StudioFrameAdvance( );

   // time given to animate corpse and don't allow to respawn till this time ends
   if (gpGlobals->time < m_flDeathAnimationStartTime + 1.5)
      return;

//=========================================================
// StudioFrameAdvance - advance the animation frame up to the current time
// if an flInterval is passed in, only advance animation that number of seconds
//=========================================================
float CBaseAnimating :: StudioFrameAdvance ( float flInterval )
{
   if (flInterval == 0.0)
   {
      flInterval = (gpGlobals->time - pev->animtime);
      if (flInterval < 0.0)
      {
         pev->animtime = gpGlobals->time;
         return 0.0;
      }
   }
   if (! pev->animtime)
      flInterval = 0.0;
   
   pev->frame += flInterval * m_flFrameRate * pev->framerate;
   pev->animtime = gpGlobals->time;

   if (pev->frame < 0.0 || pev->frame >= 256.0)
   {
      if (m_fSequenceLoops)
         pev->frame -= (int)(pev->frame / 256.0) * 256.0;
      else
         pev->frame = (pev->frame < 0.0) ? 0 : 255;
      m_fSequenceFinished = TRUE;   // just in case it wasn't caught in GetEvents
   }

   return flInterval;
}
This is how HLSDK animate corpse (actually the player's model, it is not yet copied into a corpse entity).
After animation finishes, it waits for a key press (or a timer in BugfixedHL to switch into an observer) and then copy into a corpse.
Depending on what you are actually trying to achieve you have to block corpse copying, or get the corpse model after copy.
If you are going to create entities on your own, you will have to deal with their deletion too.

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/