mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Added option to make super hook endless
removed RACE_PAUSE Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
3cb59795a6
commit
76c6bc7e2f
|
@ -8,6 +8,7 @@
|
||||||
//===============================
|
//===============================
|
||||||
/* DDRace */
|
/* DDRace */
|
||||||
//MACRO_CONFIG_STR(SvEntities, sv_entities, 64, "Latest", CFGFLAG_SERVER, "The type of entities used") still need to think of a way
|
//MACRO_CONFIG_STR(SvEntities, sv_entities, 64, "Latest", CFGFLAG_SERVER, "The type of entities used") still need to think of a way
|
||||||
|
MACRO_CONFIG_INT(SvEndlessSuperHook, sv_endless_super_hook, 0, 0, 1, CFGFLAG_SERVER, "Endless hook for super players on/off")
|
||||||
MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, 0, 1, CFGFLAG_SERVER, "Emotional Tees on/off")
|
MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, 0, 1, CFGFLAG_SERVER, "Emotional Tees on/off")
|
||||||
MACRO_CONFIG_INT(SvOldShotgun, sv_old_shotgun, 0, 0, 1, CFGFLAG_SERVER, "Makes Shotgun laser pull towards the shooter, rather than the last bounce origin")
|
MACRO_CONFIG_INT(SvOldShotgun, sv_old_shotgun, 0, 0, 1, CFGFLAG_SERVER, "Makes Shotgun laser pull towards the shooter, rather than the last bounce origin")
|
||||||
MACRO_CONFIG_INT(SvReconnectTime,sv_reconnect_time,5,0,9999,CFGFLAG_SERVER,"how much time between leaves and joins")
|
MACRO_CONFIG_INT(SvReconnectTime,sv_reconnect_time,5,0,9999,CFGFLAG_SERVER,"how much time between leaves and joins")
|
||||||
|
|
|
@ -292,7 +292,7 @@ void CCharacter::FireWeapon()
|
||||||
m_NumObjectsHit = 0;
|
m_NumObjectsHit = 0;
|
||||||
GameServer()->CreateSound(m_Pos, SOUND_HAMMER_FIRE);
|
GameServer()->CreateSound(m_Pos, SOUND_HAMMER_FIRE);
|
||||||
|
|
||||||
if (!g_Config.m_SvHit || m_RaceState == RACE_PAUSE) break;
|
if (!g_Config.m_SvHit) break;
|
||||||
|
|
||||||
CCharacter *aEnts[64];
|
CCharacter *aEnts[64];
|
||||||
int Hits = 0;
|
int Hits = 0;
|
||||||
|
@ -357,10 +357,8 @@ void CCharacter::FireWeapon()
|
||||||
|
|
||||||
case WEAPON_SHOTGUN:
|
case WEAPON_SHOTGUN:
|
||||||
{
|
{
|
||||||
if(m_RaceState != RACE_PAUSE) {
|
|
||||||
new CLaser(&GameServer()->m_World, m_Pos, Direction, GameServer()->Tuning()->m_LaserReach, m_pPlayer->GetCID(), 1);
|
new CLaser(&GameServer()->m_World, m_Pos, Direction, GameServer()->Tuning()->m_LaserReach, m_pPlayer->GetCID(), 1);
|
||||||
GameServer()->CreateSound(m_Pos, SOUND_SHOTGUN_FIRE);
|
GameServer()->CreateSound(m_Pos, SOUND_SHOTGUN_FIRE);
|
||||||
}
|
|
||||||
/*int ShotSpread = 2;
|
/*int ShotSpread = 2;
|
||||||
|
|
||||||
CMsgPacker Msg(NETMSGTYPE_SV_EXTRAPROJECTILE);
|
CMsgPacker Msg(NETMSGTYPE_SV_EXTRAPROJECTILE);
|
||||||
|
@ -395,8 +393,6 @@ void CCharacter::FireWeapon()
|
||||||
|
|
||||||
case WEAPON_GRENADE:
|
case WEAPON_GRENADE:
|
||||||
{
|
{
|
||||||
if (m_RaceState != RACE_PAUSE) {
|
|
||||||
|
|
||||||
CProjectile *Proj = new CProjectile(GameWorld(), WEAPON_GRENADE,
|
CProjectile *Proj = new CProjectile(GameWorld(), WEAPON_GRENADE,
|
||||||
m_pPlayer->GetCID(),
|
m_pPlayer->GetCID(),
|
||||||
ProjStartPos,
|
ProjStartPos,
|
||||||
|
@ -418,20 +414,16 @@ void CCharacter::FireWeapon()
|
||||||
Server()->SendMsg(&Msg, 0, m_pPlayer->GetCID());
|
Server()->SendMsg(&Msg, 0, m_pPlayer->GetCID());
|
||||||
|
|
||||||
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE);
|
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE);
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case WEAPON_RIFLE:
|
case WEAPON_RIFLE:
|
||||||
{
|
{
|
||||||
if (m_RaceState != RACE_PAUSE) {
|
|
||||||
new CLaser(GameWorld(), m_Pos, Direction, GameServer()->Tuning()->m_LaserReach, m_pPlayer->GetCID(), 0);
|
new CLaser(GameWorld(), m_Pos, Direction, GameServer()->Tuning()->m_LaserReach, m_pPlayer->GetCID(), 0);
|
||||||
//GameServer()->CreateSound(m_Pos, SOUND_RIFLE_FIRE);
|
//GameServer()->CreateSound(m_Pos, SOUND_RIFLE_FIRE);
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case WEAPON_NINJA:
|
case WEAPON_NINJA:
|
||||||
{
|
{
|
||||||
if (m_RaceState != RACE_PAUSE) {
|
|
||||||
// reset Hit objects
|
// reset Hit objects
|
||||||
m_NumObjectsHit = 0;
|
m_NumObjectsHit = 0;
|
||||||
|
|
||||||
|
@ -440,7 +432,6 @@ void CCharacter::FireWeapon()
|
||||||
//m_Ninja.m_CurrentMoveTime = g_pData->m_Weapons.m_Ninja.m_Movetime * Server()->TickSpeed() / 1000;
|
//m_Ninja.m_CurrentMoveTime = g_pData->m_Weapons.m_Ninja.m_Movetime * Server()->TickSpeed() / 1000;
|
||||||
m_Ninja.m_CurrentMoveTime = 10;
|
m_Ninja.m_CurrentMoveTime = 10;
|
||||||
//GameServer()->CreateSound(m_Pos, SOUND_NINJA_FIRE);
|
//GameServer()->CreateSound(m_Pos, SOUND_NINJA_FIRE);
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -559,14 +550,6 @@ void CCharacter::Tick()
|
||||||
int MapIndex = GameServer()->Collision()->GetMapIndex(m_PrevPos, m_Pos);
|
int MapIndex = GameServer()->Collision()->GetMapIndex(m_PrevPos, m_Pos);
|
||||||
int TileIndex1 = GameServer()->Collision()->GetCollisionDDRace(MapIndex);
|
int TileIndex1 = GameServer()->Collision()->GetCollisionDDRace(MapIndex);
|
||||||
int TileIndex2 = GameServer()->Collision()->GetFCollisionDDRace(MapIndex);
|
int TileIndex2 = GameServer()->Collision()->GetFCollisionDDRace(MapIndex);
|
||||||
if(m_RaceState == RACE_PAUSE) {
|
|
||||||
m_Input.m_Direction = 0;
|
|
||||||
m_Input.m_Jump = 0;
|
|
||||||
m_Input.m_Hook = 0;
|
|
||||||
m_Input.m_Fire = 0;
|
|
||||||
m_Core.m_Jumped = 0;
|
|
||||||
ResetPos();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(m_pPlayer->m_ForceBalanced)
|
if(m_pPlayer->m_ForceBalanced)
|
||||||
{
|
{
|
||||||
|
@ -602,6 +585,8 @@ void CCharacter::Tick()
|
||||||
m_Core.m_HookTick = 0;
|
m_Core.m_HookTick = 0;
|
||||||
if (m_Super && m_Core.m_Jumped > 1)
|
if (m_Super && m_Core.m_Jumped > 1)
|
||||||
m_Core.m_Jumped = 1;
|
m_Core.m_Jumped = 1;
|
||||||
|
if (m_Super && g_Config.m_SvEndlessSuperHook)
|
||||||
|
m_Core.m_HookTick = 0;
|
||||||
/*dbg_msg("character","TileIndex1=%d , TileIndex2=%d",TileIndex1,TileIndex2); //REMOVE*/
|
/*dbg_msg("character","TileIndex1=%d , TileIndex2=%d",TileIndex1,TileIndex2); //REMOVE*/
|
||||||
//DDRace
|
//DDRace
|
||||||
char aBuftime[128];
|
char aBuftime[128];
|
||||||
|
|
|
@ -18,8 +18,7 @@ enum
|
||||||
{
|
{
|
||||||
RACE_NONE = 0,
|
RACE_NONE = 0,
|
||||||
RACE_STARTED,
|
RACE_STARTED,
|
||||||
RACE_CHEAT, // no time and won't start again unless oredered by a mod or death
|
RACE_CHEAT // no time and won't start again unless ordered by a mod or death
|
||||||
RACE_PAUSE//No time nor movement
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCharacter : public CEntity
|
class CCharacter : public CEntity
|
||||||
|
|
|
@ -671,7 +671,10 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
|
||||||
//else if(chr->m_RaceState==RACE_PAUSE)
|
//else if(chr->m_RaceState==RACE_PAUSE)
|
||||||
// chr->m_RaceState = RACE_STARTED;*/
|
// chr->m_RaceState = RACE_STARTED;*/
|
||||||
}
|
}
|
||||||
} else if(!str_comp_nocase(pMsg->m_pMessage, "/info"))
|
else
|
||||||
|
SendChatTarget(ClientId, "The admin didn't activate /pause");
|
||||||
|
}
|
||||||
|
else if(!str_comp_nocase(pMsg->m_pMessage, "/info"))
|
||||||
{
|
{
|
||||||
SendChatTarget(ClientId, "DDRace Mod. Version: " DDRACE_VERSION);
|
SendChatTarget(ClientId, "DDRace Mod. Version: " DDRACE_VERSION);
|
||||||
SendChatTarget(ClientId, "Official site: DDRace.info");
|
SendChatTarget(ClientId, "Official site: DDRace.info");
|
||||||
|
|
Loading…
Reference in a new issue