Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2893,6 +2893,8 @@ if(SERVER)
foxnet/components/zones/death.h
foxnet/components/zones/freeze.cpp
foxnet/components/zones/freeze.h
foxnet/components/zones/hidenseek.cpp
foxnet/components/zones/hidenseek.h
foxnet/components/zones/roulette.cpp
foxnet/components/zones/roulette.h
foxnet/components/zones/unfreeze.cpp
Expand Down
8 changes: 7 additions & 1 deletion src/base/system.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


#include "system.h"

#include "dbg.h"
Expand Down Expand Up @@ -543,5 +543,11 @@ std::string SanitizeMessage(const char *pMessage)

return Out;
}
std::mt19937 &Rng()
{
static std::random_device rd;
static std::mt19937 gen(rd());
return gen;
}

// FoxNet>
3 changes: 3 additions & 0 deletions src/base/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <string>
#include <vector>
#include <random>

char str_lowercase(char c);
void str_lower(char *pOut);
Expand All @@ -40,4 +41,6 @@ const char *GetParsedArgument(const char *pStr, int Index, bool Rest);
void Rotate(vec2 Center, vec2 *pPoint, float Rotation);
std::string SanitizeMessage(const char *pMessage);

std::mt19937 &Rng();

#endif
4 changes: 3 additions & 1 deletion src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ void CServer::CClient::Reset()
m_RedirectDropTime = 0;

FreeClientOverrideMap(*this);
ResetContent();
}

CServer::CServer()
Expand Down Expand Up @@ -1330,6 +1329,7 @@ int CServer::NewClientNoAuthCallback(int ClientId, void *pUser)
pThis->Antibot()->OnEngineClientJoin(ClientId);

// <FoxNet
pThis->m_aClients[ClientId].ResetContent();
pThis->SendFoxnetInfo(ClientId);
// FoxNet>

Expand Down Expand Up @@ -1372,6 +1372,7 @@ int CServer::NewClientCallback(int ClientId, void *pUser, bool Sixup)
pThis->SendConnLoggingCommand(OPEN_SESSION, pThis->ClientAddr(ClientId));
#endif
// <FoxNet
pThis->m_aClients[ClientId].ResetContent();
pThis->SendFoxnetInfo(ClientId);
// FoxNet>
return 0;
Expand Down Expand Up @@ -4921,6 +4922,7 @@ void CServer::CClient::ResetContent()
{
FreeClientOverrideMap(*this);
str_copy(m_aCustomClient, "DDNet");
m_aClientMessage[0] = '\0';
m_QuietJoin = false;
m_HighBandwidth = true;
}
Expand Down
15 changes: 15 additions & 0 deletions src/engine/shared/config_variables_foxnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ MACRO_CONFIG_INT(SvExecBasedOnPort, sv_execute_based_on_port, 0, 0, 1, CFGFLAG_S
MACRO_CONFIG_INT(SvTeeCursor, sv_tee_cursor, 0, 0, 1, CFGFLAG_SERVER, "Display everyones position at their cursor")
MACRO_CONFIG_INT(SvNoVel, sv_no_vel, 0, 0, 1, CFGFLAG_SERVER, "Set everyones snapping velocity to 0 (disables interpolation on the client)")


// Hide and Seek
MACRO_CONFIG_INT(SvMinigamesSameIp, sv_minigames_same_ip, 0, 0, 1, CFGFLAG_SERVER, "Whether to allow the same ip in minigames")


MACRO_CONFIG_INT(SvHideSeekGiveXp, sv_hide_seek_give_xp, 1, 0, 1, CFGFLAG_SERVER, "Whether the minigame should give xp on game finish")
MACRO_CONFIG_INT(SvHideSeekWarmupTime, sv_hide_seek_warmup_time, 15, 1, 60, CFGFLAG_SERVER, "Delay in seconds before the game starts")
MACRO_CONFIG_INT(SvHideSeekFreezeDuration, sv_hide_seek_freeze_duration, 10, 1, 30, CFGFLAG_SERVER, "How long seekers are frozen on game start")
MACRO_CONFIG_INT(SvHideSeekSeekersTime, sv_hide_seek_seekers_time, 80, 1, 500, CFGFLAG_SERVER, "How much time seekers have to find all hiders")
MACRO_CONFIG_INT(SvHideSeekSeekersGunCooldown, sv_hide_seek_seekers_gun_cooldown, 5000, 1, 10000, CFGFLAG_SERVER, "How long the cooldown for the seekers gun is (like normal weapons)")
MACRO_CONFIG_INT(SvHideSeekSeekersGunFreeze, sv_hide_seek_seekers_gun_freeze, 0, 0, 10000, CFGFLAG_SERVER, "Whether the gun should freeze hit hiders and how long (in ticks, 50 ticks in a second)")
MACRO_CONFIG_INT(SvHideSeekSeekersHammerDelay, sv_hide_seek_seekers_hammer_delay, 275, 1, 10000, CFGFLAG_SERVER, "How long the cooldown for the seekers hammer is (like normal weapons)")
MACRO_CONFIG_INT(SvHideSeekHidersGhostDuration, sv_hide_seek_hiders_ghost_duration, 35, 1, 1000, CFGFLAG_SERVER, "How long hiders remain in ghost mode in second Seconds (30 -> 3 seconds)")
MACRO_CONFIG_INT(SvHideSeekHidersGhostCooldown, sv_hide_seek_hiders_ghost_cooldown, 55, 1, 1000, CFGFLAG_SERVER, "Cooldown time for hiders' ghost mode in second Seconds (30 -> 3 seconds)")

// Scripting

// Notes:
Expand Down
5 changes: 4 additions & 1 deletion src/game/gamecore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ void CCharacterCore::TickDeferred()
{
vec2 Dir = normalize(m_Pos - pCharCore->m_Pos);

bool CanCollide = (m_Super || pCharCore->m_Super) || (!m_CollisionDisabled && !pCharCore->m_CollisionDisabled && Tuning.m_PlayerCollision);
bool CanCollide = (m_Super || pCharCore->m_Super) || (!m_CollisionDisabled && !pCharCore->m_CollisionDisabled && Tuning.m_PlayerCollision && pCharCore->m_Tuning.m_PlayerCollision);
// <FoxNet
CanCollide &= m_Collidable;
// FoxNet>
Expand Down Expand Up @@ -638,6 +638,9 @@ void CCharacterCore::Move()
if(!m_Collidable)
continue;

if(!pCharCore->m_Tuning.m_PlayerCollision)
continue;

if(!g_Config.m_SvMultimapAllowInteraction && m_MultiMapIdx != pCharCore->m_MultiMapIdx)
continue;
// FoxNet>
Expand Down
1 change: 1 addition & 0 deletions src/game/quad_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enum class EZoneType
Hookable,
Unhookable,
Roulette,
HideNSeek,
Num,
};

Expand Down
Loading
Loading