HLFX.Ru Forum
профиль •  правила •  регистрация •  календарь •  народ •  FAQ •  поиск •  новое •  сутки •  главная •  выход  
HLFX.Ru Forum HLFX.Ru Forum > Теория и практика > Half-Life SDK > Wrong death animations?
player not aligning correctly to the ground after death
  Предыдущая тема   Следующая тема
Автор
Тема Новая тема    Ответить
Napoleon321
Admiral

Дата регистрации: Jan 2017
Проживает: Sofia
Сообщений: 57
Возраст: 34

Рейтинг



Question Wrong death animations?

Hello Team,

I'm approaching you with a question, you might have ideas on what is wrong here or maybe you have seen this one before.

I recently picked up the SDK of one of my mods that I haven't touched from 2019 and recompiled the dlls and started the game. There are no errors or warnings during compile; however when I go in the game there is something bothering me.

When a player is killed the body does not align to the ground 100% of the times... In like 2 out of 3 times it does not actually.

Having in mind that I haven't touched any of the animation code... and having in mind that it worked before correctly (way back in 2019...) I think there's something wrong with the HL build provided on Steam. (Build 8684 from 2020).

I tested on another build I use for dedicated server Build 4554 from 2009 and the issue is not present...

Any thoughts on how to mitigate that would be really appreciated...

[ Вложение ]
20210526164925_1.jpg

__________________
FlatLine Arena | Tutorials

If you don't like something, MOD it!

Сообщить модератору | | IP: Записан
Сообщение: 202059

Старое сообщение 26-05-2021 14:09
- За что?
Ku2zoff
Мастер Ёда из Деревни Дуракоф

Дата регистрации: Apr 2007
Проживает: В Деревне дураков
Сообщений: 6749
Возраст: 33

Рейтинг



Try to increase death's animations' fps by 15-25%. AFAIR, that worked for me, when I was working on my abandoned multiplayer mod.

Добавлено 26-05-2021 в 22:26:

Also, you may reduce game fps with fps_max and fps_override cvars, and check animations at lower framerates.

Добавлено 26-05-2021 в 22:31:

Napoleon321 are you using models/player.mdl and models/player/modelname/modelname.mdl with identical animations? I mean animation's length in frames, fps and order in animations list.

Сообщить модератору | | IP: Записан
Сообщение: 202060

Старое сообщение 26-05-2021 15:31
- За что?
Napoleon321
Admiral

Дата регистрации: Jan 2017
Проживает: Sofia
Сообщений: 57
Возраст: 34

Рейтинг



Hello Ku2zoff! I was hoping that you'll reply to this one.

When you say to increase the death animation's fps by 15-25% you mean to modify the models/animations or to do a change in the code?

Edit: Okay.. That's really stupid.. why are they limiting us to 60 FPS?

I mean I just put cap on the fps to 60 with the override command as well and this was resolved... but... really Valve?

__________________
FlatLine Arena | Tutorials

If you don't like something, MOD it!

Отредактировано Napoleon321 26-05-2021 в 15:40

Сообщить модератору | | IP: Записан
Сообщение: 202061

Старое сообщение 26-05-2021 15:33
- За что?
Ku2zoff
Мастер Ёда из Деревни Дуракоф

Дата регистрации: Apr 2007
Проживает: В Деревне дураков
Сообщений: 6749
Возраст: 33

Рейтинг



Цитата:
Napoleon321 писал:
you mean to modify the models/animations or to do a change in the code?

Try both ways. First and easier is pev->framerate for CBasePlayer. But I doubt it will help. Look for m_iRespawnFrames in player.cpp, also. It should be relevant to your problem.

Сообщить модератору | | IP: Записан
Сообщение: 202062

Старое сообщение 26-05-2021 15:39
- За что?
Napoleon321
Admiral

Дата регистрации: Jan 2017
Проживает: Sofia
Сообщений: 57
Возраст: 34

Рейтинг



The fps set to 60 fixed the issue.. but.. why is Valve limiting us that way?

__________________
FlatLine Arena | Tutorials

If you don't like something, MOD it!

Сообщить модератору | | IP: Записан
Сообщение: 202063

Старое сообщение 26-05-2021 15:41
- За что?
Ku2zoff
Мастер Ёда из Деревни Дуракоф

Дата регистрации: Apr 2007
Проживает: В Деревне дураков
Сообщений: 6749
Возраст: 33

Рейтинг



I think, I found code that causes the problem:

C++ Source Code:
1
if (pev->modelindex && (!m_fSequenceFinished) && (pev->deadflag == DEAD_DYING))
2
{
3
  StudioFrameAdvance( );
4
 
5
  m_iRespawnFrames++;				// Note, these aren't necessarily real "frames", so behavior is dependent on # of client movement commands
6
  if ( m_iRespawnFrames < 120 )   // Animations should be no longer than this
7
    return;
8
}

In this case m_iRespawnFrames is fps-dependent value. You may multiple it by gpGlobals->frametime. Something like this:
C++ Source Code:
m_iRespawnFrames += 10 * gpGlobals->frametime;


Добавлено 26-05-2021 в 22:54:

Цитата:
Napoleon321 писал:
why is Valve limiting us that way?

It's not a limit, it's a too often calling of PlayerDeathThink at high framerates. At fps 60 m_iRespawnFrames reaches the value 120 in two seconds. At fps 100 it reaches same value in 1.2 seconds. And et cetera.

Добавлено 26-05-2021 в 23:05:

Same code from ReGameDLL. There is no m_iRespawnFrames variable:
C++ Source Code:
if (pev->modelindex && !m_fSequenceFinished && pev->deadflag == DEAD_DYING)
{
  StudioFrameAdvance();
  return;
}

The switch is m_fSequenceFinished, not m_iRespawnFrames. As it should be, by the way.

Сообщить модератору | | IP: Записан
Сообщение: 202064

Старое сообщение 26-05-2021 16:05
- За что?
Napoleon321
Admiral

Дата регистрации: Jan 2017
Проживает: Sofia
Сообщений: 57
Возраст: 34

Рейтинг



Your snipped indeed fixed the issue; Still I'm wondering should I use it.. Normally any FPs above 125 or 144 was disallowed during AG tournaments; since it was allowing faster shooting, player spawn, gauss charge etc...

__________________
FlatLine Arena | Tutorials

If you don't like something, MOD it!

Сообщить модератору | | IP: Записан
Сообщение: 202065

Старое сообщение 26-05-2021 16:06
- За что?
Ku2zoff
Мастер Ёда из Деревни Дуракоф

Дата регистрации: Apr 2007
Проживает: В Деревне дураков
Сообщений: 6749
Возраст: 33

Рейтинг



Цитата:
Napoleon321 писал:
I'm wondering should I use it..

Modify your code like in ReGameDLL, see my previous post.

Сообщить модератору | | IP: Записан
Сообщение: 202066

Старое сообщение 26-05-2021 16:07
- За что?
Napoleon321
Admiral

Дата регистрации: Jan 2017
Проживает: Sofia
Сообщений: 57
Возраст: 34

Рейтинг



Many thanks for this.

__________________
FlatLine Arena | Tutorials

If you don't like something, MOD it!

Сообщить модератору | | IP: Записан
Сообщение: 202067

Старое сообщение 26-05-2021 17:06
- За что?
Тема: (Опционально)
Ваш ответ:



Переводчик транслита


[проверить длину сообщения]
Опции: Автоматическое формирование ссылок: автоматически добавлять [url] и [/url] вокруг интернет адресов.
Уведомление по E-Mail: отправить вам уведомление, если кто-то ответил в тему (только для зарегистрированных пользователей).
Отключить смайлики в сообщении: не преобразовывать текстовые смайлики в картинки.
Показать подпись: добавить вашу подпись в конец сообщения (только зарегистрированные пользователи могут иметь подписи).

Временная зона GMT. Текущее время 15:18. Новая тема    Ответить
  Предыдущая тема   Следующая тема
HLFX.Ru Forum HLFX.Ru Forum > Теория и практика > Half-Life SDK > Wrong death animations?
player not aligning correctly to the ground after death
Версия для печати | Отправить тему по E-Mail | Подписаться на эту тему

Быстрый переход:
Оцените эту тему:

Правила Форума:
Вы not можете создавать новые темы
Вы not можете отвечать в темы
Вы not можете прикреплять вложения
Вы not можете редактировать ваши сообщения
HTML Код ВЫКЛ
vB Код ВКЛ
Смайлики ВКЛ
[IMG] Код ВКЛ
 

< Обратная связь - HLFX.ru >

На основе vBulletin
Авторское право © 2000 - 2002, Jelsoft Enterprises Limited.
Дизайн и программирование: Crystice Softworks © 2005 - 2024