From 96c9b1ab732fb7fa605a10c091677c3201e61d2e Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Fri, 22 Nov 2019 15:37:18 +0100 Subject: [PATCH] Rename rifle to laser This makes it easier to copy code from/to 0.7 https://github.com/teeworlds/teeworlds/commit/23df3c609eebda63bbf219ddcf989e9a63a2a49d --- autoexec_server.cfg | 4 +- ...p_rifle_bnce-01.wv => wp_laser_bnce-01.wv} | Bin ...p_rifle_bnce-02.wv => wp_laser_bnce-02.wv} | Bin ...p_rifle_bnce-03.wv => wp_laser_bnce-03.wv} | Bin ...p_rifle_fire-01.wv => wp_laser_fire-01.wv} | Bin ...p_rifle_fire-02.wv => wp_laser_fire-02.wv} | Bin ...p_rifle_fire-03.wv => wp_laser_fire-03.wv} | Bin data/languages/belarusian.txt | 2 +- data/languages/bosnian.txt | 2 +- data/languages/brazilian_portuguese.txt | 4 +- data/languages/bulgarian.txt | 2 +- data/languages/catalan.txt | 2 +- data/languages/chuvash.txt | 2 +- data/languages/czech.txt | 2 +- data/languages/danish.txt | 2 +- data/languages/dutch.txt | 2 +- data/languages/finnish.txt | 2 +- data/languages/french.txt | 2 +- data/languages/german.txt | 2 +- data/languages/greek.txt | 2 +- data/languages/hungarian.txt | 2 +- data/languages/italian.txt | 2 +- data/languages/japanese.txt | 2 +- data/languages/korean.txt | 2 +- data/languages/kyrgyz.txt | 2 +- data/languages/norwegian.txt | 2 +- data/languages/persian.txt | 2 +- data/languages/polish.txt | 2 +- data/languages/portuguese.txt | 2 +- data/languages/romanian.txt | 2 +- data/languages/russian.txt | 2 +- data/languages/serbian.txt | 2 +- data/languages/simplified_chinese.txt | 2 +- data/languages/slovak.txt | 2 +- data/languages/spanish.txt | 2 +- data/languages/swedish.txt | 2 +- data/languages/traditional_chinese.txt | 2 +- data/languages/turkish.txt | 2 +- data/languages/ukrainian.txt | 2 +- datasrc/content.py | 20 ++++----- datasrc/network.py | 2 +- src/game/client/components/controls.cpp | 4 +- src/game/client/components/menus_settings.cpp | 6 +-- src/game/client/components/statboard.cpp | 2 +- src/game/client/gameclient.cpp | 6 +-- src/game/client/gameclient.h | 2 +- .../client/prediction/entities/character.cpp | 14 +++--- .../client/prediction/entities/character.h | 2 +- src/game/client/prediction/entities/laser.cpp | 8 ++-- src/game/ddracecommands.h | 8 ++-- src/game/editor/explanations.cpp | 4 +- src/game/gamecore.cpp | 4 +- src/game/gamecore.h | 2 +- src/game/mapitems.h | 2 +- src/game/server/ddracecommands.cpp | 10 ++--- src/game/server/entities/character.cpp | 42 +++++++++--------- src/game/server/entities/character.h | 2 +- src/game/server/entities/laser.cpp | 16 +++---- src/game/server/entities/pickup.cpp | 2 +- src/game/server/entities/projectile.cpp | 2 +- src/game/server/gamecontext.h | 4 +- src/game/server/gamecontroller.cpp | 4 +- src/game/tuning.h | 2 +- 63 files changed, 120 insertions(+), 120 deletions(-) rename data/audio/{wp_rifle_bnce-01.wv => wp_laser_bnce-01.wv} (100%) rename data/audio/{wp_rifle_bnce-02.wv => wp_laser_bnce-02.wv} (100%) rename data/audio/{wp_rifle_bnce-03.wv => wp_laser_bnce-03.wv} (100%) rename data/audio/{wp_rifle_fire-01.wv => wp_laser_fire-01.wv} (100%) rename data/audio/{wp_rifle_fire-02.wv => wp_laser_fire-02.wv} (100%) rename data/audio/{wp_rifle_fire-03.wv => wp_laser_fire-03.wv} (100%) diff --git a/autoexec_server.cfg b/autoexec_server.cfg index 2f9a51e3b..45c61b52f 100644 --- a/autoexec_server.cfg +++ b/autoexec_server.cfg @@ -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 diff --git a/data/audio/wp_rifle_bnce-01.wv b/data/audio/wp_laser_bnce-01.wv similarity index 100% rename from data/audio/wp_rifle_bnce-01.wv rename to data/audio/wp_laser_bnce-01.wv diff --git a/data/audio/wp_rifle_bnce-02.wv b/data/audio/wp_laser_bnce-02.wv similarity index 100% rename from data/audio/wp_rifle_bnce-02.wv rename to data/audio/wp_laser_bnce-02.wv diff --git a/data/audio/wp_rifle_bnce-03.wv b/data/audio/wp_laser_bnce-03.wv similarity index 100% rename from data/audio/wp_rifle_bnce-03.wv rename to data/audio/wp_laser_bnce-03.wv diff --git a/data/audio/wp_rifle_fire-01.wv b/data/audio/wp_laser_fire-01.wv similarity index 100% rename from data/audio/wp_rifle_fire-01.wv rename to data/audio/wp_laser_fire-01.wv diff --git a/data/audio/wp_rifle_fire-02.wv b/data/audio/wp_laser_fire-02.wv similarity index 100% rename from data/audio/wp_rifle_fire-02.wv rename to data/audio/wp_laser_fire-02.wv diff --git a/data/audio/wp_rifle_fire-03.wv b/data/audio/wp_laser_fire-03.wv similarity index 100% rename from data/audio/wp_rifle_fire-03.wv rename to data/audio/wp_laser_fire-03.wv diff --git a/data/languages/belarusian.txt b/data/languages/belarusian.txt index 10943c647..8a26cb77b 100644 --- a/data/languages/belarusian.txt +++ b/data/languages/belarusian.txt @@ -582,7 +582,7 @@ Max Screenshots Length: == Даўжыня -Rifle +Laser == Бласцер Netversion: diff --git a/data/languages/bosnian.txt b/data/languages/bosnian.txt index 347f273ab..a0ca22d09 100644 --- a/data/languages/bosnian.txt +++ b/data/languages/bosnian.txt @@ -584,7 +584,7 @@ Max Screenshots Length: == Dužina: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/brazilian_portuguese.txt b/data/languages/brazilian_portuguese.txt index 7611e7e2a..75783c36f 100644 --- a/data/languages/brazilian_portuguese.txt +++ b/data/languages/brazilian_portuguese.txt @@ -599,8 +599,8 @@ Show quads Map sound volume == Volume do som de mapas -Rifle -== Rifle +Laser +== Laser Join game == Entrar no jogo diff --git a/data/languages/bulgarian.txt b/data/languages/bulgarian.txt index 182f1ed83..3c257f722 100644 --- a/data/languages/bulgarian.txt +++ b/data/languages/bulgarian.txt @@ -579,7 +579,7 @@ Max Screenshots Length: == Дължина: -Rifle +Laser == Лазер Netversion: diff --git a/data/languages/catalan.txt b/data/languages/catalan.txt index fc4015d93..f07ff0fb2 100644 --- a/data/languages/catalan.txt +++ b/data/languages/catalan.txt @@ -599,7 +599,7 @@ Max Screenshots Length: == Longitud: -Rifle +Laser == Láser Netversion: diff --git a/data/languages/chuvash.txt b/data/languages/chuvash.txt index 895b7b315..f1324f1e2 100644 --- a/data/languages/chuvash.txt +++ b/data/languages/chuvash.txt @@ -615,7 +615,7 @@ Your skin Reset to defaults == Йĕркелӳ тасат -Rifle +Laser == Бластер Display Modes diff --git a/data/languages/czech.txt b/data/languages/czech.txt index 1ee73091d..119faa817 100644 --- a/data/languages/czech.txt +++ b/data/languages/czech.txt @@ -585,7 +585,7 @@ Max Screenshots Length: == Délka: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/danish.txt b/data/languages/danish.txt index 2dd2a76ec..c62bd983f 100644 --- a/data/languages/danish.txt +++ b/data/languages/danish.txt @@ -582,7 +582,7 @@ Max Screenshots Length: == Længde -Rifle +Laser == Laser Netversion: diff --git a/data/languages/dutch.txt b/data/languages/dutch.txt index bcdd4e151..1464fe017 100644 --- a/data/languages/dutch.txt +++ b/data/languages/dutch.txt @@ -594,7 +594,7 @@ Max Screenshots Length: == Lengte: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/finnish.txt b/data/languages/finnish.txt index 9912dfd82..d5b5eec4b 100644 --- a/data/languages/finnish.txt +++ b/data/languages/finnish.txt @@ -583,7 +583,7 @@ Max Screenshots Length: == Pituus: -Rifle +Laser == Kivääri Netversion: diff --git a/data/languages/french.txt b/data/languages/french.txt index 0e695e0b9..f325e3572 100644 --- a/data/languages/french.txt +++ b/data/languages/french.txt @@ -593,7 +593,7 @@ Max Screenshots Length: == Longueur : -Rifle +Laser == Laser Netversion: diff --git a/data/languages/german.txt b/data/languages/german.txt index 3cdc37536..c143877de 100644 --- a/data/languages/german.txt +++ b/data/languages/german.txt @@ -602,7 +602,7 @@ Max Screenshots Length: == Länge: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/greek.txt b/data/languages/greek.txt index c147fb0af..fc3beef03 100644 --- a/data/languages/greek.txt +++ b/data/languages/greek.txt @@ -591,7 +591,7 @@ Max Screenshots Length: == Διάρκεια: -Rifle +Laser == Λέιζερ Netversion: diff --git a/data/languages/hungarian.txt b/data/languages/hungarian.txt index 94d72f426..f973bdcf0 100644 --- a/data/languages/hungarian.txt +++ b/data/languages/hungarian.txt @@ -563,7 +563,7 @@ Max Screenshots Length: == Hossza: -Rifle +Laser == Lézer Netversion: diff --git a/data/languages/italian.txt b/data/languages/italian.txt index 4d91463ab..2966a4b44 100644 --- a/data/languages/italian.txt +++ b/data/languages/italian.txt @@ -586,7 +586,7 @@ Max Screenshots Length: == Durata: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/japanese.txt b/data/languages/japanese.txt index f566e2058..7fb41f3c8 100644 --- a/data/languages/japanese.txt +++ b/data/languages/japanese.txt @@ -615,7 +615,7 @@ Your skin Reset to defaults == 初期設定に戻す -Rifle +Laser == ライフル Display Modes diff --git a/data/languages/korean.txt b/data/languages/korean.txt index ab76c3d7a..42e114c38 100644 --- a/data/languages/korean.txt +++ b/data/languages/korean.txt @@ -620,7 +620,7 @@ Hue Reset to defaults == 초기화 -Rifle +Laser == 레이저 Display Modes diff --git a/data/languages/kyrgyz.txt b/data/languages/kyrgyz.txt index ee8f6cc23..c3b7d20e6 100644 --- a/data/languages/kyrgyz.txt +++ b/data/languages/kyrgyz.txt @@ -447,7 +447,7 @@ Reset filter Reset to defaults == Жарыяланбаска түшүрүү -Rifle +Laser == Бластер Round diff --git a/data/languages/norwegian.txt b/data/languages/norwegian.txt index 88f06606f..59c89d2c6 100644 --- a/data/languages/norwegian.txt +++ b/data/languages/norwegian.txt @@ -582,7 +582,7 @@ Max Screenshots Length: == Lengde -Rifle +Laser == Laser Netversion: diff --git a/data/languages/persian.txt b/data/languages/persian.txt index 9273a50da..4b84f2dca 100644 --- a/data/languages/persian.txt +++ b/data/languages/persian.txt @@ -777,7 +777,7 @@ Length: == : ﻝﻮﻃ -Rifle +Laser == ﺭﺰﯿﻟ diff --git a/data/languages/polish.txt b/data/languages/polish.txt index 91ba0a7b1..a78f77bb0 100644 --- a/data/languages/polish.txt +++ b/data/languages/polish.txt @@ -606,7 +606,7 @@ Max Screenshots Length: == Długość: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/portuguese.txt b/data/languages/portuguese.txt index a85cc1df3..143e7b3a5 100644 --- a/data/languages/portuguese.txt +++ b/data/languages/portuguese.txt @@ -604,7 +604,7 @@ Record demo Length: == Longitude: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/romanian.txt b/data/languages/romanian.txt index 4d2d2a793..1fecf7198 100644 --- a/data/languages/romanian.txt +++ b/data/languages/romanian.txt @@ -597,7 +597,7 @@ Max Screenshots Length: == Durată: -Rifle +Laser == Carabină Netversion: diff --git a/data/languages/russian.txt b/data/languages/russian.txt index 0a87bf898..1f38d8ca2 100644 --- a/data/languages/russian.txt +++ b/data/languages/russian.txt @@ -674,7 +674,7 @@ Max Screenshots Length: == Длина -Rifle +Laser == Бластер Netversion: diff --git a/data/languages/serbian.txt b/data/languages/serbian.txt index 526a6fcf3..f70df442a 100644 --- a/data/languages/serbian.txt +++ b/data/languages/serbian.txt @@ -584,7 +584,7 @@ Max Screenshots Length: == Dužina: -Rifle +Laser == Puška Netversion: diff --git a/data/languages/simplified_chinese.txt b/data/languages/simplified_chinese.txt index 22048356f..126a7c091 100644 --- a/data/languages/simplified_chinese.txt +++ b/data/languages/simplified_chinese.txt @@ -651,7 +651,7 @@ Dummy settings Length: == 长度: -Rifle +Laser == 激光枪 Netversion: diff --git a/data/languages/slovak.txt b/data/languages/slovak.txt index 6f944ad35..b2cb42e9a 100644 --- a/data/languages/slovak.txt +++ b/data/languages/slovak.txt @@ -582,7 +582,7 @@ Max Screenshots Length: == Dĺžka: -Rifle +Laser == Laser Netversion: diff --git a/data/languages/spanish.txt b/data/languages/spanish.txt index cf271e991..3b7df17ed 100644 --- a/data/languages/spanish.txt +++ b/data/languages/spanish.txt @@ -595,7 +595,7 @@ Max Screenshots Length: == Longitud: -Rifle +Laser == Láser Netversion: diff --git a/data/languages/swedish.txt b/data/languages/swedish.txt index 2b0730bf1..830e816b6 100644 --- a/data/languages/swedish.txt +++ b/data/languages/swedish.txt @@ -583,7 +583,7 @@ Max Screenshots Length: == Längd -Rifle +Laser == Gevär Netversion: diff --git a/data/languages/traditional_chinese.txt b/data/languages/traditional_chinese.txt index dc1716f95..476ddfe11 100644 --- a/data/languages/traditional_chinese.txt +++ b/data/languages/traditional_chinese.txt @@ -647,7 +647,7 @@ Dummy settings Length: == 長度: -Rifle +Laser == 鐳射槍 Netversion: diff --git a/data/languages/turkish.txt b/data/languages/turkish.txt index 2e2101edb..daded7973 100644 --- a/data/languages/turkish.txt +++ b/data/languages/turkish.txt @@ -582,7 +582,7 @@ Max Screenshots Length: == Uzunluk: -Rifle +Laser == Lazer Netversion: diff --git a/data/languages/ukrainian.txt b/data/languages/ukrainian.txt index 2551aac8e..304cea7c8 100644 --- a/data/languages/ukrainian.txt +++ b/data/languages/ukrainian.txt @@ -411,7 +411,7 @@ Internet News == Новини -Rifle +Laser == Лазер Join game diff --git a/datasrc/content.py b/datasrc/content.py index 82e752ed5..8aa22707a 100644 --- a/datasrc/content.py +++ b/datasrc/content.py @@ -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") diff --git a/datasrc/network.py b/datasrc/network.py index 3fbf7446c..5d0e5834e 100644 --- a/datasrc/network.py +++ b/datasrc/network.py @@ -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 = [ diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index 2f454aeba..5aef0085f 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -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; diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 00b5e58ce..31f1dac17 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -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(); diff --git a/src/game/client/components/statboard.cpp b/src/game/client/components/statboard.cpp index a1aa86144..a00dae35c 100644 --- a/src/game/client/components/statboard.cpp +++ b/src/game/client/components/statboard.cpp @@ -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]; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 716eb73de..33f0c9b1e 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -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; diff --git a/src/game/client/gameclient.h b/src/game/client/gameclient.h index bfeecdfb7..3cfd4e8d2 100644 --- a/src/game/client/gameclient.h +++ b/src/game/client/gameclient.h @@ -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; diff --git a/src/game/client/prediction/entities/character.cpp b/src/game/client/prediction/entities/character.cpp index 473aaac1f..5144b771d 100644 --- a/src/game/client/prediction/entities/character.cpp +++ b/src/game/client/prediction/entities/character.cpp @@ -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) diff --git a/src/game/client/prediction/entities/character.h b/src/game/client/prediction/entities/character.h index bbed9a6f5..d1e514396 100644 --- a/src/game/client/prediction/entities/character.h +++ b/src/game/client/prediction/entities/character.h @@ -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; diff --git a/src/game/client/prediction/entities/laser.cpp b/src/game/client/prediction/entities/laser.cpp index 2f0ba936c..8f8469266 100644 --- a/src/game/client/prediction/entities/laser.cpp +++ b/src/game/client/prediction/entities/laser.cpp @@ -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; } diff --git a/src/game/ddracecommands.h b/src/game/ddracecommands.h index 13aecf82f..8e5639ed3 100644 --- a/src/game/ddracecommands.h +++ b/src/game/ddracecommands.h @@ -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") diff --git a/src/game/editor/explanations.cpp b/src/game/editor/explanations.cpp index e322c8e6f..a222a4989 100644 --- a/src/game/editor/explanations.cpp +++ b/src/game/editor/explanations.cpp @@ -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) diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp index 8f6dfd3c0..7fb7032bb 100644 --- a/src/game/gamecore.cpp +++ b/src/game/gamecore.cpp @@ -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; diff --git a/src/game/gamecore.h b/src/game/gamecore.h index a32466a32..0289a5872 100644 --- a/src/game/gamecore.h +++ b/src/game/gamecore.h @@ -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; diff --git a/src/game/mapitems.h b/src/game/mapitems.h index 57e4504b5..1dca846d9 100644 --- a/src/game/mapitems.h +++ b/src/game/mapitems.h @@ -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, diff --git a/src/game/server/ddracecommands.cpp b/src/game/server/ddracecommands.cpp index 920dcd8ac..12b9d9615 100644 --- a/src/game/server/ddracecommands.cpp +++ b/src/game/server/ddracecommands.cpp @@ -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 { diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index f02361708..8094a7765 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -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; diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index 4923b8210..fb7763ad5 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -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; diff --git a/src/game/server/entities/laser.cpp b/src/game/server/entities/laser.cpp index 293a3f59a..7267938b1 100644 --- a/src/game/server/entities/laser.cpp +++ b/src/game/server/entities/laser.cpp @@ -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 diff --git a/src/game/server/entities/pickup.cpp b/src/game/server/entities/pickup.cpp index a1fce7dab..bfcff9051 100644 --- a/src/game/server/entities/pickup.cpp +++ b/src/game/server/entities/pickup.cpp @@ -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()) diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index c95552290..f989fc3bf 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -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; } diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index 440af430c..8ae148cd1 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -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); diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index 4f6e849d3..554d26696 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -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) { diff --git a/src/game/tuning.h b/src/game/tuning.h index 544ab62d3..99c6a35ca 100644 --- a/src/game/tuning.h +++ b/src/game/tuning.h @@ -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")