Added option to make super hook endless

removed RACE_PAUSE

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
GreYFoXGTi 2010-08-23 01:40:05 +02:00
parent 3cb59795a6
commit 76c6bc7e2f
4 changed files with 9 additions and 21 deletions

View file

@ -8,6 +8,7 @@
//===============================
/* 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_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(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")

View file

@ -292,7 +292,7 @@ void CCharacter::FireWeapon()
m_NumObjectsHit = 0;
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];
int Hits = 0;
@ -357,10 +357,8 @@ void CCharacter::FireWeapon()
case WEAPON_SHOTGUN:
{
if(m_RaceState != RACE_PAUSE) {
new CLaser(&GameServer()->m_World, m_Pos, Direction, GameServer()->Tuning()->m_LaserReach, m_pPlayer->GetCID(), 1);
GameServer()->CreateSound(m_Pos, SOUND_SHOTGUN_FIRE);
}
/*int ShotSpread = 2;
CMsgPacker Msg(NETMSGTYPE_SV_EXTRAPROJECTILE);
@ -395,8 +393,6 @@ void CCharacter::FireWeapon()
case WEAPON_GRENADE:
{
if (m_RaceState != RACE_PAUSE) {
CProjectile *Proj = new CProjectile(GameWorld(), WEAPON_GRENADE,
m_pPlayer->GetCID(),
ProjStartPos,
@ -418,20 +414,16 @@ void CCharacter::FireWeapon()
Server()->SendMsg(&Msg, 0, m_pPlayer->GetCID());
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE);
}
} break;
case WEAPON_RIFLE:
{
if (m_RaceState != RACE_PAUSE) {
new CLaser(GameWorld(), m_Pos, Direction, GameServer()->Tuning()->m_LaserReach, m_pPlayer->GetCID(), 0);
//GameServer()->CreateSound(m_Pos, SOUND_RIFLE_FIRE);
}
} break;
case WEAPON_NINJA:
{
if (m_RaceState != RACE_PAUSE) {
// reset Hit objects
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 = 10;
//GameServer()->CreateSound(m_Pos, SOUND_NINJA_FIRE);
}
} break;
}
@ -559,14 +550,6 @@ void CCharacter::Tick()
int MapIndex = GameServer()->Collision()->GetMapIndex(m_PrevPos, m_Pos);
int TileIndex1 = GameServer()->Collision()->GetCollisionDDRace(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)
{
@ -602,6 +585,8 @@ void CCharacter::Tick()
m_Core.m_HookTick = 0;
if (m_Super && 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*/
//DDRace
char aBuftime[128];

View file

@ -18,8 +18,7 @@ enum
{
RACE_NONE = 0,
RACE_STARTED,
RACE_CHEAT, // no time and won't start again unless oredered by a mod or death
RACE_PAUSE//No time nor movement
RACE_CHEAT // no time and won't start again unless ordered by a mod or death
};
class CCharacter : public CEntity

View file

@ -671,7 +671,10 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
//else if(chr->m_RaceState==RACE_PAUSE)
// 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, "Official site: DDRace.info");