Rename rifle to laser

This makes it easier to copy code from/to 0.7
23df3c609e
This commit is contained in:
ChillerDragon 2019-11-22 15:37:18 +01:00
parent f7b7c3afb0
commit 96c9b1ab73
63 changed files with 120 additions and 120 deletions

View file

@ -161,10 +161,10 @@ access_level logout 2
access_level ninja 2
access_level grenade 2
access_level shotgun 2
access_level rifle 2
access_level laser 2
access_level weapons 2
access_level unweapons 2
access_level unrifle 2
access_level unlaser 2
access_level unshotgun 2
access_level ungrenade 2
access_level unsolo 2

View file

@ -582,7 +582,7 @@ Max Screenshots
Length:
== Даўжыня
Rifle
Laser
== Бласцер
Netversion:

View file

@ -584,7 +584,7 @@ Max Screenshots
Length:
== Dužina:
Rifle
Laser
== Laser
Netversion:

View file

@ -599,8 +599,8 @@ Show quads
Map sound volume
== Volume do som de mapas
Rifle
== Rifle
Laser
== Laser
Join game
== Entrar no jogo

View file

@ -579,7 +579,7 @@ Max Screenshots
Length:
== Дължина:
Rifle
Laser
== Лазер
Netversion:

View file

@ -599,7 +599,7 @@ Max Screenshots
Length:
== Longitud:
Rifle
Laser
== Láser
Netversion:

View file

@ -615,7 +615,7 @@ Your skin
Reset to defaults
== Йĕркелӳ тасат
Rifle
Laser
== Бластер
Display Modes

View file

@ -585,7 +585,7 @@ Max Screenshots
Length:
== Délka:
Rifle
Laser
== Laser
Netversion:

View file

@ -582,7 +582,7 @@ Max Screenshots
Length:
== Længde
Rifle
Laser
== Laser
Netversion:

View file

@ -594,7 +594,7 @@ Max Screenshots
Length:
== Lengte:
Rifle
Laser
== Laser
Netversion:

View file

@ -583,7 +583,7 @@ Max Screenshots
Length:
== Pituus:
Rifle
Laser
== Kivääri
Netversion:

View file

@ -593,7 +593,7 @@ Max Screenshots
Length:
== Longueur :
Rifle
Laser
== Laser
Netversion:

View file

@ -602,7 +602,7 @@ Max Screenshots
Length:
== Länge:
Rifle
Laser
== Laser
Netversion:

View file

@ -591,7 +591,7 @@ Max Screenshots
Length:
== Διάρκεια:
Rifle
Laser
== Λέιζερ
Netversion:

View file

@ -563,7 +563,7 @@ Max Screenshots
Length:
== Hossza:
Rifle
Laser
== Lézer
Netversion:

View file

@ -586,7 +586,7 @@ Max Screenshots
Length:
== Durata:
Rifle
Laser
== Laser
Netversion:

View file

@ -615,7 +615,7 @@ Your skin
Reset to defaults
== 初期設定に戻す
Rifle
Laser
== ライフル
Display Modes

View file

@ -620,7 +620,7 @@ Hue
Reset to defaults
== 초기화
Rifle
Laser
== 레이저
Display Modes

View file

@ -447,7 +447,7 @@ Reset filter
Reset to defaults
== Жарыяланбаска түшүрүү
Rifle
Laser
== Бластер
Round

View file

@ -582,7 +582,7 @@ Max Screenshots
Length:
== Lengde
Rifle
Laser
== Laser
Netversion:

View file

@ -777,7 +777,7 @@ Length:
== : ﻝﻮﻃ
Rifle
Laser
== ﺭﺰﯿﻟ

View file

@ -606,7 +606,7 @@ Max Screenshots
Length:
== Długość:
Rifle
Laser
== Laser
Netversion:

View file

@ -604,7 +604,7 @@ Record demo
Length:
== Longitude:
Rifle
Laser
== Laser
Netversion:

View file

@ -597,7 +597,7 @@ Max Screenshots
Length:
== Durată:
Rifle
Laser
== Carabină
Netversion:

View file

@ -674,7 +674,7 @@ Max Screenshots
Length:
== Длина
Rifle
Laser
== Бластер
Netversion:

View file

@ -584,7 +584,7 @@ Max Screenshots
Length:
== Dužina:
Rifle
Laser
== Puška
Netversion:

View file

@ -651,7 +651,7 @@ Dummy settings
Length:
== 长度:
Rifle
Laser
== 激光枪
Netversion:

View file

@ -582,7 +582,7 @@ Max Screenshots
Length:
== Dĺžka:
Rifle
Laser
== Laser
Netversion:

View file

@ -595,7 +595,7 @@ Max Screenshots
Length:
== Longitud:
Rifle
Laser
== Láser
Netversion:

View file

@ -583,7 +583,7 @@ Max Screenshots
Length:
== Längd
Rifle
Laser
== Gevär
Netversion:

View file

@ -647,7 +647,7 @@ Dummy settings
Length:
== 長度:
Rifle
Laser
== 鐳射槍
Netversion:

View file

@ -582,7 +582,7 @@ Max Screenshots
Length:
== Uzunluk:
Rifle
Laser
== Lazer
Netversion:

View file

@ -411,7 +411,7 @@ Internet
News
== Новини
Rifle
Laser
== Лазер
Join game

View file

@ -129,9 +129,9 @@ class Weapon_Grenade(Struct):
self.speed = Float(1000)
self.lifetime = Float(2.0)
class Weapon_Rifle(Struct):
class Weapon_Laser(Struct):
def __init__(self):
Struct.__init__(self, "CDataWeaponspecRifle")
Struct.__init__(self, "CDataWeaponspecLaser")
self.base = Pointer(WeaponSpec, WeaponSpec())
self.reach = Float(800.0)
self.bounce_delay = Int(150)
@ -153,7 +153,7 @@ class Weapons(Struct):
self.gun = Weapon_Gun()
self.shotgun = Weapon_Shotgun()
self.grenade = Weapon_Grenade()
self.rifle = Weapon_Rifle()
self.laser = Weapon_Laser()
self.ninja = Weapon_Ninja()
self.id = Array(WeaponSpec())
@ -181,8 +181,8 @@ container.sounds.Add(SoundSet("hammer_hit", FileList("audio/wp_hammer_hit-%02d.w
container.sounds.Add(SoundSet("ninja_fire", FileList("audio/wp_ninja_attack-%02d.wv", 3)))
container.sounds.Add(SoundSet("grenade_explode", FileList("audio/wp_flump_explo-%02d.wv", 3)))
container.sounds.Add(SoundSet("ninja_hit", FileList("audio/wp_ninja_hit-%02d.wv", 3)))
container.sounds.Add(SoundSet("rifle_fire", FileList("audio/wp_rifle_fire-%02d.wv", 3)))
container.sounds.Add(SoundSet("rifle_bounce", FileList("audio/wp_rifle_bnce-%02d.wv", 3)))
container.sounds.Add(SoundSet("laser_fire", FileList("audio/wp_laser_fire-%02d.wv", 3)))
container.sounds.Add(SoundSet("laser_bounce", FileList("audio/wp_laser_bnce-%02d.wv", 3)))
container.sounds.Add(SoundSet("weapon_switch", FileList("audio/wp_switch-%02d.wv", 3)))
container.sounds.Add(SoundSet("player_pain_short", FileList("audio/vo_teefault_pain_short-%02d.wv", 12)))
@ -343,9 +343,9 @@ container.sprites.Add(Sprite("weapon_ninja_body", set_game, 2,10,8,2))
container.sprites.Add(Sprite("weapon_ninja_cursor", set_game, 0,10,2,2))
container.sprites.Add(Sprite("weapon_ninja_proj", set_game, 0,0,0,0))
container.sprites.Add(Sprite("weapon_rifle_body", set_game, 2,12,7,3))
container.sprites.Add(Sprite("weapon_rifle_cursor", set_game, 0,12,2,2))
container.sprites.Add(Sprite("weapon_rifle_proj", set_game, 10,12,2,2))
container.sprites.Add(Sprite("weapon_laser_body", set_game, 2,12,7,3))
container.sprites.Add(Sprite("weapon_laser_cursor", set_game, 0,12,2,2))
container.sprites.Add(Sprite("weapon_laser_proj", set_game, 10,12,2,2))
container.sprites.Add(Sprite("hook_chain", set_game, 2,0,1,1))
container.sprites.Add(Sprite("hook_head", set_game, 3,0,2,1))
@ -520,13 +520,13 @@ weapon.offsety.Set(-2)
container.weapons.grenade.base.Set(weapon)
container.weapons.id.Add(weapon)
weapon = WeaponSpec(container, "rifle")
weapon = WeaponSpec(container, "laser")
weapon.firedelay.Set(800)
weapon.visual_size.Set(92)
weapon.damage.Set(5)
weapon.offsetx.Set(24)
weapon.offsety.Set(-2)
container.weapons.rifle.base.Set(weapon)
container.weapons.laser.base.Set(weapon)
container.weapons.id.Add(weapon)
weapon = WeaponSpec(container, "ninja")

View file

@ -5,7 +5,7 @@ PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM"]
GameFlags = ["TEAMS", "FLAGS"]
GameStateFlags = ["GAMEOVER", "SUDDENDEATH", "PAUSED", "RACETIME"]
CharacterFlags = ["SOLO", "JETPACK", "NO_COLLISION", "ENDLESS_HOOK", "ENDLESS_JUMP", "SUPER",
"NO_HAMMER_HIT", "NO_SHOTGUN_HIT", "NO_GRENADE_HIT", "NO_RIFLE_HIT", "NO_HOOK",
"NO_HAMMER_HIT", "NO_SHOTGUN_HIT", "NO_GRENADE_HIT", "NO_LASER_HIT", "NO_HOOK",
"TELEGUN_GUN", "TELEGUN_GRENADE", "TELEGUN_LASER",
"WEAPON_HAMMER", "WEAPON_GUN", "WEAPON_SHOTGUN", "WEAPON_GRENADE", "WEAPON_LASER", "WEAPON_NINJA"]
GameInfoFlags = [

View file

@ -178,7 +178,7 @@ void CControls::OnConsoleInit()
{ static CInputSet s_Set = {this, &m_InputData[0].m_WantedWeapon, &m_InputData[1].m_WantedWeapon, 2}; Console()->Register("+weapon2", "", CFGFLAG_CLIENT, ConKeyInputSet, (void *)&s_Set, "Switch to gun"); }
{ static CInputSet s_Set = {this, &m_InputData[0].m_WantedWeapon, &m_InputData[1].m_WantedWeapon, 3}; Console()->Register("+weapon3", "", CFGFLAG_CLIENT, ConKeyInputSet, (void *)&s_Set, "Switch to shotgun"); }
{ static CInputSet s_Set = {this, &m_InputData[0].m_WantedWeapon, &m_InputData[1].m_WantedWeapon, 4}; Console()->Register("+weapon4", "", CFGFLAG_CLIENT, ConKeyInputSet, (void *)&s_Set, "Switch to grenade"); }
{ static CInputSet s_Set = {this, &m_InputData[0].m_WantedWeapon, &m_InputData[1].m_WantedWeapon, 5}; Console()->Register("+weapon5", "", CFGFLAG_CLIENT, ConKeyInputSet, (void *)&s_Set, "Switch to rifle"); }
{ static CInputSet s_Set = {this, &m_InputData[0].m_WantedWeapon, &m_InputData[1].m_WantedWeapon, 5}; Console()->Register("+weapon5", "", CFGFLAG_CLIENT, ConKeyInputSet, (void *)&s_Set, "Switch to laser"); }
{ static CInputSet s_Set = {this, &m_InputData[0].m_NextWeapon, &m_InputData[1].m_NextWeapon, 0}; Console()->Register("+nextweapon", "", CFGFLAG_CLIENT, ConKeyInputNextPrevWeapon, (void *)&s_Set, "Switch to next weapon"); }
{ static CInputSet s_Set = {this, &m_InputData[0].m_PrevWeapon, &m_InputData[1].m_PrevWeapon, 0}; Console()->Register("+prevweapon", "", CFGFLAG_CLIENT, ConKeyInputNextPrevWeapon, (void *)&s_Set, "Switch to previous weapon"); }
@ -457,7 +457,7 @@ void CControls::OnRender()
m_pClient->m_Snap.m_pLocalCharacter->m_Weapon != WEAPON_NINJA )
{
int w;
for( w = WEAPON_RIFLE; w > WEAPON_GUN; w-- )
for( w = WEAPON_LASER; w > WEAPON_GUN; w-- )
{
if( w == m_pClient->m_Snap.m_pLocalCharacter->m_Weapon )
continue;

View file

@ -695,7 +695,7 @@ static CKeyInfo gs_aKeys[] =
{ "Pistol", "+weapon2", 0, 0 },
{ "Shotgun", "+weapon3", 0, 0 },
{ "Grenade", "+weapon4", 0, 0 },
{ "Rifle", "+weapon5", 0, 0 },
{ "Laser", "+weapon5", 0, 0 },
{ "Next weapon", "+nextweapon", 0, 0 },
{ "Prev. weapon", "+prevweapon", 0, 0 },
@ -723,7 +723,7 @@ static CKeyInfo gs_aKeys[] =
/* This is for scripts/update_localization.py to work, don't remove!
Localize("Move left");Localize("Move right");Localize("Jump");Localize("Fire");Localize("Hook");Localize("Hammer");
Localize("Pistol");Localize("Shotgun");Localize("Grenade");Localize("Rifle");Localize("Next weapon");Localize("Prev. weapon");
Localize("Pistol");Localize("Shotgun");Localize("Grenade");Localize("Laser");Localize("Next weapon");Localize("Prev. weapon");
Localize("Vote yes");Localize("Vote no");Localize("Chat");Localize("Team chat");Localize("Show chat");Localize("Emoticon");
Localize("Spectator mode");Localize("Spectate next");Localize("Spectate previous");Localize("Console");Localize("Remote console");Localize("Screenshot");Localize("Scoreboard");Localize("Respawn");
*/
@ -1958,7 +1958,7 @@ void CMenus::RenderSettingsHUD(CUIRect MainView)
Graphics()->TextureSet(g_pData->m_aImages[IMAGE_GAME].m_Id);
Graphics()->QuadsBegin();
RenderTools()->SelectSprite(SPRITE_WEAPON_RIFLE_BODY);
RenderTools()->SelectSprite(SPRITE_WEAPON_LASER_BODY);
RenderTools()->DrawSprite(Weapon.x, Weapon.y + Weapon.h / 2.0f, 60.0f);
Graphics()->QuadsEnd();

View file

@ -480,7 +480,7 @@ void CStatboard::FormatStats()
}
char aPlayerStats[1024 * VANILLA_MAX_CLIENTS];
str_format(aPlayerStats, sizeof(aPlayerStats), "Local-player,Team,Name,Clan,Score,Frags,Deaths,Suicides,F/D-ratio,Net,FPM,Spree,Best,Hammer-F/D,Gun-F/D,Shotgun-F/D,Grenade-F/D,Rifle-F/D,Ninja-F/D,GameWithFlags,Flag-grabs,Flag-captures\n");
str_format(aPlayerStats, sizeof(aPlayerStats), "Local-player,Team,Name,Clan,Score,Frags,Deaths,Suicides,F/D-ratio,Net,FPM,Spree,Best,Hammer-F/D,Gun-F/D,Shotgun-F/D,Grenade-F/D,Laser-F/D,Ninja-F/D,GameWithFlags,Flag-grabs,Flag-captures\n");
for (int i = 0; i < NumPlayers; i++)
{
const CNetObj_PlayerInfo *pInfo = apPlayers[i];

View file

@ -833,7 +833,7 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker, bool IsDummy)
{
CNetMsg_Sv_KillMsg *pMsg = (CNetMsg_Sv_KillMsg *)pRawMsg;
// reset character prediction
if(!(m_GameWorld.m_WorldConfig.m_IsFNG && pMsg->m_Weapon == WEAPON_RIFLE))
if(!(m_GameWorld.m_WorldConfig.m_IsFNG && pMsg->m_Weapon == WEAPON_LASER))
{
m_CharOrder.GiveWeak(pMsg->m_Victim);
m_aLastWorldCharacters[pMsg->m_Victim].m_Alive = false;
@ -1248,7 +1248,7 @@ void CGameClient::OnNewSnapshot()
m_aClients[Item.m_ID].m_NoCollision = pCharacterData->m_Flags & CHARACTERFLAG_NO_COLLISION;
m_aClients[Item.m_ID].m_NoHammerHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_HAMMER_HIT;
m_aClients[Item.m_ID].m_NoGrenadeHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_GRENADE_HIT;
m_aClients[Item.m_ID].m_NoRifleHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_RIFLE_HIT;
m_aClients[Item.m_ID].m_NoLaserHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_LASER_HIT;
m_aClients[Item.m_ID].m_NoShotgunHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_SHOTGUN_HIT;
m_aClients[Item.m_ID].m_NoHookHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_HOOK;
m_aClients[Item.m_ID].m_Super = pCharacterData->m_Flags & CHARACTERFLAG_SUPER;
@ -1804,7 +1804,7 @@ void CGameClient::CClientData::Reset()
m_EndlessJump = false;
m_NoHammerHit = false;
m_NoGrenadeHit = false;
m_NoRifleHit = false;
m_NoLaserHit = false;
m_NoShotgunHit = false;
m_NoHookHit = false;
m_Super = false;

View file

@ -282,7 +282,7 @@ public:
bool m_EndlessJump;
bool m_NoHammerHit;
bool m_NoGrenadeHit;
bool m_NoRifleHit;
bool m_NoLaserHit;
bool m_NoShotgunHit;
bool m_NoHookHit;
bool m_Super;

View file

@ -55,7 +55,7 @@ void CCharacter::HandleJetpack()
vec2 Direction = normalize(vec2(m_LatestInput.m_TargetX, m_LatestInput.m_TargetY));
bool FullAuto = false;
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_RIFLE)
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_LASER)
FullAuto = true;
if (m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN)
FullAuto = true;
@ -265,7 +265,7 @@ void CCharacter::FireWeapon()
vec2 Direction = normalize(vec2(m_LatestInput.m_TargetX, m_LatestInput.m_TargetY));
bool FullAuto = false;
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_RIFLE)
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_LASER)
FullAuto = true;
if (m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN)
FullAuto = true;
@ -438,11 +438,11 @@ void CCharacter::FireWeapon()
);//SoundImpact
} break;
case WEAPON_RIFLE:
case WEAPON_LASER:
{
float LaserReach = GetTuning(m_TuneZone)->m_LaserReach;
new CLaser(GameWorld(), m_Pos, Direction, LaserReach, GetCID(), WEAPON_RIFLE);
new CLaser(GameWorld(), m_Pos, Direction, LaserReach, GetCID(), WEAPON_LASER);
} break;
case WEAPON_NINJA:
@ -1041,8 +1041,8 @@ void CCharacter::Read(CNetObj_Character *pChar, CNetObj_DDNetCharacter *pExtende
m_Hit |= DISABLE_HIT_GRENADE;
if(pExtended->m_Flags & CHARACTERFLAG_NO_HAMMER_HIT)
m_Hit |= DISABLE_HIT_HAMMER;
if(pExtended->m_Flags & CHARACTERFLAG_NO_RIFLE_HIT)
m_Hit |= DISABLE_HIT_RIFLE;
if(pExtended->m_Flags & CHARACTERFLAG_NO_LASER_HIT)
m_Hit |= DISABLE_HIT_LASER;
if(pExtended->m_Flags & CHARACTERFLAG_NO_SHOTGUN_HIT)
m_Hit |= DISABLE_HIT_SHOTGUN;
@ -1050,7 +1050,7 @@ void CCharacter::Read(CNetObj_Character *pChar, CNetObj_DDNetCharacter *pExtende
m_aWeapons[WEAPON_GUN].m_Got = (pExtended->m_Flags & CHARACTERFLAG_WEAPON_GUN) != 0;
m_aWeapons[WEAPON_SHOTGUN].m_Got = (pExtended->m_Flags & CHARACTERFLAG_WEAPON_SHOTGUN) != 0;
m_aWeapons[WEAPON_GRENADE].m_Got = (pExtended->m_Flags & CHARACTERFLAG_WEAPON_GRENADE) != 0;
m_aWeapons[WEAPON_RIFLE].m_Got = (pExtended->m_Flags & CHARACTERFLAG_WEAPON_LASER) != 0;
m_aWeapons[WEAPON_LASER].m_Got = (pExtended->m_Flags & CHARACTERFLAG_WEAPON_LASER) != 0;
const bool Ninja = (pExtended->m_Flags & CHARACTERFLAG_WEAPON_NINJA) != 0;
if(Ninja && m_Core.m_ActiveWeapon != WEAPON_NINJA)

View file

@ -85,7 +85,7 @@ public:
DISABLE_HIT_HAMMER=1,
DISABLE_HIT_SHOTGUN=2,
DISABLE_HIT_GRENADE=4,
DISABLE_HIT_RIFLE=8
DISABLE_HIT_LASER=8
};
int m_Hit;
int m_TuneZone;

View file

@ -32,12 +32,12 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
CCharacter *pHit;
bool pDontHitSelf = g_Config.m_SvOldLaser || (m_Bounces == 0 && !m_WasTele);
if(pOwnerChar ? (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_RIFLE) && m_Type == WEAPON_RIFLE) || (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN) && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
if(pOwnerChar ? (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_LASER) && m_Type == WEAPON_LASER) || (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN) && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
pHit = GameWorld()->IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner);
else
pHit = GameWorld()->IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner, pOwnerChar);
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_RIFLE && m_Type == WEAPON_RIFLE) || (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_LASER && m_Type == WEAPON_LASER) || (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
return false;
m_From = From;
m_Pos = At;
@ -54,7 +54,7 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
Temp = pHit->Core()->m_Vel + normalize(pOwnerChar->Core()->m_Pos - pHit->Core()->m_Pos) * Strength;
pHit->Core()->m_Vel = ClampVel(pHit->m_MoveRestrictions, Temp);
}
else if (m_Type == WEAPON_RIFLE)
else if (m_Type == WEAPON_LASER)
{
pHit->UnFreeze();
}
@ -169,7 +169,7 @@ CLaser::CLaser(CGameWorld *pGameWorld, int ID, CNetObj_Laser *pLaser)
m_Dir = normalize(m_Dir);
else
m_Energy = 0;
m_Type = WEAPON_RIFLE;
m_Type = WEAPON_LASER;
m_PrevPos = m_From;
m_ID = ID;
}

View file

@ -10,16 +10,16 @@ CONSOLE_COMMAND("kill_pl", "v[id]", CFGFLAG_SERVER, ConKillPlayer, this, "Kills
CONSOLE_COMMAND("totele", "i[number]", CFGFLAG_SERVER|CMDFLAG_TEST, ConToTeleporter, this, "Teleports you to teleporter v")
CONSOLE_COMMAND("totelecp", "i[number]", CFGFLAG_SERVER|CMDFLAG_TEST, ConToCheckTeleporter, this, "Teleports you to checkpoint teleporter v")
CONSOLE_COMMAND("tele", "?i[id] ?i[id]", CFGFLAG_SERVER|CMDFLAG_TEST, ConTeleport, this, "Teleports player i (or you) to player i (or you to where you look at)")
CONSOLE_COMMAND("addweapon", "i[weapon-id]", CFGFLAG_SERVER|CMDFLAG_TEST, ConAddWeapon, this, "Gives weapon with id i to you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, rifle = 4, ninja = 5)")
CONSOLE_COMMAND("removeweapon", "i[weapon-id]", CFGFLAG_SERVER|CMDFLAG_TEST, ConRemoveWeapon, this, "removes weapon with id i from you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, rifle = 4, ninja = 5)")
CONSOLE_COMMAND("addweapon", "i[weapon-id]", CFGFLAG_SERVER|CMDFLAG_TEST, ConAddWeapon, this, "Gives weapon with id i to you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, laser = 4, ninja = 5)")
CONSOLE_COMMAND("removeweapon", "i[weapon-id]", CFGFLAG_SERVER|CMDFLAG_TEST, ConRemoveWeapon, this, "removes weapon with id i from you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, laser = 4, ninja = 5)")
CONSOLE_COMMAND("shotgun", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConShotgun, this, "Gives a shotgun to you")
CONSOLE_COMMAND("grenade", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConGrenade, this, "Gives a grenade launcher to you")
CONSOLE_COMMAND("rifle", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConRifle, this, "Gives a rifle to you")
CONSOLE_COMMAND("laser", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConLaser, this, "Gives a laser to you")
CONSOLE_COMMAND("jetpack","", CFGFLAG_SERVER|CMDFLAG_TEST, ConJetpack, this, "Gives jetpack to you")
CONSOLE_COMMAND("weapons", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConWeapons, this, "Gives all weapons to you")
CONSOLE_COMMAND("unshotgun", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnShotgun, this, "Takes the shotgun from you")
CONSOLE_COMMAND("ungrenade", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnGrenade, this, "Takes the grenade launcher you")
CONSOLE_COMMAND("unrifle", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnRifle, this, "Takes the rifle from you")
CONSOLE_COMMAND("unlaser", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnLaser, this, "Takes the laser from you")
CONSOLE_COMMAND("unjetpack", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnJetpack, this, "Takes the jetpack from you")
CONSOLE_COMMAND("unweapons", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnWeapons, this, "Takes all weapons from you")
CONSOLE_COMMAND("ninja", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConNinja, this, "Makes you a ninja")

View file

@ -300,9 +300,9 @@ const char *CEditor::Explain(int Tile, int Layer)
if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH)
return "NINJA: Makes you invisible in the darkest nights.";
break;
case ENTITY_OFFSET + ENTITY_WEAPON_RIFLE:
case ENTITY_OFFSET + ENTITY_WEAPON_LASER:
if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH)
return "RIFLE: Unfreezes hit tee. Bounces off the walls. Also known as laser.";
return "LASER: Unfreezes hit tee. Bounces off the walls. Also known as laser.";
break;
case ENTITY_OFFSET + ENTITY_LASER_FAST_CCW:
if(Layer == LAYER_GAME || Layer == LAYER_FRONT || Layer == LAYER_SWITCH)

View file

@ -110,7 +110,7 @@ void CCharacterCore::Reset()
m_EndlessJump = false;
m_NoHammerHit = false;
m_NoGrenadeHit = false;
m_NoRifleHit = false;
m_NoLaserHit = false;
m_NoShotgunHit = false;
m_NoHookHit = false;
m_Super = false;
@ -562,7 +562,7 @@ void CCharacterCore::ReadDDNet(const CNetObj_DDNetCharacter *pObjDDNet)
m_NoCollision = pObjDDNet->m_Flags & CHARACTERFLAG_NO_COLLISION;
m_NoHammerHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_HAMMER_HIT;
m_NoGrenadeHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_GRENADE_HIT;
m_NoRifleHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_RIFLE_HIT;
m_NoLaserHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_LASER_HIT;
m_NoShotgunHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_SHOTGUN_HIT;
m_NoHookHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_HOOK;
m_Super = pObjDDNet->m_Flags & CHARACTERFLAG_SUPER;

View file

@ -247,7 +247,7 @@ public:
bool m_EndlessJump;
bool m_NoHammerHit;
bool m_NoGrenadeHit;
bool m_NoRifleHit;
bool m_NoLaserHit;
bool m_NoShotgunHit;
bool m_NoHookHit;
bool m_Super;

View file

@ -54,7 +54,7 @@ enum
ENTITY_WEAPON_SHOTGUN,
ENTITY_WEAPON_GRENADE,
ENTITY_POWERUP_NINJA,
ENTITY_WEAPON_RIFLE,
ENTITY_WEAPON_LASER,
//DDRace - Main Lasers
ENTITY_LASER_FAST_CCW,
ENTITY_LASER_NORMAL_CCW,

View file

@ -160,10 +160,10 @@ void CGameContext::ConGrenade(IConsole::IResult *pResult, void *pUserData)
pSelf->ModifyWeapons(pResult, pUserData, WEAPON_GRENADE, false);
}
void CGameContext::ConRifle(IConsole::IResult *pResult, void *pUserData)
void CGameContext::ConLaser(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *) pUserData;
pSelf->ModifyWeapons(pResult, pUserData, WEAPON_RIFLE, false);
pSelf->ModifyWeapons(pResult, pUserData, WEAPON_LASER, false);
}
void CGameContext::ConJetpack(IConsole::IResult *pResult, void *pUserData)
@ -192,10 +192,10 @@ void CGameContext::ConUnGrenade(IConsole::IResult *pResult, void *pUserData)
pSelf->ModifyWeapons(pResult, pUserData, WEAPON_GRENADE, true);
}
void CGameContext::ConUnRifle(IConsole::IResult *pResult, void *pUserData)
void CGameContext::ConUnLaser(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *) pUserData;
pSelf->ModifyWeapons(pResult, pUserData, WEAPON_RIFLE, true);
pSelf->ModifyWeapons(pResult, pUserData, WEAPON_LASER, true);
}
void CGameContext::ConUnJetpack(IConsole::IResult *pResult, void *pUserData)
@ -243,7 +243,7 @@ void CGameContext::ModifyWeapons(IConsole::IResult *pResult, void *pUserData,
{
pChr->GiveWeapon(WEAPON_SHOTGUN, Remove);
pChr->GiveWeapon(WEAPON_GRENADE, Remove);
pChr->GiveWeapon(WEAPON_RIFLE, Remove);
pChr->GiveWeapon(WEAPON_LASER, Remove);
}
else
{

View file

@ -136,7 +136,7 @@ void CCharacter::HandleJetpack()
vec2 Direction = normalize(vec2(m_LatestInput.m_TargetX, m_LatestInput.m_TargetY));
bool FullAuto = false;
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_RIFLE)
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_LASER)
FullAuto = true;
if (m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN)
FullAuto = true;
@ -339,7 +339,7 @@ void CCharacter::FireWeapon()
vec2 Direction = normalize(vec2(m_LatestInput.m_TargetX, m_LatestInput.m_TargetY));
bool FullAuto = false;
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_RIFLE)
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_LASER)
FullAuto = true;
if(m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN)
FullAuto = true;
@ -558,7 +558,7 @@ void CCharacter::FireWeapon()
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_FIRE, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
} break;
case WEAPON_RIFLE:
case WEAPON_LASER:
{
float LaserReach;
if (!m_TuneZone)
@ -566,8 +566,8 @@ void CCharacter::FireWeapon()
else
LaserReach = GameServer()->TuningList()[m_TuneZone].m_LaserReach;
new CLaser(GameWorld(), m_Pos, Direction, LaserReach, m_pPlayer->GetCID(), WEAPON_RIFLE);
GameServer()->CreateSound(m_Pos, SOUND_RIFLE_FIRE, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
new CLaser(GameWorld(), m_Pos, Direction, LaserReach, m_pPlayer->GetCID(), WEAPON_LASER);
GameServer()->CreateSound(m_Pos, SOUND_LASER_FIRE, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
} break;
case WEAPON_NINJA:
@ -1173,8 +1173,8 @@ void CCharacter::Snap(int SnappingClient)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_GRENADE_HIT;
if(m_Hit&DISABLE_HIT_HAMMER)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_HAMMER_HIT;
if(m_Hit&DISABLE_HIT_RIFLE)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_RIFLE_HIT;
if(m_Hit&DISABLE_HIT_LASER)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_LASER_HIT;
if(m_Hit&DISABLE_HIT_SHOTGUN)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_SHOTGUN_HIT;
if(m_Core.m_HasTelegunGun)
@ -1191,7 +1191,7 @@ void CCharacter::Snap(int SnappingClient)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_SHOTGUN;
if(m_aWeapons[WEAPON_GRENADE].m_Got)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_GRENADE;
if(m_aWeapons[WEAPON_RIFLE].m_Got)
if(m_aWeapons[WEAPON_LASER].m_Got)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_LASER;
if(m_Core.m_ActiveWeapon == WEAPON_NINJA)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_NINJA;
@ -1501,14 +1501,14 @@ void CCharacter::HandleTiles(int Index)
}
// hit others
if(((m_TileIndex == TILE_HIT_END) || (m_TileFIndex == TILE_HIT_END)) && m_Hit != (DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_RIFLE|DISABLE_HIT_SHOTGUN))
if(((m_TileIndex == TILE_HIT_END) || (m_TileFIndex == TILE_HIT_END)) && m_Hit != (DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_LASER|DISABLE_HIT_SHOTGUN))
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hit others");
m_Hit = DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_RIFLE|DISABLE_HIT_SHOTGUN;
m_Hit = DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_LASER|DISABLE_HIT_SHOTGUN;
m_Core.m_NoShotgunHit = true;
m_Core.m_NoGrenadeHit = true;
m_Core.m_NoHammerHit = true;
m_Core.m_NoRifleHit = true;
m_Core.m_NoLaserHit = true;
m_NeededFaketuning |= FAKETUNE_NOHAMMER;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
@ -1519,7 +1519,7 @@ void CCharacter::HandleTiles(int Index)
m_Core.m_NoShotgunHit = false;
m_Core.m_NoGrenadeHit = false;
m_Core.m_NoHammerHit = false;
m_Core.m_NoRifleHit = false;
m_Core.m_NoLaserHit = false;
m_NeededFaketuning &= ~FAKETUNE_NOHAMMER;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
@ -1765,17 +1765,17 @@ void CCharacter::HandleTiles(int Index)
m_Hit |= DISABLE_HIT_GRENADE;
m_Core.m_NoGrenadeHit = true;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_START && m_Hit&DISABLE_HIT_RIFLE && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_RIFLE)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_START && m_Hit&DISABLE_HIT_LASER && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can shoot others with rifle");
m_Hit &= ~DISABLE_HIT_RIFLE;
m_Core.m_NoRifleHit = false;
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can shoot others with laser");
m_Hit &= ~DISABLE_HIT_LASER;
m_Core.m_NoLaserHit = false;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_END && !(m_Hit&DISABLE_HIT_RIFLE) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_RIFLE)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_END && !(m_Hit&DISABLE_HIT_LASER) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't shoot others with rifle");
m_Hit |= DISABLE_HIT_RIFLE;
m_Core.m_NoRifleHit = true;
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't shoot others with laser");
m_Hit |= DISABLE_HIT_LASER;
m_Core.m_NoLaserHit = true;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_JUMP)
{
@ -2273,7 +2273,7 @@ void CCharacter::DDRaceInit()
m_Core.m_Id = GetPlayer()->GetCID();
m_TeleCheckpoint = 0;
m_EndlessHook = g_Config.m_SvEndlessDrag;
m_Hit = g_Config.m_SvHit ? HIT_ALL : DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_RIFLE|DISABLE_HIT_SHOTGUN;
m_Hit = g_Config.m_SvHit ? HIT_ALL : DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_LASER|DISABLE_HIT_SHOTGUN;
m_SuperJump = false;
m_Jetpack = false;
m_Core.m_Jumps = 2;

View file

@ -203,7 +203,7 @@ public:
DISABLE_HIT_HAMMER=1,
DISABLE_HIT_SHOTGUN=2,
DISABLE_HIT_GRENADE=4,
DISABLE_HIT_RIFLE=8
DISABLE_HIT_LASER=8
};
int m_Hit;
int m_TuneZone;

View file

@ -36,12 +36,12 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
CCharacter *pHit;
bool pDontHitSelf = g_Config.m_SvOldLaser || (m_Bounces == 0 && !m_WasTele);
if(pOwnerChar ? (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_RIFLE) && m_Type == WEAPON_RIFLE) || (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN) && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
if(pOwnerChar ? (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_LASER) && m_Type == WEAPON_LASER) || (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN) && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner);
else
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner, pOwnerChar);
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_RIFLE && m_Type == WEAPON_RIFLE) || (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_LASER && m_Type == WEAPON_LASER) || (pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_SHOTGUN && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
return false;
m_From = From;
m_Pos = At;
@ -64,7 +64,7 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
Temp = pHit->Core()->m_Vel;
pHit->Core()->m_Vel = ClampVel(pHit->m_MoveRestrictions, Temp);
}
else if (m_Type == WEAPON_RIFLE)
else if (m_Type == WEAPON_LASER)
{
pHit->UnFreeze();
}
@ -146,7 +146,7 @@ void CLaser::DoBounce()
if(m_Bounces > BounceNum)
m_Energy = -1;
GameServer()->CreateSound(m_Pos, SOUND_RIFLE_BOUNCE, m_TeamMask);
GameServer()->CreateSound(m_Pos, SOUND_LASER_BOUNCE, m_TeamMask);
}
}
else
@ -161,7 +161,7 @@ void CLaser::DoBounce()
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
if (m_Owner >= 0 && m_Energy <= 0 && m_Pos && !m_TeleportCancelled && pOwnerChar &&
pOwnerChar->IsAlive() && pOwnerChar->HasTelegunLaser() && m_Type == WEAPON_RIFLE)
pOwnerChar->IsAlive() && pOwnerChar->HasTelegunLaser() && m_Type == WEAPON_LASER)
{
vec2 PossiblePos;
bool Found = false;
@ -170,7 +170,7 @@ void CLaser::DoBounce()
bool pDontHitSelf = g_Config.m_SvOldLaser || (m_Bounces == 0 && !m_WasTele);
vec2 At;
CCharacter *pHit;
if (pOwnerChar ? (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_RIFLE) && m_Type == WEAPON_RIFLE) : g_Config.m_SvHit)
if (pOwnerChar ? (!(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_LASER) && m_Type == WEAPON_LASER) : g_Config.m_SvHit)
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner);
else
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner, pOwnerChar);
@ -202,7 +202,7 @@ void CLaser::DoBounce()
// Delay = 0 means all.
int delay = GameServer()->Collision()->GetSwitchDelay(MapIndex);
if((delay != 3 && delay != 0) && m_Type == WEAPON_RIFLE) {
if((delay != 3 && delay != 0) && m_Type == WEAPON_LASER) {
IsSwitchTeleGun = IsBlueSwitchTeleGun = false;
}
}
@ -212,7 +212,7 @@ void CLaser::DoBounce()
// Teleport is canceled if the last bounce tile is not a TILE_ALLOW_TELE_GUN.
// Teleport also works if laser didn't bounce.
m_TeleportCancelled =
m_Type == WEAPON_RIFLE
m_Type == WEAPON_LASER
&& (TileFIndex != TILE_ALLOW_TELE_GUN
&& TileFIndex != TILE_ALLOW_BLUE_TELE_GUN
&& !IsSwitchTeleGun

View file

@ -100,7 +100,7 @@ void CPickup::Tick()
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_GRENADE, pChr->Teams()->TeamMask(pChr->Team()));
else if (m_Subtype == WEAPON_SHOTGUN)
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_SHOTGUN, pChr->Teams()->TeamMask(pChr->Team()));
else if (m_Subtype == WEAPON_RIFLE)
else if (m_Subtype == WEAPON_LASER)
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_SHOTGUN, pChr->Teams()->TeamMask(pChr->Team()));
if (pChr->GetPlayer())

View file

@ -191,7 +191,7 @@ void CProjectile::Tick()
IsSwitchTeleGun = IsBlueSwitchTeleGun = false;
if(delay == 2 && m_Type != WEAPON_GRENADE)
IsSwitchTeleGun = IsBlueSwitchTeleGun = false;
if(delay == 3 && m_Type != WEAPON_RIFLE)
if(delay == 3 && m_Type != WEAPON_LASER)
IsSwitchTeleGun = IsBlueSwitchTeleGun = false;
}

View file

@ -277,12 +277,12 @@ private:
static void ConSuper(IConsole::IResult *pResult, void *pUserData);
static void ConShotgun(IConsole::IResult *pResult, void *pUserData);
static void ConGrenade(IConsole::IResult *pResult, void *pUserData);
static void ConRifle(IConsole::IResult *pResult, void *pUserData);
static void ConLaser(IConsole::IResult *pResult, void *pUserData);
static void ConJetpack(IConsole::IResult *pResult, void *pUserData);
static void ConWeapons(IConsole::IResult *pResult, void *pUserData);
static void ConUnShotgun(IConsole::IResult *pResult, void *pUserData);
static void ConUnGrenade(IConsole::IResult *pResult, void *pUserData);
static void ConUnRifle(IConsole::IResult *pResult, void *pUserData);
static void ConUnLaser(IConsole::IResult *pResult, void *pUserData);
static void ConUnJetpack(IConsole::IResult *pResult, void *pUserData);
static void ConUnWeapons(IConsole::IResult *pResult, void *pUserData);
static void ConAddWeapon(IConsole::IResult *pResult, void *pUserData);

View file

@ -236,10 +236,10 @@ bool IGameController::OnEntity(int Index, vec2 Pos, int Layer, int Flags, int Nu
Type = POWERUP_WEAPON;
SubType = WEAPON_GRENADE;
}
else if(Index == ENTITY_WEAPON_RIFLE)
else if(Index == ENTITY_WEAPON_LASER)
{
Type = POWERUP_WEAPON;
SubType = WEAPON_RIFLE;
SubType = WEAPON_LASER;
}
else if(Index == ENTITY_POWERUP_NINJA)
{

View file

@ -56,5 +56,5 @@ MACRO_TUNING_PARAM(HammerFireDelay, hammer_fire_delay, 125, "Delay of hammering"
MACRO_TUNING_PARAM(GunFireDelay, gun_fire_delay, 125, "Delay of firing gun" )
MACRO_TUNING_PARAM(ShotgunFireDelay, shotgun_fire_delay, 500, "Delay of firing shotgun")
MACRO_TUNING_PARAM(GrenadeFireDelay, grenade_fire_delay, 500, "Delay of firing grenade")
MACRO_TUNING_PARAM(LaserFireDelay, laser_fire_delay, 800, "Delay of firing laser rifle")
MACRO_TUNING_PARAM(LaserFireDelay, laser_fire_delay, 800, "Delay of firing laser laser")
MACRO_TUNING_PARAM(NinjaFireDelay, ninja_fire_delay, 800, "Delay of firing ninja")