Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Sign in to follow this  
billylee

Температура игрока на бегу

Есть ли (а думаю должен быть) такой параметр гдето в игре? Где же он, в плаер константс не нашел... А файлов то много и они длинные) Никто не натыкался? (Всем огромное спасибо за подсказки по моим предыдущим темам, век не забуду;)

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

одними константами отдельно температуру на бегу не поднять
GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT отвечает за температуру покоя и она умножается на 3 если персонаж бежит
тогда придется править в scripts\4_World\Classes\Environment\Environment.c

modded class Environment
{
    override float GetPlayerHeat()
	{
		float heat = Math.Max(m_PlayerSpeed * GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT, GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT);
		if (m_PlayerSpeed > 2)
		{
			return heat + 5;
		}
        return heat;
	}
}

 

Share this post


Link to post
Share on other sites



  • 0
float heat = Math.Max(m_PlayerSpeed * GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT, GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT);

вот такая зависимость от скорости внутри Environment
m_PlayerSpeed варьируется от 0 до 3
3 - это бег

Share this post


Link to post
Share on other sites
  • 0
19.01.2024 в 09:43, Archon7th сказал:

вот такая зависимость от скорости внутри Environment
 

таакс..., зависимость вижу, как бы на нее повлиять))) чтобы повысить температуру на бегу... Хочу кашу из топора), не судите строго)...

Edited by billylee (see edit history)

Share this post


Link to post
Share on other sites
  • 0
8 часов назад, Archon7th сказал:

одними константами отдельно температуру на бегу не поднять
GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT отвечает за температуру покоя и она умножается на 3 если персонаж бежит
тогда придется править в scripts\4_World\Classes\Environment\Environment.c

modded class Environment { override float GetPlayerHeat() { float heat = Math.Max(m_PlayerSpeed * GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT, GameConstants.ENVIRO_DEFAULT_ENTITY_HEAT); if (m_PlayerSpeed > 2) { return heat + 5; } return heat; } }

 

Безмерно благодарен, будь у меня миллион долларов ну или не так много, я бы вас как-то отблагодарил)))
Все прекрасно работает, у меня извечный вопрос: ведь правильно,? если я не копирую больше никакого кода ванильного сюда, просто вот так и модирую файлик чисто наполняя этим кодом или надо как-то весь класс вливать туда еще, а то потом будут какие-то недочеты?
Я пока залил чисто этим кодом, пока вроде все ок. Выходит игра считыват все, что есть в ванили, плюс еще то, что в моде, даже если мы берем кусок кода от существующего класса?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.