diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d92ccb..ec3c875 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ mkdir downloads wget https://www.amxmodx.org/amxxdrop/1.9/amxmodx-1.9.0-git5271-base-linux.tar.gz -P ./downloads wget https://www.amxmodx.org/amxxdrop/1.9/amxmodx-1.9.0-git5271-cstrike-linux.tar.gz -P ./downloads - wget https://github.com/s1lentq/reapi/releases/download/5.19.0.210/reapi_5.19.0.210-dev.zip -P ./downloads + wget https://github.com/s1lentq/reapi/releases/download/5.19.0.210/reapi_5.19.0.205-dev.zip -P ./downloads - name: Setup Build Variables id: buildvars uses: actions/github-script@v3 @@ -48,7 +48,7 @@ tar --strip-components=3 -zxf ./downloads/amxmodx-1.9.0-git5271-base-linux.tar.gz -C ./compiler addons/amxmodx/scripting tar --strip-components=3 -zxf ./downloads/amxmodx-1.9.0-git5271-cstrike-linux.tar.gz -C ./compiler addons/amxmodx/scripting mkdir -p ./thirdparty/reapi - unzip ./downloads/reapi_5.19.0.210-dev.zip -d ./thirdparty/reapi + unzip ./downloads/reapi_5.19.0.205-dev.zip -d ./thirdparty/reapi - name: Install Dependencies run: npm install - name: Build project @@ -75,16 +75,6 @@ asset_path: ./dist/bundles/src/zombiepanic-${{ steps.buildvars.outputs.tagversion }}-addons.zip asset_name: zombiepanic-${{ steps.buildvars.outputs.tagversion }}-addons-src.zip asset_content_type: application/zip - - name: Upload Release Addons Src - id: upload-release-addons - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/bundles/full/zombiepanic-${{ steps.buildvars.outputs.tagversion }}-addons.zip - asset_name: zombiepanic-${{ steps.buildvars.outputs.tagversion }}-addons.zip - asset_content_type: application/zip - name: Upload Release Build id: upload-release-addons-reapi uses: actions/upload-release-asset@v1 diff --git a/.vscode/settings.json b/.vscode/settings.json index 07bfd13..09f52e0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,10 @@ { - "amxxpawn.compiler.executablePath": "${workspaceRoot}/compiler/amxxpc.exe", - "amxxpawn.compiler.includePaths": [ - "${workspaceRoot}/compiler/include", - "${workspaceRoot}/src/include", - "${workspaceRoot}/thirdparty/reapi/addons/amxmodx/scripting/include" - ] + "editor.tabSize": 4, + "editor.insertSpaces": true, + "amxxpawn.compiler.executablePath": "${workspaceRoot}/compiler/amxxpc.exe", + "amxxpawn.compiler.includePaths": [ + "${workspaceRoot}/compiler/include", + "${workspaceRoot}/src/include", + "${workspaceRoot}/thirdparty/reapi/addons/amxmodx/scripting/include" + ] } \ No newline at end of file diff --git a/README.md b/README.md index ac256ed..8d22122 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ ### Zombie Panic Mod for Counter-Strike 1.6 -__Version:__ 0.9.5 +__Version:__ 1.0.0 ### Download latest: - [Releases](./releases) ### Requirements - Amx Mod X 1.9.0+ -- ReAPI +- RegameDLL + ReAPI +- Metamod-R or Metamod-P (for windows) ### Deployment - Clone repository. diff --git a/assets/addons/amxmodx/configs/plugins-zombiepanic.ini b/assets/addons/amxmodx/configs/plugins-zombiepanic.ini index 459b6f2..ef5b634 100644 --- a/assets/addons/amxmodx/configs/plugins-zombiepanic.ini +++ b/assets/addons/amxmodx/configs/plugins-zombiepanic.ini @@ -1,31 +1,33 @@ +; API api_custom_weapons.amxx debug api_custom_entities.amxx debug api_rounds.amxx debug +; Core zombiepanic.amxx debug zp_gamerules.amxx debug -zp_gamename.amxx debug zp_player_inventory.amxx debug zp_player_equipment.amxx debug zp_player_speed.amxx debug zp_flashlight.amxx debug -zp_human.amxx debug zp_zombie.amxx debug zp_zombie_lives.amxx debug zp_zombie_regeneration.amxx debug zp_zombie_vision.amxx debug zp_characters.amxx debug +zp_weapons.amxx debug zp_ammo.amxx debug zp_panic.amxx debug zp_gameplay_fixes.amxx debug zp_painshock.amxx debug zp_knockback.amxx debug zp_radio.amxx debug -zp_bot_fixes.amxx debug zp_music.amxx debug zp_use_pickup.amxx debug zp_controls.amxx debug +; Hud +zp_mapinfo.amxx debug zp_hud_money.amxx debug zp_hud_deathmsg.amxx debug zp_hud_scoreinfo.amxx debug @@ -35,7 +37,10 @@ zp_hud_winmessage.amxx debug zp_hud_radar.amxx debug zp_hud_itempickup.amxx debug zp_hud_statusvalue.amxx debug +zp_hud_crosshair.amxx debug +zp_hud_roundtimer.amxx debug +; Weapons zp_weapon_swipe.amxx debug zp_weapon_556ar.amxx debug zp_weapon_9mmhandgun.amxx debug @@ -45,10 +50,12 @@ zp_weapon_shotgun.amxx debug zp_weapon_satchel.amxx debug zp_weapon_handgrenade.amxx debug +; Entities zp_entity_info_player_team.amxx debug zp_entity_trigger_endround.amxx debug zp_entity_func_vip_safetyzone.amxx debug zp_entity_func_train.amxx debug +zp_entity_func_breakable.amxx debug zp_entity_weaponbox.amxx debug zp_entity_item_battery.amxx debug zp_entity_item_healthkit.amxx debug @@ -63,3 +70,7 @@ zp_entity_weapon_handgrenade.amxx debug zp_entity_weapon_satchel.amxx debug zp_entity_weapon_shotgun.amxx debug zp_entity_weapon_9mmhandgun.amxx debug + +; Extra +zp_objective_marks.amxx debug +zp_hud_hints.amxx debug diff --git a/assets/addons/amxmodx/configs/zombiepanic.cfg b/assets/addons/amxmodx/configs/zombiepanic.cfg index f9ace7b..86ff4d5 100644 --- a/assets/addons/amxmodx/configs/zombiepanic.cfg +++ b/assets/addons/amxmodx/configs/zombiepanic.cfg @@ -1,9 +1,38 @@ // Zombie Panic +mp_autoteambalance 0 mp_flashlight 1 +mp_forcecamera 1 mp_freezetime 10 mp_scoreboard_showdefkit 0 mp_scoreboard_showhealth 0 mp_scoreboard_showmoney 0 -// [Zombie Panic] Zombie Lives +// [Zombie Panic] Flashlight +zp_flashlight_consumption_rate 0.5 +zp_flashlight_recovery_rate 0.5 + +// [Zombie Panic] Gamerules zp_zombie_lives 20 + +// [Zombie Panic] Music +zp_join_music 1 +zp_music 1 + +// [Zombie Panic] Use Pickup +zp_use_pickup 1 +zp_use_pickup_highlight 1 + +// [Zombie Panic] Zombie Lives +zp_zombie_respawn_time 6.0 + +// [Zombie Panic] Zombie Regeneration +zp_zombie_regeneration_rate 5.0 + +// [Zombie Panic] Zombie Vision +zp_zombievision_auto 1 + +// [Zombie Panic] Hints HUD +zp_hints 1 + +// [Zombie Panic] Objective Marks +zp_objective_marks 1 diff --git a/assets/addons/amxmodx/configs/zombiepanic/characters/male.json b/assets/addons/amxmodx/configs/zombiepanic/characters/male.json new file mode 100644 index 0000000..cd97b03 --- /dev/null +++ b/assets/addons/amxmodx/configs/zombiepanic/characters/male.json @@ -0,0 +1,45 @@ +{ + "models": { + "zombie": "models/zombiepanic/v100/characters/male/zombie.mdl", + "human": "models/zombiepanic/v100/characters/male/human.mdl", + "swipe": "models/zombiepanic/v100/characters/male/swipe.mdl" + }, + "sounds": { + "human": { + "panic": [ + "zombiepanic/v100/player/panicscream1.wav", + "zombiepanic/v100/player/panicscream2.wav" + ], + "death": [ + "zombiepanic/v100/player/deathscream1.wav", + "zombiepanic/v100/player/deathscream2.wav", + "zombiepanic/v100/player/deathscream3.wav" + ] + }, + "zombie": { + "ambient": [ + "zombiepanic/v100/player/zomambient1.wav", + "zombiepanic/v100/player/zomambient2.wav", + "zombiepanic/v100/player/zomambient3.wav", + "zombiepanic/v100/player/zomambient4.wav", + "zombiepanic/v100/player/zomambient5.wav", + "zombiepanic/v100/player/zomambient6.wav", + "zombiepanic/v100/player/zomambient7.wav", + "zombiepanic/v100/player/zomambient8.wav", + "zombiepanic/v100/player/zomambient9.wav", + "zombiepanic/v100/player/zomambient10.wav", + "zombiepanic/v100/player/zomambient11.wav", + "zombiepanic/v100/player/zomambient12.wav", + "zombiepanic/v100/player/zomambient13.wav", + "zombiepanic/v100/player/zomambient14.wav", + "zombiepanic/v100/player/zomambient15.wav" + ], + "death": [ + "zombiepanic/v100/player/zombiedeath1.wav", + "zombiepanic/v100/player/zombiedeath2.wav", + "zombiepanic/v100/player/zombiedeath3.wav" + ] + } + }, + "_version": 1 +} diff --git a/assets/addons/amxmodx/data/lang/zombiepanic.txt b/assets/addons/amxmodx/data/lang/zombiepanic.txt new file mode 100644 index 0000000..3ebe578 --- /dev/null +++ b/assets/addons/amxmodx/data/lang/zombiepanic.txt @@ -0,0 +1,39 @@ +[en] +ZP_HINT_TITLE = Hint +ZP_HINT_PANIC = Panic may help you escape from the zombies^nPress to Panic +ZP_HINT_DROP_AMMO = You can drop your ammo pressing ^nPress to select ammo type +ZP_HINT_PICKUP = Press to pickup items on dinstance +ZP_WARN_TITLE = Warning +ZP_WARN_SPEED = A large amount of ammo and weapons slows you down^nDon't forget to get rid of unnecessary ammo +ZP_OBJECTIVE_TITLE = Survival +ZP_OBJECTIVE_HUMAN = Survive to the end of the round or kill all zombies +ZP_OBJECTIVE_ZOMBIE = Kill all survivors +ZPO_OBJECTIVE_TITLE = Objective +ZPO_OBJECTIVE_HUMAN = Follow the marks to complete objectives +ZPO_OBJECTIVE_ZOMBIE = Don't let survivors complete the objectives +ZP_RESPAWN_TITLE = Respawn +ZP_RESPAWN_ZOMBIE = You will be respawned soon...^nWatch the lives in the lower right corner +ZP_RESPAWN_HUMAN = You will be respawned as zombie soon... +ZP_RESPAWN_NOLIVES = No more lives^nWait for more lives to appear +ZP_ITEM_PICKUP_TITLE = +ZP_ITEM_PICKUP = Pickup item + +[ru] +ZP_HINT_TITLE = Совет +ZP_HINT_PANIC = Паника может помочь вам убежать от зомби^nНажмите для активации +ZP_HINT_DROP_AMMO = Вы можете выбросить патроны нажав ^nНажмите для выбора типа патронов +ZP_HINT_PICKUP = Нажмите <е> для того, чтоб подобрать предметы на расстоянии +ZP_WARN_TITLE = Внимание +ZP_WARN_SPEED = Не забывайте избавляться от ненужных патронов, чтоб поддерживать скорость +ZP_OBJECTIVE_TITLE = Выживание +ZP_OBJECTIVE_HUMAN = Продержитесь до конца раунда или убейте всех зомби +ZP_OBJECTIVE_ZOMBIE = Убейте всех выживших +ZPO_OBJECTIVE_TITLE = Цель +ZPO_OBJECTIVE_HUMAN = Следуйте к отметкам для выполнения целей +ZPO_OBJECTIVE_ZOMBIE = Не дайте выжившим выполнить цель +ZP_RESPAWN_TITLE = Возрождение +ZP_RESPAWN_ZOMBIE = Вскоре, Вы возродитесь^nследите за жизнями в правой нижней части экрана +ZP_RESPAWN_HUMAN = Вскоре, Вы воздродитесь за зомби... +ZP_RESPAWN_NOLIVES = Жизней больше нет^nОжидайте, пока появится больше жизней +ZP_ITEM_PICKUP_TITLE = +ZP_ITEM_PICKUP = Подобрать предмет diff --git a/assets/models/zombiepanic/b1/items/v_swipe.mdl b/assets/models/zombiepanic/b1/items/v_swipe.mdl deleted file mode 100644 index 860427d..0000000 Binary files a/assets/models/zombiepanic/b1/items/v_swipe.mdl and /dev/null differ diff --git a/assets/models/zombiepanic/b1/items/w_medkit.mdl b/assets/models/zombiepanic/b1/items/w_medkit.mdl deleted file mode 100644 index 32aabc1..0000000 Binary files a/assets/models/zombiepanic/b1/items/w_medkit.mdl and /dev/null differ diff --git a/assets/models/zombiepanic/b1/characters/male/human.mdl b/assets/models/zombiepanic/v100/characters/male/human.mdl similarity index 100% rename from assets/models/zombiepanic/b1/characters/male/human.mdl rename to assets/models/zombiepanic/v100/characters/male/human.mdl diff --git a/assets/models/zombiepanic/b1/characters/male/swipe.mdl b/assets/models/zombiepanic/v100/characters/male/swipe.mdl similarity index 100% rename from assets/models/zombiepanic/b1/characters/male/swipe.mdl rename to assets/models/zombiepanic/v100/characters/male/swipe.mdl diff --git a/assets/models/zombiepanic/b1/characters/male/zombie.mdl b/assets/models/zombiepanic/v100/characters/male/zombie.mdl similarity index 100% rename from assets/models/zombiepanic/b1/characters/male/zombie.mdl rename to assets/models/zombiepanic/v100/characters/male/zombie.mdl diff --git a/assets/models/zombiepanic/b1/items/p_357.mdl b/assets/models/zombiepanic/v100/items/p_357.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_357.mdl rename to assets/models/zombiepanic/v100/items/p_357.mdl diff --git a/assets/models/zombiepanic/b1/items/p_556AR.mdl b/assets/models/zombiepanic/v100/items/p_556AR.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_556AR.mdl rename to assets/models/zombiepanic/v100/items/p_556AR.mdl diff --git a/assets/models/zombiepanic/b1/items/p_9mmhandgun.mdl b/assets/models/zombiepanic/v100/items/p_9mmhandgun.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_9mmhandgun.mdl rename to assets/models/zombiepanic/v100/items/p_9mmhandgun.mdl diff --git a/assets/models/zombiepanic/b1/items/p_crowbar.mdl b/assets/models/zombiepanic/v100/items/p_crowbar.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_crowbar.mdl rename to assets/models/zombiepanic/v100/items/p_crowbar.mdl diff --git a/assets/models/zombiepanic/b1/items/p_grenade.mdl b/assets/models/zombiepanic/v100/items/p_grenade.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_grenade.mdl rename to assets/models/zombiepanic/v100/items/p_grenade.mdl diff --git a/assets/models/zombiepanic/b1/items/p_satchel.mdl b/assets/models/zombiepanic/v100/items/p_satchel.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_satchel.mdl rename to assets/models/zombiepanic/v100/items/p_satchel.mdl diff --git a/assets/models/zombiepanic/b1/items/p_satchel_radio.mdl b/assets/models/zombiepanic/v100/items/p_satchel_radio.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_satchel_radio.mdl rename to assets/models/zombiepanic/v100/items/p_satchel_radio.mdl diff --git a/assets/models/zombiepanic/b1/items/p_shotgun.mdl b/assets/models/zombiepanic/v100/items/p_shotgun.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_shotgun.mdl rename to assets/models/zombiepanic/v100/items/p_shotgun.mdl diff --git a/assets/models/zombiepanic/b1/items/p_swipe.mdl b/assets/models/zombiepanic/v100/items/p_swipe.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/p_swipe.mdl rename to assets/models/zombiepanic/v100/items/p_swipe.mdl diff --git a/assets/models/zombiepanic/b1/items/v_357.mdl b/assets/models/zombiepanic/v100/items/v_357.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_357.mdl rename to assets/models/zombiepanic/v100/items/v_357.mdl diff --git a/assets/models/zombiepanic/b1/items/v_556ar.mdl b/assets/models/zombiepanic/v100/items/v_556ar.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_556ar.mdl rename to assets/models/zombiepanic/v100/items/v_556ar.mdl diff --git a/assets/models/zombiepanic/b1/items/v_9mmhandgun.mdl b/assets/models/zombiepanic/v100/items/v_9mmhandgun.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_9mmhandgun.mdl rename to assets/models/zombiepanic/v100/items/v_9mmhandgun.mdl diff --git a/assets/models/zombiepanic/b1/items/v_crowbar.mdl b/assets/models/zombiepanic/v100/items/v_crowbar.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_crowbar.mdl rename to assets/models/zombiepanic/v100/items/v_crowbar.mdl diff --git a/assets/models/zombiepanic/b1/items/v_grenade.mdl b/assets/models/zombiepanic/v100/items/v_grenade.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_grenade.mdl rename to assets/models/zombiepanic/v100/items/v_grenade.mdl diff --git a/assets/models/zombiepanic/b1/items/v_satchel.mdl b/assets/models/zombiepanic/v100/items/v_satchel.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_satchel.mdl rename to assets/models/zombiepanic/v100/items/v_satchel.mdl diff --git a/assets/models/zombiepanic/b1/items/v_satchel_radio.mdl b/assets/models/zombiepanic/v100/items/v_satchel_radio.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_satchel_radio.mdl rename to assets/models/zombiepanic/v100/items/v_satchel_radio.mdl diff --git a/assets/models/zombiepanic/b1/items/v_shotgun.mdl b/assets/models/zombiepanic/v100/items/v_shotgun.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/v_shotgun.mdl rename to assets/models/zombiepanic/v100/items/v_shotgun.mdl diff --git a/assets/models/zombiepanic/b1/items/w_357.mdl b/assets/models/zombiepanic/v100/items/w_357.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_357.mdl rename to assets/models/zombiepanic/v100/items/w_357.mdl diff --git a/assets/models/zombiepanic/b1/items/w_357ammobox.mdl b/assets/models/zombiepanic/v100/items/w_357ammobox.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_357ammobox.mdl rename to assets/models/zombiepanic/v100/items/w_357ammobox.mdl diff --git a/assets/models/zombiepanic/b1/items/w_556AR.mdl b/assets/models/zombiepanic/v100/items/w_556AR.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_556AR.mdl rename to assets/models/zombiepanic/v100/items/w_556AR.mdl diff --git a/assets/models/zombiepanic/b1/items/w_556ARclip.mdl b/assets/models/zombiepanic/v100/items/w_556ARclip.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_556ARclip.mdl rename to assets/models/zombiepanic/v100/items/w_556ARclip.mdl diff --git a/assets/models/zombiepanic/b1/items/w_9mmclip.mdl b/assets/models/zombiepanic/v100/items/w_9mmclip.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_9mmclip.mdl rename to assets/models/zombiepanic/v100/items/w_9mmclip.mdl diff --git a/assets/models/zombiepanic/b1/items/w_9mmclipT.mdl b/assets/models/zombiepanic/v100/items/w_9mmclipT.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_9mmclipT.mdl rename to assets/models/zombiepanic/v100/items/w_9mmclipT.mdl diff --git a/assets/models/zombiepanic/b1/items/w_9mmhandgun.mdl b/assets/models/zombiepanic/v100/items/w_9mmhandgun.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_9mmhandgun.mdl rename to assets/models/zombiepanic/v100/items/w_9mmhandgun.mdl diff --git a/assets/models/zombiepanic/b1/items/w_9mmhandgunT.mdl b/assets/models/zombiepanic/v100/items/w_9mmhandgunT.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_9mmhandgunT.mdl rename to assets/models/zombiepanic/v100/items/w_9mmhandgunT.mdl diff --git a/assets/models/zombiepanic/b1/items/w_battery.mdl b/assets/models/zombiepanic/v100/items/w_battery.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_battery.mdl rename to assets/models/zombiepanic/v100/items/w_battery.mdl diff --git a/assets/models/zombiepanic/b1/items/w_grenade.mdl b/assets/models/zombiepanic/v100/items/w_grenade.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_grenade.mdl rename to assets/models/zombiepanic/v100/items/w_grenade.mdl diff --git a/assets/models/zombiepanic/v100/items/w_medkit.mdl b/assets/models/zombiepanic/v100/items/w_medkit.mdl new file mode 100644 index 0000000..afa5204 Binary files /dev/null and b/assets/models/zombiepanic/v100/items/w_medkit.mdl differ diff --git a/assets/models/zombiepanic/b1/items/w_satchel.mdl b/assets/models/zombiepanic/v100/items/w_satchel.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_satchel.mdl rename to assets/models/zombiepanic/v100/items/w_satchel.mdl diff --git a/assets/models/zombiepanic/b1/items/w_shotbox.mdl b/assets/models/zombiepanic/v100/items/w_shotbox.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_shotbox.mdl rename to assets/models/zombiepanic/v100/items/w_shotbox.mdl diff --git a/assets/models/zombiepanic/b1/items/w_shotgun.mdl b/assets/models/zombiepanic/v100/items/w_shotgun.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_shotgun.mdl rename to assets/models/zombiepanic/v100/items/w_shotgun.mdl diff --git a/assets/models/zombiepanic/b1/items/w_weaponbox.mdl b/assets/models/zombiepanic/v100/items/w_weaponbox.mdl similarity index 100% rename from assets/models/zombiepanic/b1/items/w_weaponbox.mdl rename to assets/models/zombiepanic/v100/items/w_weaponbox.mdl diff --git a/assets/models/zombiepanic/b1/lightcone.mdl b/assets/models/zombiepanic/v100/lightcone.mdl similarity index 100% rename from assets/models/zombiepanic/b1/lightcone.mdl rename to assets/models/zombiepanic/v100/lightcone.mdl diff --git a/assets/sound/zombiepanic/b1/items/556clip1.wav b/assets/sound/zombiepanic/v100/items/556clip1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/items/556clip1.wav rename to assets/sound/zombiepanic/v100/items/556clip1.wav diff --git a/assets/sound/zombiepanic/v100/music/KM_CityOfSouls.mp3 b/assets/sound/zombiepanic/v100/music/KM_CityOfSouls.mp3 new file mode 100644 index 0000000..f683776 Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_CityOfSouls.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_CloudOfSorrow.mp3 b/assets/sound/zombiepanic/v100/music/KM_CloudOfSorrow.mp3 new file mode 100644 index 0000000..473acf0 Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_CloudOfSorrow.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_Descent.mp3 b/assets/sound/zombiepanic/v100/music/KM_Descent.mp3 new file mode 100644 index 0000000..b34e908 Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_Descent.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_ForgottenKingdom.mp3 b/assets/sound/zombiepanic/v100/music/KM_ForgottenKingdom.mp3 new file mode 100644 index 0000000..405508c Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_ForgottenKingdom.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_FrozenWasteland.mp3 b/assets/sound/zombiepanic/v100/music/KM_FrozenWasteland.mp3 new file mode 100644 index 0000000..120e9aa Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_FrozenWasteland.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_Horde.mp3 b/assets/sound/zombiepanic/v100/music/KM_Horde.mp3 new file mode 100644 index 0000000..eee69ec Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_Horde.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_Nightmare.mp3 b/assets/sound/zombiepanic/v100/music/KM_Nightmare.mp3 new file mode 100644 index 0000000..50cc2ae Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_Nightmare.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_Orphanage.mp3 b/assets/sound/zombiepanic/v100/music/KM_Orphanage.mp3 new file mode 100644 index 0000000..c049c9e Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_Orphanage.mp3 differ diff --git a/assets/sound/zombiepanic/v100/music/KM_Plague.mp3 b/assets/sound/zombiepanic/v100/music/KM_Plague.mp3 new file mode 100644 index 0000000..e9a0a6e Binary files /dev/null and b/assets/sound/zombiepanic/v100/music/KM_Plague.mp3 differ diff --git a/assets/sound/zombiepanic/b1/music/gamestartup.mp3 b/assets/sound/zombiepanic/v100/music/gamestartup.mp3 similarity index 100% rename from assets/sound/zombiepanic/b1/music/gamestartup.mp3 rename to assets/sound/zombiepanic/v100/music/gamestartup.mp3 diff --git a/assets/sound/zombiepanic/b1/player/deathscream1.wav b/assets/sound/zombiepanic/v100/player/deathscream1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/deathscream1.wav rename to assets/sound/zombiepanic/v100/player/deathscream1.wav diff --git a/assets/sound/zombiepanic/b1/player/deathscream2.wav b/assets/sound/zombiepanic/v100/player/deathscream2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/deathscream2.wav rename to assets/sound/zombiepanic/v100/player/deathscream2.wav diff --git a/assets/sound/zombiepanic/b1/player/deathscream3.wav b/assets/sound/zombiepanic/v100/player/deathscream3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/deathscream3.wav rename to assets/sound/zombiepanic/v100/player/deathscream3.wav diff --git a/assets/sound/zombiepanic/b1/player/fallscream1.wav b/assets/sound/zombiepanic/v100/player/fallscream1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/fallscream1.wav rename to assets/sound/zombiepanic/v100/player/fallscream1.wav diff --git a/assets/sound/zombiepanic/b1/player/fallscream2.wav b/assets/sound/zombiepanic/v100/player/fallscream2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/fallscream2.wav rename to assets/sound/zombiepanic/v100/player/fallscream2.wav diff --git a/assets/sound/zombiepanic/b1/player/panicscream1.wav b/assets/sound/zombiepanic/v100/player/panicscream1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/panicscream1.wav rename to assets/sound/zombiepanic/v100/player/panicscream1.wav diff --git a/assets/sound/zombiepanic/b1/player/panicscream2.wav b/assets/sound/zombiepanic/v100/player/panicscream2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/panicscream2.wav rename to assets/sound/zombiepanic/v100/player/panicscream2.wav diff --git a/assets/sound/zombiepanic/b1/player/pl_shell1.wav b/assets/sound/zombiepanic/v100/player/pl_shell1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/pl_shell1.wav rename to assets/sound/zombiepanic/v100/player/pl_shell1.wav diff --git a/assets/sound/zombiepanic/b1/player/pl_shell2.wav b/assets/sound/zombiepanic/v100/player/pl_shell2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/pl_shell2.wav rename to assets/sound/zombiepanic/v100/player/pl_shell2.wav diff --git a/assets/sound/zombiepanic/b1/player/pl_shell3.wav b/assets/sound/zombiepanic/v100/player/pl_shell3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/pl_shell3.wav rename to assets/sound/zombiepanic/v100/player/pl_shell3.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient1.wav b/assets/sound/zombiepanic/v100/player/zomambient1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient1.wav rename to assets/sound/zombiepanic/v100/player/zomambient1.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient10.wav b/assets/sound/zombiepanic/v100/player/zomambient10.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient10.wav rename to assets/sound/zombiepanic/v100/player/zomambient10.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient11.wav b/assets/sound/zombiepanic/v100/player/zomambient11.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient11.wav rename to assets/sound/zombiepanic/v100/player/zomambient11.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient12.wav b/assets/sound/zombiepanic/v100/player/zomambient12.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient12.wav rename to assets/sound/zombiepanic/v100/player/zomambient12.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient13.wav b/assets/sound/zombiepanic/v100/player/zomambient13.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient13.wav rename to assets/sound/zombiepanic/v100/player/zomambient13.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient14.wav b/assets/sound/zombiepanic/v100/player/zomambient14.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient14.wav rename to assets/sound/zombiepanic/v100/player/zomambient14.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient15.wav b/assets/sound/zombiepanic/v100/player/zomambient15.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient15.wav rename to assets/sound/zombiepanic/v100/player/zomambient15.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient2.wav b/assets/sound/zombiepanic/v100/player/zomambient2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient2.wav rename to assets/sound/zombiepanic/v100/player/zomambient2.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient3.wav b/assets/sound/zombiepanic/v100/player/zomambient3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient3.wav rename to assets/sound/zombiepanic/v100/player/zomambient3.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient4.wav b/assets/sound/zombiepanic/v100/player/zomambient4.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient4.wav rename to assets/sound/zombiepanic/v100/player/zomambient4.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient5.wav b/assets/sound/zombiepanic/v100/player/zomambient5.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient5.wav rename to assets/sound/zombiepanic/v100/player/zomambient5.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient6.wav b/assets/sound/zombiepanic/v100/player/zomambient6.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient6.wav rename to assets/sound/zombiepanic/v100/player/zomambient6.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient7.wav b/assets/sound/zombiepanic/v100/player/zomambient7.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient7.wav rename to assets/sound/zombiepanic/v100/player/zomambient7.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient8.wav b/assets/sound/zombiepanic/v100/player/zomambient8.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient8.wav rename to assets/sound/zombiepanic/v100/player/zomambient8.wav diff --git a/assets/sound/zombiepanic/b1/player/zomambient9.wav b/assets/sound/zombiepanic/v100/player/zomambient9.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zomambient9.wav rename to assets/sound/zombiepanic/v100/player/zomambient9.wav diff --git a/assets/sound/zombiepanic/b1/player/zombieclick.wav b/assets/sound/zombiepanic/v100/player/zombieclick.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zombieclick.wav rename to assets/sound/zombiepanic/v100/player/zombieclick.wav diff --git a/assets/sound/zombiepanic/b1/player/zombiedeath1.wav b/assets/sound/zombiepanic/v100/player/zombiedeath1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zombiedeath1.wav rename to assets/sound/zombiepanic/v100/player/zombiedeath1.wav diff --git a/assets/sound/zombiepanic/b1/player/zombiedeath2.wav b/assets/sound/zombiepanic/v100/player/zombiedeath2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zombiedeath2.wav rename to assets/sound/zombiepanic/v100/player/zombiedeath2.wav diff --git a/assets/sound/zombiepanic/b1/player/zombiedeath3.wav b/assets/sound/zombiepanic/v100/player/zombiedeath3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/player/zombiedeath3.wav rename to assets/sound/zombiepanic/v100/player/zombiedeath3.wav diff --git a/assets/sound/zombiepanic/b1/weapons/claw_miss1.wav b/assets/sound/zombiepanic/v100/weapons/claw_miss1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/claw_miss1.wav rename to assets/sound/zombiepanic/v100/weapons/claw_miss1.wav diff --git a/assets/sound/zombiepanic/b1/weapons/claw_miss2.wav b/assets/sound/zombiepanic/v100/weapons/claw_miss2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/claw_miss2.wav rename to assets/sound/zombiepanic/v100/weapons/claw_miss2.wav diff --git a/assets/sound/zombiepanic/b1/weapons/claw_strike1.wav b/assets/sound/zombiepanic/v100/weapons/claw_strike1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/claw_strike1.wav rename to assets/sound/zombiepanic/v100/weapons/claw_strike1.wav diff --git a/assets/sound/zombiepanic/b1/weapons/claw_strike2.wav b/assets/sound/zombiepanic/v100/weapons/claw_strike2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/claw_strike2.wav rename to assets/sound/zombiepanic/v100/weapons/claw_strike2.wav diff --git a/assets/sound/zombiepanic/b1/weapons/claw_strike3.wav b/assets/sound/zombiepanic/v100/weapons/claw_strike3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/claw_strike3.wav rename to assets/sound/zombiepanic/v100/weapons/claw_strike3.wav diff --git a/assets/sound/zombiepanic/b1/weapons/fuse.wav b/assets/sound/zombiepanic/v100/weapons/fuse.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/fuse.wav rename to assets/sound/zombiepanic/v100/weapons/fuse.wav diff --git a/assets/sound/zombiepanic/b1/weapons/hks1.wav b/assets/sound/zombiepanic/v100/weapons/hks1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/hks1.wav rename to assets/sound/zombiepanic/v100/weapons/hks1.wav diff --git a/assets/sound/zombiepanic/b1/weapons/hks2.wav b/assets/sound/zombiepanic/v100/weapons/hks2.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/hks2.wav rename to assets/sound/zombiepanic/v100/weapons/hks2.wav diff --git a/assets/sound/zombiepanic/b1/weapons/hks3.wav b/assets/sound/zombiepanic/v100/weapons/hks3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/hks3.wav rename to assets/sound/zombiepanic/v100/weapons/hks3.wav diff --git a/assets/sound/zombiepanic/b1/weapons/old-pl_gun3.wav b/assets/sound/zombiepanic/v100/weapons/old-pl_gun3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/old-pl_gun3.wav rename to assets/sound/zombiepanic/v100/weapons/old-pl_gun3.wav diff --git a/assets/sound/zombiepanic/b1/weapons/pl_gun3.wav b/assets/sound/zombiepanic/v100/weapons/pl_gun3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/pl_gun3.wav rename to assets/sound/zombiepanic/v100/weapons/pl_gun3.wav diff --git a/assets/sound/zombiepanic/b1/weapons/reload1.wav b/assets/sound/zombiepanic/v100/weapons/reload1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/reload1.wav rename to assets/sound/zombiepanic/v100/weapons/reload1.wav diff --git a/assets/sound/zombiepanic/b1/weapons/reload3.wav b/assets/sound/zombiepanic/v100/weapons/reload3.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/reload3.wav rename to assets/sound/zombiepanic/v100/weapons/reload3.wav diff --git a/assets/sound/zombiepanic/b1/weapons/sbarrel1.wav b/assets/sound/zombiepanic/v100/weapons/sbarrel1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/sbarrel1.wav rename to assets/sound/zombiepanic/v100/weapons/sbarrel1.wav diff --git a/assets/sound/zombiepanic/b1/weapons/scock1.wav b/assets/sound/zombiepanic/v100/weapons/scock1.wav similarity index 100% rename from assets/sound/zombiepanic/b1/weapons/scock1.wav rename to assets/sound/zombiepanic/v100/weapons/scock1.wav diff --git a/assets/sprites/zombiepanic/b1/weapon_357.txt b/assets/sprites/zombiepanic/b1/weapon_357.txt deleted file mode 100644 index a161a3f..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_357.txt +++ /dev/null @@ -1,7 +0,0 @@ -6 -weapon 320 zombiepanic/b1/320hud1 0 80 80 20 -weapon_s 320 zombiepanic/b1/320hud1 0 100 80 20 -ammo 320 zombiepanic/b1/320hud2 18 16 18 18 -weapon 640 zombiepanic/b1/640hud1 0 90 170 45 -weapon_s 640 zombiepanic/b1/640hud4 0 90 170 45 -ammo 640 zombiepanic/b1/640hud7 24 72 24 24 diff --git a/assets/sprites/zombiepanic/b1/weapon_556ar.txt b/assets/sprites/zombiepanic/b1/weapon_556ar.txt deleted file mode 100644 index cf37c62..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_556ar.txt +++ /dev/null @@ -1,10 +0,0 @@ -8 -weapon 320 zombiepanic/b1/320hud1 0 120 80 20 -weapon_s 320 zombiepanic/b1/320hud1 0 140 80 20 -ammo 320 zombiepanic/b1/320hud2 0 16 18 18 -ammo2 320 zombiepanic/b1/320hud2 36 16 18 18 -weapon 640 zombiepanic/b1/640hud1 0 135 170 45 -weapon_s 640 zombiepanic/b1/640hud4 0 135 170 45 -ammo 640 zombiepanic/b1/640hudz 177 0 24 24 -ammo2 640 zombiepanic/b1/640hud7 48 72 24 24 - diff --git a/assets/sprites/zombiepanic/b1/weapon_9mmhandgun.txt b/assets/sprites/zombiepanic/b1/weapon_9mmhandgun.txt deleted file mode 100644 index 3f99d2a..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_9mmhandgun.txt +++ /dev/null @@ -1,7 +0,0 @@ -6 -weapon 320 zombiepanic/b1/320hud1 0 40 80 20 -weapon_s 320 zombiepanic/b1/320hud1 0 60 80 20 -ammo 320 zombiepanic/b1/320hud2 0 16 18 18 -weapon 640 zombiepanic/b1/640hud1 0 45 170 45 -weapon_s 640 zombiepanic/b1/640hud4 0 45 170 45 -ammo 640 zombiepanic/b1/640hud7 0 72 24 24 diff --git a/assets/sprites/zombiepanic/b1/weapon_crowbar.txt b/assets/sprites/zombiepanic/b1/weapon_crowbar.txt deleted file mode 100644 index f2ce3e2..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_crowbar.txt +++ /dev/null @@ -1,5 +0,0 @@ -4 -weapon 320 zombiepanic/b1/320hud1 0 0 80 20 -weapon_s 320 zombiepanic/b1/320hud1 0 20 80 20 -weapon 640 zombiepanic/b1/640hud1 0 0 170 45 -weapon_s 640 zombiepanic/b1/640hud4 0 0 170 45 diff --git a/assets/sprites/zombiepanic/b1/weapon_handgrenade.txt b/assets/sprites/zombiepanic/b1/weapon_handgrenade.txt deleted file mode 100644 index 85c5315..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_handgrenade.txt +++ /dev/null @@ -1,7 +0,0 @@ -6 -weapon 320 zombiepanic/b1/320hud1 160 0 80 20 -weapon_s 320 zombiepanic/b1/320hud1 160 20 80 20 -ammo 320 zombiepanic/b1/320hud2 36 34 18 18 -weapon 640 zombiepanic/b1/640hud3 0 0 170 45 -weapon_s 640 zombiepanic/b1/640hud6 0 0 170 45 -ammo 640 zombiepanic/b1/640hud7 48 96 24 24 diff --git a/assets/sprites/zombiepanic/b1/weapon_satchel.txt b/assets/sprites/zombiepanic/b1/weapon_satchel.txt deleted file mode 100644 index cae579b..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_satchel.txt +++ /dev/null @@ -1,7 +0,0 @@ -6 -weapon 320 zombiepanic/b1/320hud1 160 40 80 20 -weapon_s 320 zombiepanic/b1/320hud1 160 60 80 20 -ammo 320 zombiepanic/b1/320hud2 54 34 18 18 -weapon 640 zombiepanic/b1/640hud3 0 45 170 45 -weapon_s 640 zombiepanic/b1/640hud6 0 45 170 45 -ammo 640 zombiepanic/b1/640hud7 72 96 24 24 diff --git a/assets/sprites/zombiepanic/b1/weapon_shotgun.txt b/assets/sprites/zombiepanic/b1/weapon_shotgun.txt deleted file mode 100644 index dc1dca7..0000000 --- a/assets/sprites/zombiepanic/b1/weapon_shotgun.txt +++ /dev/null @@ -1,7 +0,0 @@ -6 -weapon 320 zombiepanic/b1/320hud1 0 160 80 20 -weapon_s 320 zombiepanic/b1/320hud1 0 180 80 20 -ammo 320 zombiepanic/b1/320hud2 54 16 18 18 -weapon 640 zombiepanic/b1/640hud1 0 180 170 45 -weapon_s 640 zombiepanic/b1/640hud4 0 180 170 45 -ammo 640 zombiepanic/b1/640hud7 72 72 24 24 \ No newline at end of file diff --git a/assets/sprites/zombiepanic/b1/640hud1.spr b/assets/sprites/zombiepanic/v100/640hud1.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640hud1.spr rename to assets/sprites/zombiepanic/v100/640hud1.spr diff --git a/assets/sprites/zombiepanic/b1/640hud3.spr b/assets/sprites/zombiepanic/v100/640hud3.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640hud3.spr rename to assets/sprites/zombiepanic/v100/640hud3.spr diff --git a/assets/sprites/zombiepanic/b1/640hud4.spr b/assets/sprites/zombiepanic/v100/640hud4.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640hud4.spr rename to assets/sprites/zombiepanic/v100/640hud4.spr diff --git a/assets/sprites/zombiepanic/b1/640hud6.spr b/assets/sprites/zombiepanic/v100/640hud6.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640hud6.spr rename to assets/sprites/zombiepanic/v100/640hud6.spr diff --git a/assets/sprites/zombiepanic/b1/640hud7.spr b/assets/sprites/zombiepanic/v100/640hud7.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640hud7.spr rename to assets/sprites/zombiepanic/v100/640hud7.spr diff --git a/assets/sprites/zombiepanic/b1/640hudz.spr b/assets/sprites/zombiepanic/v100/640hudz.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640hudz.spr rename to assets/sprites/zombiepanic/v100/640hudz.spr diff --git a/assets/sprites/zombiepanic/b1/640zombiehead.spr b/assets/sprites/zombiepanic/v100/640zombiehead.spr similarity index 100% rename from assets/sprites/zombiepanic/b1/640zombiehead.spr rename to assets/sprites/zombiepanic/v100/640zombiehead.spr diff --git a/assets/sprites/zombiepanic/v100/colt_xhair.spr b/assets/sprites/zombiepanic/v100/colt_xhair.spr new file mode 100644 index 0000000..3bdf269 Binary files /dev/null and b/assets/sprites/zombiepanic/v100/colt_xhair.spr differ diff --git a/assets/sprites/zombiepanic/v100/magnum_xhair.spr b/assets/sprites/zombiepanic/v100/magnum_xhair.spr new file mode 100644 index 0000000..1e4ac2b Binary files /dev/null and b/assets/sprites/zombiepanic/v100/magnum_xhair.spr differ diff --git a/assets/sprites/zombiepanic/v100/objective_mark.spr b/assets/sprites/zombiepanic/v100/objective_mark.spr new file mode 100644 index 0000000..2eedf84 Binary files /dev/null and b/assets/sprites/zombiepanic/v100/objective_mark.spr differ diff --git a/assets/sprites/zombiepanic/v100/pistol_xhair.spr b/assets/sprites/zombiepanic/v100/pistol_xhair.spr new file mode 100644 index 0000000..adcc149 Binary files /dev/null and b/assets/sprites/zombiepanic/v100/pistol_xhair.spr differ diff --git a/assets/sprites/zombiepanic/v100/shotgun_xhair.spr b/assets/sprites/zombiepanic/v100/shotgun_xhair.spr new file mode 100644 index 0000000..dbf2a15 Binary files /dev/null and b/assets/sprites/zombiepanic/v100/shotgun_xhair.spr differ diff --git a/assets/sprites/zombiepanic/v100/weapon_357.txt b/assets/sprites/zombiepanic/v100/weapon_357.txt new file mode 100644 index 0000000..8d377ae --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_357.txt @@ -0,0 +1,9 @@ +8 +weapon 320 zombiepanic/v100/320hud1 0 80 80 20 +weapon_s 320 zombiepanic/v100/320hud1 0 100 80 20 +ammo 320 zombiepanic/v100/320hud2 18 16 18 18 +weapon 640 zombiepanic/v100/640hud1 0 90 170 45 +weapon_s 640 zombiepanic/v100/640hud4 0 90 170 45 +ammo 640 zombiepanic/v100/640hud7 24 72 24 24 +crosshair 640 zombiepanic/v100/magnum_xhair 0 0 64 64 +autoaim 640 zombiepanic/v100/magnum_xhair 0 0 64 64 diff --git a/assets/sprites/zombiepanic/v100/weapon_556ar.txt b/assets/sprites/zombiepanic/v100/weapon_556ar.txt new file mode 100644 index 0000000..4fca552 --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_556ar.txt @@ -0,0 +1,11 @@ +10 +weapon 320 zombiepanic/v100/320hud1 0 120 80 20 +weapon_s 320 zombiepanic/v100/320hud1 0 140 80 20 +ammo 320 zombiepanic/v100/320hud2 0 16 18 18 +ammo2 320 zombiepanic/v100/320hud2 36 16 18 18 +weapon 640 zombiepanic/v100/640hud1 0 135 170 45 +weapon_s 640 zombiepanic/v100/640hud4 0 135 170 45 +ammo 640 zombiepanic/v100/640hudz 177 0 24 24 +ammo2 640 zombiepanic/v100/640hud7 48 72 24 24 +crosshair 640 zombiepanic/v100/colt_xhair 0 0 64 64 +autoaim 640 zombiepanic/v100/colt_xhair 0 0 64 64 diff --git a/assets/sprites/zombiepanic/v100/weapon_9mmhandgun.txt b/assets/sprites/zombiepanic/v100/weapon_9mmhandgun.txt new file mode 100644 index 0000000..44ae3a4 --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_9mmhandgun.txt @@ -0,0 +1,9 @@ +8 +weapon 320 zombiepanic/v100/320hud1 0 40 80 20 +weapon_s 320 zombiepanic/v100/320hud1 0 60 80 20 +ammo 320 zombiepanic/v100/320hud2 0 16 18 18 +weapon 640 zombiepanic/v100/640hud1 0 45 170 45 +weapon_s 640 zombiepanic/v100/640hud4 0 45 170 45 +ammo 640 zombiepanic/v100/640hud7 0 72 24 24 +crosshair 640 zombiepanic/v100/pistol_xhair 0 0 64 64 +autoaim 640 zombiepanic/v100/pistol_xhair 0 0 64 64 diff --git a/assets/sprites/zombiepanic/v100/weapon_crowbar.txt b/assets/sprites/zombiepanic/v100/weapon_crowbar.txt new file mode 100644 index 0000000..0af0c3a --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_crowbar.txt @@ -0,0 +1,5 @@ +4 +weapon 320 zombiepanic/v100/320hud1 0 0 80 20 +weapon_s 320 zombiepanic/v100/320hud1 0 20 80 20 +weapon 640 zombiepanic/v100/640hud1 0 0 170 45 +weapon_s 640 zombiepanic/v100/640hud4 0 0 170 45 diff --git a/assets/sprites/zombiepanic/v100/weapon_handgrenade.txt b/assets/sprites/zombiepanic/v100/weapon_handgrenade.txt new file mode 100644 index 0000000..f235e68 --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_handgrenade.txt @@ -0,0 +1,7 @@ +6 +weapon 320 zombiepanic/v100/320hud1 160 0 80 20 +weapon_s 320 zombiepanic/v100/320hud1 160 20 80 20 +ammo 320 zombiepanic/v100/320hud2 36 34 18 18 +weapon 640 zombiepanic/v100/640hud3 0 0 170 45 +weapon_s 640 zombiepanic/v100/640hud6 0 0 170 45 +ammo 640 zombiepanic/v100/640hud7 48 96 24 24 diff --git a/assets/sprites/zombiepanic/v100/weapon_satchel.txt b/assets/sprites/zombiepanic/v100/weapon_satchel.txt new file mode 100644 index 0000000..086b042 --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_satchel.txt @@ -0,0 +1,7 @@ +6 +weapon 320 zombiepanic/v100/320hud1 160 40 80 20 +weapon_s 320 zombiepanic/v100/320hud1 160 60 80 20 +ammo 320 zombiepanic/v100/320hud2 54 34 18 18 +weapon 640 zombiepanic/v100/640hud3 0 45 170 45 +weapon_s 640 zombiepanic/v100/640hud6 0 45 170 45 +ammo 640 zombiepanic/v100/640hud7 72 96 24 24 diff --git a/assets/sprites/zombiepanic/v100/weapon_shotgun.txt b/assets/sprites/zombiepanic/v100/weapon_shotgun.txt new file mode 100644 index 0000000..6935680 --- /dev/null +++ b/assets/sprites/zombiepanic/v100/weapon_shotgun.txt @@ -0,0 +1,9 @@ +8 +weapon 320 zombiepanic/v100/320hud1 0 160 80 20 +weapon_s 320 zombiepanic/v100/320hud1 0 180 80 20 +ammo 320 zombiepanic/v100/320hud2 54 16 18 18 +weapon 640 zombiepanic/v100/640hud1 0 180 170 45 +weapon_s 640 zombiepanic/v100/640hud4 0 180 170 45 +ammo 640 zombiepanic/v100/640hud7 72 72 24 24 +crosshair 640 zombiepanic/v100/shotgun_xhair 0 0 64 64 +autoaim 640 zombiepanic/v100/shotgun_xhair 0 0 64 64 diff --git a/assets/sprites/zombiepanic/b1/weapon_swipe.txt b/assets/sprites/zombiepanic/v100/weapon_swipe.txt similarity index 56% rename from assets/sprites/zombiepanic/b1/weapon_swipe.txt rename to assets/sprites/zombiepanic/v100/weapon_swipe.txt index 11e8f3f..1a4d312 100644 --- a/assets/sprites/zombiepanic/b1/weapon_swipe.txt +++ b/assets/sprites/zombiepanic/v100/weapon_swipe.txt @@ -1,4 +1,4 @@ 3 weapon 640 640hud2 0 90 170 45 weapon_s 640 640hud5 0 90 170 45 -ammo 640 zombiepanic/b1/640zombiehead 0 0 56 300 +ammo 640 zombiepanic/v100/640zombiehead 0 0 56 300 diff --git a/package.json b/package.json index 2df1cfe..c673f83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zombiepanic", - "version": "0.9.5", + "version": "1.0.0", "description": "Zombie Panic Mod", "scripts": { "gulp": "gulp", diff --git a/sdk/examples/maps/zpo_test.map b/sdk/examples/maps/zpo_test.map new file mode 100644 index 0000000..31cf5d0 --- /dev/null +++ b/sdk/examples/maps/zpo_test.map @@ -0,0 +1,2629 @@ +{ +"classname" "worldspawn" +"defaultteam" "0" +"newunit" "0" +"gametitle" "0" +"startdark" "0" +"MaxRange" "4096" +"sounds" "1" +"skyname" "dusk" +"mapversion" "220" +"wad" "halflife.wad;decals.wad" +"_generator" "J.A.C.K. 1.1.1064 (vpHalfLife)" +{ +( 0 128 0 ) ( 0 128 -16 ) ( 0 -128 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -128 0 ) ( -256 -128 -16 ) ( -256 128 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -128 0 ) ( 0 -128 -16 ) ( -256 -128 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 128 0 ) ( -256 128 -16 ) ( 0 128 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -128 0 ) ( -256 -128 0 ) ( 0 128 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -256 128 -16 ) ( -256 -128 -16 ) ( 0 128 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -256 128 128 ) ( -256 128 0 ) ( -256 144 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 144 128 ) ( 0 144 0 ) ( 0 128 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 144 128 ) ( -256 144 0 ) ( 0 144 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 128 128 ) ( 0 128 0 ) ( -256 128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 128 128 ) ( -256 128 128 ) ( 0 144 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -256 144 0 ) ( -256 128 0 ) ( 0 144 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -256 -144 128 ) ( -256 -144 0 ) ( -256 -128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -128 128 ) ( 0 -128 0 ) ( 0 -144 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -128 128 ) ( -256 -128 0 ) ( 0 -128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -144 128 ) ( 0 -144 0 ) ( -256 -144 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -144 128 ) ( -256 -144 128 ) ( 0 -128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( -256 -128 0 ) ( -256 -144 0 ) ( 0 -128 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 32 64 128 ) ( 32 64 96 ) ( 32 -64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -64 128 ) ( 0 -64 96 ) ( 0 64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -64 128 ) ( 32 -64 96 ) ( 0 -64 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 64 128 ) ( 0 64 96 ) ( 32 64 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 64 96 ) ( 0 -64 96 ) ( 32 64 96 ) C1A3WALL01 [ -0 -1 0 0 ] [ -1 0 0 0 ] 90 1 1 +( 32 -64 128 ) ( 0 -64 128 ) ( 32 64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 0 128 144 ) ( 0 128 128 ) ( 0 -128 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( -256 -128 144 ) ( -256 -128 128 ) ( -256 128 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( 0 -128 144 ) ( 0 -128 128 ) ( -256 -128 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 -0 ] 0 1 1 +( -256 128 144 ) ( -256 128 128 ) ( 0 128 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 -0 ] 0 1 1 +( -256 128 128 ) ( -256 -128 128 ) ( 0 128 128 ) CRETE3_CEIL02A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 0 -128 144 ) ( -256 -128 144 ) ( 0 128 144 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 32 -64 128 ) ( 32 -64 0 ) ( 32 -128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -128 128 ) ( 0 -128 0 ) ( 0 -64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -128 128 ) ( 32 -128 0 ) ( 0 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -64 128 ) ( 0 -64 0 ) ( 32 -64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -64 0 ) ( 0 -128 0 ) ( 32 -64 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 -128 128 ) ( 0 -128 128 ) ( 32 -64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 0 64 128 ) ( 0 64 0 ) ( 0 128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 128 128 ) ( 32 128 0 ) ( 32 64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 128 128 ) ( 0 128 0 ) ( 32 128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 64 128 ) ( 32 64 0 ) ( 0 64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 64 128 ) ( 0 64 128 ) ( 32 128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 0 128 0 ) ( 0 64 0 ) ( 32 128 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 32 64 0 ) ( 32 64 -16 ) ( 32 -64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -64 0 ) ( 0 -64 -16 ) ( 0 64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -64 0 ) ( 32 -64 -16 ) ( 0 -64 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 64 0 ) ( 0 64 -16 ) ( 32 64 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -64 0 ) ( 0 -64 0 ) ( 32 64 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 0 64 -16 ) ( 0 -64 -16 ) ( 32 64 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 288 384 144 ) ( 288 384 128 ) ( 288 -128 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( 32 -128 144 ) ( 32 -128 128 ) ( 32 384 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( 288 -128 144 ) ( 288 -128 128 ) ( 32 -128 144 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( 32 384 144 ) ( 32 384 128 ) ( 288 384 144 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( 32 384 128 ) ( 32 -128 128 ) ( 288 384 128 ) CRETE3_CEIL02A [ 1 0 0 -32 ] [ 0 -1 0 0 ] 0 1 1 +( 288 -128 144 ) ( 32 -128 144 ) ( 288 384 144 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 32 -128 0 ) ( 32 -128 -16 ) ( 32 384 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 384 0 ) ( 288 384 -16 ) ( 288 -128 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 0 ) ( 32 384 -16 ) ( 288 384 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -128 0 ) ( 288 -128 -16 ) ( 32 -128 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 -16 ) ( 32 -128 -16 ) ( 288 384 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 -128 0 ) ( 32 -128 0 ) ( 288 384 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 288 -128 128 ) ( 288 -128 0 ) ( 288 -160 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -160 128 ) ( 224 -160 0 ) ( 224 -128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -128 128 ) ( 224 -128 0 ) ( 288 -128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -160 128 ) ( 288 -160 0 ) ( 224 -160 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -160 128 ) ( 224 -128 128 ) ( 288 -160 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( 288 -128 0 ) ( 224 -128 0 ) ( 288 -160 0 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +} +{ +( 224 -128 128 ) ( 224 -128 96 ) ( 224 -160 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -160 128 ) ( 96 -160 96 ) ( 96 -128 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -128 128 ) ( 96 -128 96 ) ( 224 -128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -160 128 ) ( 224 -160 96 ) ( 96 -160 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -160 128 ) ( 96 -128 128 ) ( 224 -160 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( 224 -128 96 ) ( 96 -128 96 ) ( 224 -160 96 ) C1A3WALL01 [ -1 0 0 0 ] [ 0 1 0 0 ] 90 1 1 +} +{ +( 96 -128 128 ) ( 96 -128 0 ) ( 96 -160 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -160 128 ) ( 32 -160 0 ) ( 32 -128 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -128 128 ) ( 32 -128 0 ) ( 96 -128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -160 128 ) ( 96 -160 0 ) ( 32 -160 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -160 128 ) ( 32 -128 128 ) ( 96 -160 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( 96 -128 0 ) ( 32 -128 0 ) ( 96 -160 0 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +} +{ +( 96 -160 0 ) ( 96 -160 -16 ) ( 96 -128 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -128 0 ) ( 224 -128 -16 ) ( 224 -160 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -128 0 ) ( 96 -128 -16 ) ( 224 -128 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -160 0 ) ( 224 -160 -16 ) ( 96 -160 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -128 -16 ) ( 96 -160 -16 ) ( 224 -128 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +( 224 -160 0 ) ( 96 -160 0 ) ( 224 -128 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 288 -160 0 ) ( 288 -160 -16 ) ( 288 -416 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -416 0 ) ( 32 -416 -16 ) ( 32 -160 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -416 0 ) ( 288 -416 -16 ) ( 32 -416 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -160 0 ) ( 32 -160 -16 ) ( 288 -160 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -416 0 ) ( 32 -416 0 ) ( 288 -160 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 -160 -16 ) ( 32 -416 -16 ) ( 288 -160 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 32 -160 128 ) ( 32 -160 0 ) ( 32 -416 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 -416 128 ) ( 16 -416 0 ) ( 16 -160 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -416 128 ) ( 32 -416 0 ) ( 16 -416 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 -160 128 ) ( 16 -160 0 ) ( 32 -160 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 -160 0 ) ( 16 -416 0 ) ( 32 -160 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +( 32 -416 128 ) ( 16 -416 128 ) ( 32 -160 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 288 -416 128 ) ( 288 -416 0 ) ( 288 -160 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 304 -160 128 ) ( 304 -160 0 ) ( 304 -416 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -160 128 ) ( 288 -160 0 ) ( 304 -160 128 ) NULL [ -1 -0 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 304 -416 128 ) ( 304 -416 0 ) ( 288 -416 128 ) NULL [ -1 -0 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 304 -416 0 ) ( 304 -160 0 ) ( 288 -416 0 ) NULL [ -1 -0 0 16 ] [ -0 1 0 0 ] 0 1 1 +( 288 -160 128 ) ( 304 -160 128 ) ( 288 -416 128 ) NULL [ -1 -0 0 16 ] [ -0 1 0 0 ] 0 1 1 +} +{ +( 32 -160 128 ) ( 32 -160 144 ) ( 32 -416 128 ) NULL [ 0 -1 -0 -0 ] [ 0 -0 1 -0 ] 0 1 1 +( 288 -416 128 ) ( 288 -416 144 ) ( 288 -160 128 ) NULL [ 0 -1 -0 -0 ] [ 0 -0 1 -0 ] 0 1 1 +( 32 -416 128 ) ( 32 -416 144 ) ( 288 -416 128 ) NULL [ 1 0 0 -0 ] [ 0 -0 1 -0 ] 0 1 1 +( 288 -160 128 ) ( 288 -160 144 ) ( 32 -160 128 ) NULL [ 1 0 0 -0 ] [ 0 -0 1 -0 ] 0 1 1 +( 32 -416 144 ) ( 32 -160 144 ) ( 288 -416 144 ) NULL [ 1 0 0 -0 ] [ 0 1 0 0 ] 0 1 1 +( 288 -160 128 ) ( 32 -160 128 ) ( 288 -416 128 ) CRETE3_CEIL02A [ 1 0 0 0 ] [ 0 1 0 0 ] 0 1 1 +} +{ +( 32 288 32 ) ( 32 288 0 ) ( 32 176 32 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 16 176 32 ) ( 16 176 0 ) ( 16 288 32 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 32 176 32 ) ( 32 176 0 ) ( 16 176 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 288 32 ) ( 16 288 0 ) ( 32 288 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 288 0 ) ( 16 176 0 ) ( 32 288 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 176 32 ) ( 16 176 32 ) ( 32 288 32 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 16 352 128 ) ( 16 352 0 ) ( 16 384 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 128 ) ( 32 384 0 ) ( 32 352 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 384 128 ) ( 16 384 0 ) ( 32 384 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 352 128 ) ( 32 352 0 ) ( 16 352 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 352 128 ) ( 16 352 128 ) ( 32 384 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 16 384 0 ) ( 16 352 0 ) ( 32 384 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 32 288 128 ) ( 32 288 96 ) ( 32 176 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 16 176 128 ) ( 16 176 96 ) ( 16 288 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 32 176 128 ) ( 32 176 96 ) ( 16 176 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 288 128 ) ( 16 288 96 ) ( 32 288 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 288 96 ) ( 16 176 96 ) ( 32 288 96 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 176 128 ) ( 16 176 128 ) ( 32 288 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 16 160 128 ) ( 16 160 0 ) ( 16 176 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 32 176 128 ) ( 32 176 0 ) ( 32 160 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 16 176 128 ) ( 16 176 0 ) ( 32 176 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 160 128 ) ( 32 160 0 ) ( 16 160 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 160 128 ) ( 16 160 128 ) ( 32 176 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 16 176 0 ) ( 16 160 0 ) ( 32 176 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 16 384 0 ) ( 16 384 -16 ) ( 16 160 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 160 0 ) ( -176 160 -16 ) ( -176 384 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 0 ) ( 16 160 -16 ) ( -176 160 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 0 ) ( -176 384 -16 ) ( 16 384 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 0 ) ( -176 160 0 ) ( 16 384 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -176 384 -16 ) ( -176 160 -16 ) ( 16 384 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 16 288 128 ) ( 16 288 0 ) ( 16 304 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 32 304 128 ) ( 32 304 0 ) ( 32 288 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 16 304 128 ) ( 16 304 0 ) ( 32 304 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 288 128 ) ( 32 288 0 ) ( 16 288 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 288 128 ) ( 16 288 128 ) ( 32 304 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 16 304 0 ) ( 16 288 0 ) ( 32 304 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 16 304 128 ) ( 16 304 80 ) ( 16 352 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 32 352 128 ) ( 32 352 80 ) ( 32 304 128 ) C1A3WALL01 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 16 352 128 ) ( 16 352 80 ) ( 32 352 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 304 128 ) ( 32 304 80 ) ( 16 304 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 304 128 ) ( 16 304 128 ) ( 32 352 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 16 352 80 ) ( 16 304 80 ) ( 32 352 80 ) C1A3WALL01 [ -0 -1 0 0 ] [ -1 0 0 0 ] 90 1 1 +} +{ +( 16 304 0 ) ( 16 304 -16 ) ( 16 352 0 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 352 0 ) ( 32 352 -16 ) ( 32 304 0 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 352 0 ) ( 16 352 -16 ) ( 32 352 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 304 0 ) ( 32 304 -16 ) ( 16 304 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 352 -16 ) ( 16 304 -16 ) ( 32 352 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 304 0 ) ( 16 304 0 ) ( 32 352 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 288 64 128 ) ( 288 64 0 ) ( 288 128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 128 128 ) ( 320 128 0 ) ( 320 64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 128 128 ) ( 288 128 0 ) ( 320 128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 64 128 ) ( 320 64 0 ) ( 288 64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 64 128 ) ( 288 64 128 ) ( 320 128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 128 0 ) ( 288 64 0 ) ( 320 128 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 320 -64 128 ) ( 320 -64 0 ) ( 320 -128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -128 128 ) ( 288 -128 0 ) ( 288 -64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 -128 128 ) ( 320 -128 0 ) ( 288 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -64 128 ) ( 288 -64 0 ) ( 320 -64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -64 0 ) ( 288 -128 0 ) ( 320 -64 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 320 -128 128 ) ( 288 -128 128 ) ( 320 -64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 320 64 128 ) ( 320 64 96 ) ( 320 -64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -64 128 ) ( 288 -64 96 ) ( 288 64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 -64 128 ) ( 320 -64 96 ) ( 288 -64 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 64 128 ) ( 288 64 96 ) ( 320 64 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 64 96 ) ( 288 -64 96 ) ( 320 64 96 ) C1A3WALL01 [ -0 -1 0 0 ] [ -1 0 0 0 ] 90 1 1 +( 320 -64 128 ) ( 288 -64 128 ) ( 320 64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 320 64 0 ) ( 320 64 -16 ) ( 320 -64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -64 0 ) ( 288 -64 -16 ) ( 288 64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 -64 0 ) ( 320 -64 -16 ) ( 288 -64 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 64 0 ) ( 288 64 -16 ) ( 320 64 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 -64 0 ) ( 288 -64 0 ) ( 320 64 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 64 -16 ) ( 288 -64 -16 ) ( 320 64 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 576 128 0 ) ( 576 128 -16 ) ( 576 -128 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 -128 0 ) ( 320 -128 -16 ) ( 320 128 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 0 ) ( 576 -128 -16 ) ( 320 -128 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 128 0 ) ( 320 128 -16 ) ( 576 128 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 0 ) ( 320 -128 0 ) ( 576 128 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 320 128 -16 ) ( 320 -128 -16 ) ( 576 128 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 64 0 ) ( 608 64 -16 ) ( 608 -64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -64 0 ) ( 576 -64 -16 ) ( 576 64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -64 0 ) ( 608 -64 -16 ) ( 576 -64 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 64 0 ) ( 576 64 -16 ) ( 608 64 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -64 0 ) ( 576 -64 0 ) ( 608 64 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 576 64 -16 ) ( 576 -64 -16 ) ( 608 64 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 608 -64 128 ) ( 608 -64 0 ) ( 608 -128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 128 ) ( 576 -128 0 ) ( 576 -64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -128 128 ) ( 608 -128 0 ) ( 576 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -64 128 ) ( 576 -64 0 ) ( 608 -64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -64 0 ) ( 576 -128 0 ) ( 608 -64 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 -128 128 ) ( 576 -128 128 ) ( 608 -64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 64 128 ) ( 608 64 96 ) ( 608 -64 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -64 128 ) ( 576 -64 96 ) ( 576 64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -64 128 ) ( 608 -64 96 ) ( 576 -64 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 64 128 ) ( 576 64 96 ) ( 608 64 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 64 96 ) ( 576 -64 96 ) ( 608 64 96 ) C1A3WALL01 [ 0.0174524 -0.999848 0 0 ] [ -0.999848 -0.0174524 0 0 ] 89 1 1 +( 608 -64 128 ) ( 576 -64 128 ) ( 608 64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 576 64 128 ) ( 576 64 0 ) ( 576 128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 128 128 ) ( 608 128 0 ) ( 608 64 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 128 128 ) ( 576 128 0 ) ( 608 128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 64 128 ) ( 608 64 0 ) ( 576 64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 64 128 ) ( 576 64 128 ) ( 608 128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 576 128 0 ) ( 576 64 0 ) ( 608 128 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 864 384 0 ) ( 864 384 -16 ) ( 864 -384 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -384 0 ) ( 608 -384 -16 ) ( 608 384 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 0 ) ( 864 -384 -16 ) ( 608 -384 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 384 0 ) ( 608 384 -16 ) ( 864 384 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 0 ) ( 608 -384 0 ) ( 864 384 0 ) OUT_SND2C [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 384 -16 ) ( 608 -384 -16 ) ( 864 384 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 320 -144 128 ) ( 320 -144 0 ) ( 320 -128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 128 ) ( 576 -128 0 ) ( 576 -144 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 -128 128 ) ( 320 -128 0 ) ( 576 -128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -144 128 ) ( 576 -144 0 ) ( 320 -144 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -144 128 ) ( 320 -144 128 ) ( 576 -128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( 320 -128 0 ) ( 320 -144 0 ) ( 576 -128 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 320 128 128 ) ( 320 128 0 ) ( 320 144 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 144 128 ) ( 576 144 0 ) ( 576 128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 144 128 ) ( 320 144 0 ) ( 576 144 128 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 128 128 ) ( 576 128 0 ) ( 320 128 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 128 0 ) ( 576 144 0 ) ( 320 128 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( 320 144 128 ) ( 576 144 128 ) ( 320 128 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 576 128 144 ) ( 576 128 128 ) ( 576 -128 144 ) NULL [ 0 1 0 1 ] [ 0 0 -1 -0 ] 0 1 1 +( 320 -128 144 ) ( 320 -128 128 ) ( 320 128 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 -0 ] 0 1 1 +( 576 -128 144 ) ( 576 -128 128 ) ( 320 -128 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 -0 ] 0 1 1 +( 320 128 144 ) ( 320 128 128 ) ( 576 128 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 -0 ] 0 1 1 +( 320 128 128 ) ( 320 -128 128 ) ( 576 128 128 ) CRETE3_CEIL02A [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 576 -128 144 ) ( 320 -128 144 ) ( 576 128 144 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 992 256 128 ) ( 992 256 256 ) ( 992 384 128 ) NULL [ -0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 256 128 ) ( 864 256 256 ) ( 992 256 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 384 128 ) ( 896 256 128 ) ( 992 384 128 ) NULL [ -1 -0 -0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 992 384 128 ) ( 992 256 256 ) ( 928 384 128 ) NULL [ -1 0 -0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 896 256 128 ) ( 928 384 128 ) ( 864 256 256 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 384 256 ) ( 992 384 128 ) ( 992 256 256 ) NULL [ -0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 384 128 ) ( 992 384 256 ) ( 928 384 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 256 256 ) ( 928 384 256 ) ( 992 256 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 928 384 128 ) ( 864 256 256 ) ( 992 384 128 ) NULL [ 1 -0 0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 928 384 256 ) ( 864 256 256 ) ( 928 384 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 256 128 ) ( 992 384 128 ) ( 992 256 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 256 0 ) ( 896 256 128 ) ( 992 256 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 256 128 ) ( 928 384 128 ) ( 992 256 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 256 0 ) ( 992 384 128 ) ( 864 256 0 ) NULL [ -1 0 0 0 ] [ -0 -0.707107 -0.707107 0 ] 0 1 1 +( 896 256 128 ) ( 864 256 0 ) ( 928 384 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 384 0 ) ( 992 256 0 ) ( 992 384 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 928 384 128 ) ( 928 384 0 ) ( 992 384 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 256 0 ) ( 992 384 0 ) ( 864 256 0 ) NULL [ -1 -0 -0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 864 256 0 ) ( 928 384 128 ) ( 992 256 0 ) NULL [ 1 0 0 0 ] [ 0 -0.707107 -0.707107 0 ] 0 1 1 +( 928 384 0 ) ( 928 384 128 ) ( 864 256 0 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 128 0 ) ( 992 128 128 ) ( 992 256 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 128 128 ) ( 992 128 0 ) ( 896 128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 256 0 ) ( 864 128 0 ) ( 992 256 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 896 128 128 ) ( 864 256 0 ) ( 992 128 128 ) NULL [ -1 0 -0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 864 128 0 ) ( 864 256 0 ) ( 896 128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 256 128 ) ( 992 256 0 ) ( 992 128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 256 128 ) ( 864 256 0 ) ( 992 256 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 128 128 ) ( 896 256 128 ) ( 992 128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 128 128 ) ( 992 256 0 ) ( 896 128 128 ) NULL [ 1 0 0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 896 256 128 ) ( 896 128 128 ) ( 864 256 0 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 128 256 ) ( 992 256 256 ) ( 992 128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 128 128 ) ( 864 128 256 ) ( 992 128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 256 256 ) ( 992 128 256 ) ( 864 256 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 256 256 ) ( 896 128 128 ) ( 992 256 256 ) NULL [ -1 0 0 0 ] [ -0 -0.707107 -0.707107 0 ] 0 1 1 +( 864 128 256 ) ( 896 128 128 ) ( 864 256 256 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 256 128 ) ( 992 128 128 ) ( 992 256 256 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 864 256 256 ) ( 896 256 128 ) ( 992 256 256 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 256 128 ) ( 896 128 128 ) ( 992 256 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 256 256 ) ( 992 128 128 ) ( 864 256 256 ) NULL [ 1 0 0 0 ] [ 0 -0.707107 -0.707107 0 ] 0 1 1 +( 896 256 128 ) ( 864 256 256 ) ( 896 128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 128 256 ) ( 992 128 128 ) ( 992 0 256 ) NULL [ -0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 128 128 ) ( 992 128 256 ) ( 896 128 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 0 256 ) ( 864 128 256 ) ( 992 0 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 896 128 128 ) ( 928 0 256 ) ( 992 128 128 ) NULL [ 1 -0 0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 864 128 256 ) ( 928 0 256 ) ( 896 128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 128 0 ) ( 992 0 0 ) ( 992 128 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 896 128 128 ) ( 864 128 0 ) ( 992 128 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 0 0 ) ( 992 128 0 ) ( 864 0 0 ) NULL [ -1 -0 -0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 864 0 0 ) ( 896 128 128 ) ( 992 0 0 ) NULL [ 1 0 0 0 ] [ 0 -0.707107 -0.707107 0 ] 0 1 1 +( 864 128 0 ) ( 896 128 128 ) ( 864 0 0 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -128 0 ) ( 992 -128 128 ) ( 992 0 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 -128 128 ) ( 992 -128 0 ) ( 896 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 0 0 ) ( 864 -128 0 ) ( 992 0 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 896 -128 128 ) ( 864 0 0 ) ( 992 -128 128 ) NULL [ -1 0 -0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 864 -128 0 ) ( 864 0 0 ) ( 896 -128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -128 256 ) ( 992 0 256 ) ( 992 -128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 -128 128 ) ( 928 -128 256 ) ( 992 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 0 256 ) ( 992 -128 256 ) ( 928 0 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 928 0 256 ) ( 896 -128 128 ) ( 992 0 256 ) NULL [ -1 0 0 0 ] [ -0 -0.707107 -0.707107 0 ] 0 1 1 +( 928 -128 256 ) ( 896 -128 128 ) ( 928 0 256 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 0 128 ) ( 992 -128 128 ) ( 992 0 256 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 928 0 256 ) ( 928 0 128 ) ( 992 0 256 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 0 128 ) ( 896 -128 128 ) ( 992 0 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 0 256 ) ( 992 -128 128 ) ( 928 0 256 ) NULL [ 1 0 0 0 ] [ 0 -0.707107 -0.707107 0 ] 0 1 1 +( 928 0 128 ) ( 928 0 256 ) ( 896 -128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 0 128 ) ( 992 0 0 ) ( 992 -128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 0 128 ) ( 864 0 0 ) ( 992 0 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 -128 128 ) ( 928 0 128 ) ( 992 -128 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 -128 128 ) ( 992 0 0 ) ( 896 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 928 0 128 ) ( 896 -128 128 ) ( 864 0 0 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 0 128 ) ( 992 0 256 ) ( 992 128 128 ) NULL [ -0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 0 128 ) ( 928 0 256 ) ( 992 0 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 128 128 ) ( 928 0 128 ) ( 992 128 128 ) NULL [ -1 -0 -0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 992 128 128 ) ( 992 0 256 ) ( 896 128 128 ) NULL [ -1 0 -0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 928 0 128 ) ( 896 128 128 ) ( 928 0 256 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 0 128 ) ( 992 128 128 ) ( 992 0 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 0 0 ) ( 928 0 128 ) ( 992 0 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 0 128 ) ( 896 128 128 ) ( 992 0 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 0 0 ) ( 992 128 128 ) ( 864 0 0 ) NULL [ -1 0 0 0 ] [ -0 -0.707107 -0.707107 0 ] 0 1 1 +( 928 0 128 ) ( 864 0 0 ) ( 896 128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -384 0 ) ( 992 -384 128 ) ( 992 -256 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 0 ) ( 864 -256 0 ) ( 864 -384 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 -384 128 ) ( 992 -384 0 ) ( 864 -384 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -256 0 ) ( 864 -384 0 ) ( 992 -256 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 -384 128 ) ( 864 -256 0 ) ( 992 -384 128 ) NULL [ -1 0 -0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +} +{ +( 992 -256 128 ) ( 992 -256 0 ) ( 992 -384 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -256 128 ) ( 864 -256 0 ) ( 992 -256 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 128 ) ( 928 -256 128 ) ( 992 -384 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 -384 128 ) ( 992 -256 0 ) ( 864 -384 128 ) NULL [ 1 0 0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 928 -256 128 ) ( 864 -384 128 ) ( 864 -256 0 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -384 256 ) ( 992 -256 256 ) ( 992 -384 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 128 ) ( 864 -384 256 ) ( 992 -384 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 -256 256 ) ( 992 -384 256 ) ( 928 -256 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 928 -256 256 ) ( 864 -384 128 ) ( 992 -256 256 ) NULL [ -1 0 0 0 ] [ -0 -0.707107 -0.707107 0 ] 0 1 1 +( 864 -384 256 ) ( 864 -384 128 ) ( 928 -256 256 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -256 128 ) ( 992 -384 128 ) ( 992 -256 256 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 928 -256 256 ) ( 928 -256 128 ) ( 992 -256 256 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -256 128 ) ( 864 -384 128 ) ( 992 -256 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 -256 256 ) ( 992 -384 128 ) ( 928 -256 256 ) NULL [ 1 0 0 0 ] [ 0 -0.707107 -0.707107 0 ] 0 1 1 +( 928 -256 128 ) ( 928 -256 256 ) ( 864 -384 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -256 128 ) ( 992 -256 256 ) ( 992 -128 128 ) NULL [ -0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -256 128 ) ( 928 -256 256 ) ( 992 -256 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 896 -128 128 ) ( 928 -256 128 ) ( 992 -128 128 ) NULL [ -1 -0 -0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 992 -128 128 ) ( 992 -256 256 ) ( 896 -128 128 ) NULL [ -1 0 -0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 928 -256 128 ) ( 896 -128 128 ) ( 928 -256 256 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -128 256 ) ( 992 -128 128 ) ( 992 -256 256 ) NULL [ -0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 -128 128 ) ( 992 -128 256 ) ( 896 -128 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -256 256 ) ( 928 -128 256 ) ( 992 -256 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 896 -128 128 ) ( 928 -256 256 ) ( 992 -128 128 ) NULL [ 1 -0 0 0 ] [ 0 0.707107 -0.707107 0 ] 0 1 1 +( 928 -128 256 ) ( 928 -256 256 ) ( 896 -128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -128 0 ) ( 992 -256 0 ) ( 992 -128 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 896 -128 128 ) ( 864 -128 0 ) ( 992 -128 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 -256 0 ) ( 992 -128 0 ) ( 864 -256 0 ) NULL [ -1 -0 -0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 864 -256 0 ) ( 896 -128 128 ) ( 992 -256 0 ) NULL [ 1 0 0 0 ] [ 0 -0.707107 -0.707107 0 ] 0 1 1 +( 864 -128 0 ) ( 896 -128 128 ) ( 864 -256 0 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 -256 128 ) ( 992 -128 128 ) ( 992 -256 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -256 0 ) ( 928 -256 128 ) ( 992 -256 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -256 128 ) ( 896 -128 128 ) ( 992 -256 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 -256 0 ) ( 992 -128 128 ) ( 864 -256 0 ) NULL [ -1 0 0 0 ] [ -0 -0.707107 -0.707107 0 ] 0 1 1 +( 928 -256 128 ) ( 864 -256 0 ) ( 896 -128 128 ) OUT_RK3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 608 384 0 ) ( 608 384 -16 ) ( 608 640 0 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 640 0 ) ( 1376 640 -16 ) ( 1376 384 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 384 0 ) ( 1376 384 -16 ) ( 608 384 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 640 0 ) ( 608 640 -16 ) ( 1376 640 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 384 0 ) ( 608 640 0 ) ( 1376 384 0 ) OUT_SND2C [ 1 0 0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 1376 640 -16 ) ( 608 640 -16 ) ( 1376 384 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 1376 768 128 ) ( 1376 768 0 ) ( 1376 640 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 768 0 ) ( 1376 768 128 ) ( 1248 768 0 ) NULL [ -1 0 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 1376 640 0 ) ( 1248 640 0 ) ( 1376 640 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 640 0 ) ( 1376 640 0 ) ( 1248 768 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1376 640 128 ) ( 1248 640 0 ) ( 1376 768 128 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 1376 640 128 ) ( 1376 640 256 ) ( 1376 768 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 1376 768 256 ) ( 1248 768 256 ) ( 1376 768 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 768 256 ) ( 1376 768 256 ) ( 1248 704 256 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1248 704 256 ) ( 1376 640 128 ) ( 1248 768 256 ) NULL [ 0 -1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 1376 640 256 ) ( 1376 640 128 ) ( 1248 704 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1248 704 256 ) ( 1248 704 128 ) ( 1248 768 256 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 768 128 ) ( 1376 768 128 ) ( 1248 768 256 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 704 128 ) ( 1376 640 128 ) ( 1248 768 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1248 768 256 ) ( 1376 768 128 ) ( 1248 704 256 ) NULL [ 0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 1248 704 128 ) ( 1248 704 256 ) ( 1376 640 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1248 704 128 ) ( 1248 704 256 ) ( 1248 768 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 1248 768 128 ) ( 1248 768 256 ) ( 1120 768 128 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1120 672 128 ) ( 1248 704 128 ) ( 1120 768 128 ) NULL [ -1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1120 768 128 ) ( 1248 768 256 ) ( 1120 672 128 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 1248 704 128 ) ( 1120 672 128 ) ( 1248 704 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1120 672 128 ) ( 1120 704 256 ) ( 1120 768 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 1120 768 256 ) ( 992 768 256 ) ( 1120 768 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 768 256 ) ( 1120 768 256 ) ( 992 704 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 704 256 ) ( 1120 672 128 ) ( 992 768 256 ) NULL [ 0 -1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 1120 704 256 ) ( 1120 672 128 ) ( 992 704 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1248 640 0 ) ( 1248 704 128 ) ( 1248 768 0 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 1248 768 128 ) ( 1120 768 128 ) ( 1248 768 0 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 704 128 ) ( 1120 672 128 ) ( 1248 768 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1248 768 0 ) ( 1120 768 128 ) ( 1248 640 0 ) NULL [ 0 -1 -0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 1248 704 128 ) ( 1248 640 0 ) ( 1120 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1120 768 128 ) ( 1120 768 256 ) ( 1120 672 128 ) NULL [ -0 -1 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1120 768 256 ) ( 1120 768 128 ) ( 1248 768 256 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 704 256 ) ( 1120 704 256 ) ( 1248 768 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1120 672 128 ) ( 1248 704 256 ) ( 1120 768 128 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 1120 704 256 ) ( 1248 704 256 ) ( 1120 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1248 704 128 ) ( 1248 640 0 ) ( 1248 768 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 768 128 ) ( 1248 768 0 ) ( 1376 768 128 ) NULL [ -1 0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 640 128 ) ( 1248 704 128 ) ( 1376 768 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1376 768 128 ) ( 1248 768 0 ) ( 1376 640 128 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 1248 704 128 ) ( 1376 640 128 ) ( 1248 640 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1120 768 128 ) ( 1120 768 0 ) ( 1120 672 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1120 768 0 ) ( 1120 768 128 ) ( 992 768 0 ) NULL [ -1 0 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 992 640 0 ) ( 1120 640 0 ) ( 992 768 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1120 672 128 ) ( 992 640 0 ) ( 1120 768 128 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 1120 640 0 ) ( 992 640 0 ) ( 1120 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 1120 672 128 ) ( 1120 640 0 ) ( 1120 768 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1120 768 0 ) ( 1248 768 0 ) ( 1120 768 128 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1248 768 0 ) ( 1120 768 0 ) ( 1248 640 0 ) NULL [ -1 0 0 0 ] [ -0 -1 0 0 ] 0 1 1 +( 1248 640 0 ) ( 1120 672 128 ) ( 1248 768 0 ) NULL [ -0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 1120 640 0 ) ( 1120 672 128 ) ( 1248 640 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 704 128 ) ( 992 640 0 ) ( 992 768 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 768 128 ) ( 992 768 0 ) ( 1120 768 128 ) NULL [ -1 0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1120 672 128 ) ( 992 704 128 ) ( 1120 768 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1120 768 128 ) ( 992 768 0 ) ( 1120 672 128 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 992 704 128 ) ( 1120 672 128 ) ( 992 640 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 768 128 ) ( 864 768 256 ) ( 864 672 128 ) NULL [ -0 -1 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 768 256 ) ( 864 768 128 ) ( 992 768 256 ) NULL [ -1 0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 704 256 ) ( 864 640 256 ) ( 992 768 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 672 128 ) ( 992 704 256 ) ( 864 768 128 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 864 640 256 ) ( 992 704 256 ) ( 864 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 672 128 ) ( 864 640 0 ) ( 864 768 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 768 0 ) ( 992 768 0 ) ( 864 768 128 ) NULL [ -1 0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 768 0 ) ( 864 768 0 ) ( 992 640 0 ) NULL [ -1 0 0 0 ] [ -0 -1 0 0 ] 0 1 1 +( 992 640 0 ) ( 864 672 128 ) ( 992 768 0 ) NULL [ -0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 864 640 0 ) ( 864 672 128 ) ( 992 640 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 768 128 ) ( 864 768 0 ) ( 864 672 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 768 0 ) ( 864 768 128 ) ( 736 768 0 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 640 0 ) ( 864 640 0 ) ( 736 768 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 672 128 ) ( 736 640 0 ) ( 864 768 128 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 864 640 0 ) ( 736 640 0 ) ( 864 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 704 128 ) ( 992 704 256 ) ( 992 768 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 992 768 128 ) ( 992 768 256 ) ( 864 768 128 ) NULL [ -1 0 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 864 672 128 ) ( 992 704 128 ) ( 864 768 128 ) NULL [ -1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 768 128 ) ( 992 768 256 ) ( 864 672 128 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 992 704 128 ) ( 864 672 128 ) ( 992 704 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 640 0 ) ( 992 704 128 ) ( 992 768 0 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 992 768 128 ) ( 864 768 128 ) ( 992 768 0 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 704 128 ) ( 864 672 128 ) ( 992 768 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 768 0 ) ( 864 768 128 ) ( 992 640 0 ) NULL [ 0 -1 -0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 992 704 128 ) ( 992 640 0 ) ( 864 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 992 704 256 ) ( 992 704 128 ) ( 992 768 256 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 768 128 ) ( 1120 768 128 ) ( 992 768 256 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 704 128 ) ( 1120 672 128 ) ( 992 768 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 992 768 256 ) ( 1120 768 128 ) ( 992 704 256 ) NULL [ 0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 992 704 128 ) ( 992 704 256 ) ( 1120 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 736 640 256 ) ( 736 672 128 ) ( 736 768 256 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 768 128 ) ( 864 768 128 ) ( 736 768 256 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 672 128 ) ( 864 672 128 ) ( 736 768 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 736 768 256 ) ( 864 768 128 ) ( 736 640 256 ) NULL [ 0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 736 672 128 ) ( 736 640 256 ) ( 864 672 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 672 128 ) ( 864 640 256 ) ( 864 768 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 864 768 256 ) ( 736 768 256 ) ( 864 768 128 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 768 256 ) ( 864 768 256 ) ( 736 640 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 736 640 256 ) ( 864 672 128 ) ( 736 768 256 ) NULL [ 0 -1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 864 640 256 ) ( 864 672 128 ) ( 736 640 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 608 768 128 ) ( 608 768 256 ) ( 608 640 128 ) NULL [ -0 -1 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 640 256 ) ( 736 640 256 ) ( 608 640 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 768 256 ) ( 608 768 128 ) ( 736 768 256 ) NULL [ -1 0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 640 256 ) ( 608 640 256 ) ( 736 768 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 640 128 ) ( 736 640 256 ) ( 608 768 128 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 736 640 0 ) ( 736 672 128 ) ( 736 768 0 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 736 768 128 ) ( 608 768 128 ) ( 736 768 0 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 672 128 ) ( 608 640 128 ) ( 736 768 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 736 768 0 ) ( 608 768 128 ) ( 736 640 0 ) NULL [ 0 -1 -0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 736 672 128 ) ( 736 640 0 ) ( 608 640 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 736 672 128 ) ( 736 640 256 ) ( 736 768 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 736 768 128 ) ( 736 768 256 ) ( 608 768 128 ) NULL [ -1 0 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 608 640 128 ) ( 736 672 128 ) ( 608 768 128 ) NULL [ -1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 768 128 ) ( 736 768 256 ) ( 608 640 128 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 736 672 128 ) ( 608 640 128 ) ( 736 640 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 608 640 128 ) ( 608 640 0 ) ( 608 768 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 768 0 ) ( 736 768 0 ) ( 608 768 128 ) NULL [ -1 0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 640 0 ) ( 608 640 128 ) ( 736 640 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 768 0 ) ( 608 768 0 ) ( 736 640 0 ) NULL [ -1 0 0 0 ] [ -0 -1 0 0 ] 0 1 1 +( 736 640 0 ) ( 608 640 128 ) ( 736 768 0 ) NULL [ -0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 736 672 128 ) ( 736 640 0 ) ( 736 768 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 768 128 ) ( 736 768 0 ) ( 864 768 128 ) NULL [ -1 -0 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 672 128 ) ( 736 672 128 ) ( 864 768 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 768 128 ) ( 736 768 0 ) ( 864 672 128 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 736 672 128 ) ( 864 672 128 ) ( 736 640 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 256 0 ) ( 864 256 -16 ) ( 864 384 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 384 0 ) ( 864 384 -16 ) ( 928 384 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 384 0 ) ( 864 256 0 ) ( 864 384 0 ) OUT_SND2C [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 384 -16 ) ( 864 256 -16 ) ( 928 384 -16 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 928 384 0 ) ( 928 384 -16 ) ( 864 256 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 -416 128 ) ( 864 -416 256 ) ( 864 -384 128 ) NULL [ 0 1 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 864 -416 256 ) ( 864 -416 128 ) ( 736 -416 256 ) NULL [ 1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 256 ) ( 736 -384 256 ) ( 864 -384 128 ) OUT_RK3 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -384 256 ) ( 864 -384 256 ) ( 736 -416 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 -384 128 ) ( 736 -384 256 ) ( 864 -416 128 ) NULL [ 0 -1 -0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 608 -416 128 ) ( 608 -384 256 ) ( 608 -416 256 ) NULL [ -0 -1 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -416 256 ) ( 736 -416 256 ) ( 608 -416 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 256 ) ( 608 -416 256 ) ( 736 -384 256 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 -384 256 ) ( 608 -416 128 ) ( 736 -384 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -384 256 ) ( 608 -416 128 ) ( 736 -416 256 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 736 -384 256 ) ( 736 -416 128 ) ( 736 -416 256 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 608 -416 128 ) ( 736 -416 256 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 736 -384 256 ) ( 608 -416 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 256 ) ( 608 -416 128 ) ( 736 -384 256 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 736 -416 128 ) ( 736 -384 256 ) ( 736 -416 256 ) NULL [ -0 -1 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 736 -416 256 ) ( 864 -416 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 128 ) ( 736 -416 128 ) ( 864 -416 128 ) NULL [ -1 -0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 864 -416 128 ) ( 736 -416 256 ) ( 864 -384 128 ) NULL [ -0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +( 736 -416 128 ) ( 864 -384 128 ) ( 736 -384 256 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 864 -384 128 ) ( 864 -384 0 ) ( 864 -416 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 864 -384 0 ) ( 864 -384 128 ) ( 736 -384 0 ) OUT_RK3 [ -1 0 0 0 ] [ -0 0 -1 0 ] 0 1 1 +( 864 -416 0 ) ( 736 -416 0 ) ( 864 -416 128 ) NULL [ 1 0 0 0 ] [ 0 -0 -1 0 ] 0 1 1 +( 736 -416 0 ) ( 864 -416 0 ) ( 736 -384 0 ) NULL [ -1 -0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 736 -384 0 ) ( 864 -384 128 ) ( 736 -416 0 ) NULL [ -0 -1 -0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 736 -384 0 ) ( 736 -416 128 ) ( 736 -416 0 ) NULL [ -0 -1 -0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 864 -416 128 ) ( 736 -416 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 864 -384 128 ) ( 864 -416 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 736 -416 0 ) ( 864 -416 128 ) ( 736 -384 0 ) NULL [ 0 1 0 0 ] [ -0.707107 0 -0.707107 0 ] 0 1 1 +( 736 -416 128 ) ( 736 -384 0 ) ( 864 -384 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 608 -416 128 ) ( 608 -416 0 ) ( 608 -384 0 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -416 0 ) ( 608 -416 128 ) ( 736 -416 0 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -384 0 ) ( 608 -384 0 ) ( 736 -416 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 -384 0 ) ( 736 -384 0 ) ( 608 -416 128 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -416 128 ) ( 736 -384 0 ) ( 736 -416 0 ) NULL [ 0 1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 736 -416 128 ) ( 736 -384 0 ) ( 736 -416 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 736 -416 0 ) ( 608 -416 128 ) NULL [ 1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 736 -416 128 ) ( 608 -416 128 ) ( 736 -384 0 ) OUT_RK3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -416 128 ) ( 736 -416 0 ) ( 736 -384 0 ) NULL [ 0 -1 0 0 ] [ 0.707107 0 -0.707107 0 ] 0 1 1 +} +{ +( 96 384 0 ) ( 96 384 -16 ) ( 96 416 0 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 416 0 ) ( 224 416 -16 ) ( 224 384 0 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 416 0 ) ( 96 416 -16 ) ( 224 416 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 384 0 ) ( 224 384 -16 ) ( 96 384 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 416 -16 ) ( 96 384 -16 ) ( 224 416 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( 224 384 0 ) ( 96 384 0 ) ( 224 416 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 96 416 128 ) ( 96 416 0 ) ( 96 384 128 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 128 ) ( 32 384 0 ) ( 32 416 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 416 128 ) ( 32 416 0 ) ( 96 416 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 384 128 ) ( 96 384 0 ) ( 32 384 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 128 ) ( 32 416 128 ) ( 96 384 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +( 96 416 0 ) ( 32 416 0 ) ( 96 384 0 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +} +{ +( 224 416 128 ) ( 224 416 96 ) ( 224 384 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 384 128 ) ( 96 384 96 ) ( 96 416 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 416 128 ) ( 96 416 96 ) ( 224 416 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 384 128 ) ( 224 384 96 ) ( 96 384 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 384 128 ) ( 96 416 128 ) ( 224 384 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +( 224 416 96 ) ( 96 416 96 ) ( 224 384 96 ) C1A3WALL01 [ -1 0 0 -4 ] [ 0 1 0 32 ] 90 1 1 +} +{ +( 288 416 128 ) ( 288 416 0 ) ( 288 384 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 384 128 ) ( 224 384 0 ) ( 224 416 128 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1 +( 224 416 128 ) ( 224 416 0 ) ( 288 416 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 384 128 ) ( 288 384 0 ) ( 224 384 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 384 128 ) ( 224 416 128 ) ( 288 384 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +( 288 416 0 ) ( 224 416 0 ) ( 288 384 0 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +} +{ +( 288 672 0 ) ( 288 672 -16 ) ( 288 416 0 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 416 0 ) ( -224 416 -16 ) ( -224 672 0 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 416 0 ) ( 288 416 -16 ) ( -224 416 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 672 0 ) ( -224 672 -16 ) ( 288 672 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 416 0 ) ( -224 416 0 ) ( 288 672 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -224 672 -16 ) ( -224 416 -16 ) ( 288 672 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -192 160 128 ) ( -192 160 0 ) ( -192 384 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 128 ) ( -176 384 0 ) ( -176 160 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -192 384 128 ) ( -192 384 0 ) ( -176 384 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 160 128 ) ( -176 160 0 ) ( -192 160 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 160 128 ) ( -192 160 128 ) ( -176 384 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( -192 384 0 ) ( -192 160 0 ) ( -176 384 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -176 144 128 ) ( -176 144 0 ) ( -176 160 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 128 ) ( 16 160 0 ) ( 16 144 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 160 128 ) ( -176 160 0 ) ( 16 160 128 ) C1A3WALL01 [ 1 0 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 16 144 128 ) ( 16 144 0 ) ( -176 144 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 144 128 ) ( -176 144 128 ) ( 16 160 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( -176 160 0 ) ( -176 144 0 ) ( 16 160 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 16 400 128 ) ( 16 400 0 ) ( 16 384 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 128 ) ( -176 384 0 ) ( -176 400 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 384 128 ) ( 16 384 0 ) ( -176 384 128 ) C1A3WALL01 [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 400 128 ) ( -176 400 0 ) ( 16 400 128 ) NULL [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 400 128 ) ( 16 400 128 ) ( -176 384 128 ) NULL [ -1 -0 0 0 ] [ -0 1 0 0 ] 0 1 1 +( 16 384 0 ) ( 16 400 0 ) ( -176 384 0 ) NULL [ -1 -0 0 0 ] [ -0 1 0 0 ] 0 1 1 +} +{ +( -224 400 128 ) ( -224 400 0 ) ( -224 416 128 ) NULL [ 0 -1 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 32 416 128 ) ( 32 416 0 ) ( 32 400 128 ) NULL [ 0 -1 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( -224 416 128 ) ( -224 416 0 ) ( 32 416 128 ) C1A3WALL01 [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 400 128 ) ( 32 400 0 ) ( -224 400 128 ) NULL [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 400 0 ) ( 32 416 0 ) ( -224 400 0 ) NULL [ -1 -0 0 0 ] [ -0 1 0 -16 ] 0 1 1 +( -224 416 128 ) ( 32 416 128 ) ( -224 400 128 ) NULL [ -1 -0 0 0 ] [ -0 1 0 -16 ] 0 1 1 +} +{ +( -176 160 144 ) ( -176 160 128 ) ( -176 384 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 384 144 ) ( 16 384 128 ) ( 16 160 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 144 ) ( -176 384 128 ) ( 16 384 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 144 ) ( 16 160 128 ) ( -176 160 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 144 ) ( -176 160 144 ) ( 16 384 144 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -176 384 128 ) ( -176 160 128 ) ( 16 384 128 ) CRETE3_CEIL02A [ 1 0 0 48 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 32 160 128 ) ( 32 160 0 ) ( 32 128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 128 128 ) ( 16 128 0 ) ( 16 160 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 128 128 ) ( 32 128 0 ) ( 16 128 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 128 ) ( 16 160 0 ) ( 32 160 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 0 ) ( 16 128 0 ) ( 32 160 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 128 128 ) ( 16 128 128 ) ( 32 160 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 320 384 128 ) ( 320 384 0 ) ( 320 144 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 144 128 ) ( 288 144 0 ) ( 288 384 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 144 128 ) ( 320 144 0 ) ( 288 144 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 384 128 ) ( 288 384 0 ) ( 320 384 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 384 0 ) ( 288 144 0 ) ( 320 384 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 320 144 128 ) ( 288 144 128 ) ( 320 384 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 288 128 128 ) ( 288 128 0 ) ( 288 144 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 144 128 ) ( 320 144 0 ) ( 320 128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 144 128 ) ( 288 144 0 ) ( 320 144 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 128 128 ) ( 320 128 0 ) ( 288 128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 128 128 ) ( 288 128 128 ) ( 320 144 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 144 0 ) ( 288 128 0 ) ( 320 144 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 288 416 128 ) ( 288 416 0 ) ( 288 672 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 672 128 ) ( 320 672 0 ) ( 320 416 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 672 128 ) ( 288 672 0 ) ( 320 672 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 320 416 128 ) ( 320 416 0 ) ( 288 416 128 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1 +( 320 416 128 ) ( 288 416 128 ) ( 320 672 128 ) NULL [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 672 0 ) ( 288 416 0 ) ( 320 672 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 288 672 144 ) ( 288 672 128 ) ( 288 416 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 416 144 ) ( -224 416 128 ) ( -224 672 144 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 416 144 ) ( 288 416 128 ) ( -224 416 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 672 144 ) ( -224 672 128 ) ( 288 672 144 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 672 128 ) ( -224 416 128 ) ( 288 672 128 ) CRETE3_CEIL02A [ 1 0 0 48 ] [ 0 -1 0 0 ] 0 1 1 +( 288 416 144 ) ( -224 416 144 ) ( 288 672 144 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -224 672 128 ) ( -224 672 0 ) ( -224 688 128 ) NULL [ 0 -1 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 288 688 128 ) ( 288 688 0 ) ( 288 672 128 ) NULL [ 0 -1 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( -224 688 128 ) ( -224 688 0 ) ( 288 688 128 ) NULL [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 672 128 ) ( 288 672 0 ) ( -224 672 128 ) C1A3WALL01 [ -1 -0 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 288 672 0 ) ( 288 688 0 ) ( -224 672 0 ) NULL [ -1 -0 0 0 ] [ -0 1 0 -16 ] 0 1 1 +( -224 688 128 ) ( 288 688 128 ) ( -224 672 128 ) NULL [ -1 -0 0 0 ] [ -0 1 0 -16 ] 0 1 1 +} +{ +( -224 672 128 ) ( -224 672 0 ) ( -224 416 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -240 416 128 ) ( -240 416 0 ) ( -240 672 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 416 128 ) ( -224 416 0 ) ( -240 416 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -240 672 128 ) ( -240 672 0 ) ( -224 672 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -240 672 0 ) ( -240 416 0 ) ( -224 672 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +( -224 416 128 ) ( -240 416 128 ) ( -224 672 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 -128 256 ) ( 608 -128 0 ) ( 608 -416 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -416 256 ) ( 576 -416 0 ) ( 576 -128 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -416 256 ) ( 608 -416 0 ) ( 576 -416 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 256 ) ( 576 -128 0 ) ( 608 -128 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 0 ) ( 576 -416 0 ) ( 608 -128 0 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 -416 256 ) ( 576 -416 256 ) ( 608 -128 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 768 256 ) ( 608 768 0 ) ( 608 128 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 128 256 ) ( 576 128 0 ) ( 576 768 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 128 256 ) ( 608 128 0 ) ( 576 128 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 768 256 ) ( 576 768 0 ) ( 608 768 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 768 0 ) ( 576 128 0 ) ( 608 768 0 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 128 256 ) ( 576 128 256 ) ( 608 768 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 128 256 ) ( 608 128 128 ) ( 608 -128 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 256 ) ( 576 -128 128 ) ( 576 128 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -128 256 ) ( 608 -128 128 ) ( 576 -128 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 128 256 ) ( 576 128 128 ) ( 608 128 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 128 128 ) ( 576 -128 128 ) ( 608 128 128 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 -128 256 ) ( 576 -128 256 ) ( 608 128 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 1376 384 256 ) ( 1376 384 0 ) ( 1376 352 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 352 256 ) ( 992 352 0 ) ( 992 384 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 352 256 ) ( 1376 352 0 ) ( 992 352 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 384 256 ) ( 992 384 0 ) ( 1376 384 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 992 384 0 ) ( 992 352 0 ) ( 1376 384 0 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1376 352 256 ) ( 992 352 256 ) ( 1376 384 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 1376 384 256 ) ( 1376 384 0 ) ( 1376 640 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1408 640 256 ) ( 1408 640 0 ) ( 1408 384 256 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 640 256 ) ( 1376 640 0 ) ( 1408 640 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1408 384 256 ) ( 1408 384 0 ) ( 1376 384 256 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1408 384 256 ) ( 1376 384 256 ) ( 1408 640 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 1376 640 0 ) ( 1376 384 0 ) ( 1408 640 0 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 384 288 ) ( 608 384 256 ) ( 608 704 288 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 704 288 ) ( 1376 704 256 ) ( 1376 384 288 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 704 288 ) ( 608 704 256 ) ( 1376 704 288 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 384 288 ) ( 1376 384 256 ) ( 608 384 288 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 1376 384 288 ) ( 608 384 288 ) ( 1376 704 288 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 704 256 ) ( 608 384 256 ) ( 1376 704 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 -384 288 ) ( 608 -384 256 ) ( 608 384 288 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 384 288 ) ( 928 384 256 ) ( 928 -384 288 ) SKY [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 384 288 ) ( 608 384 256 ) ( 928 384 288 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -384 288 ) ( 928 -384 256 ) ( 608 -384 288 ) SKY [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 928 -384 288 ) ( 608 -384 288 ) ( 928 384 288 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 384 256 ) ( 608 -384 256 ) ( 928 384 256 ) SKY [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 608 64 96 ) ( 608 64 0 ) ( 608 -64 96 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -64 96 ) ( 576 -64 0 ) ( 576 64 96 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 608 -64 96 ) ( 608 -64 0 ) ( 576 -64 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 64 96 ) ( 576 64 0 ) ( 608 64 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 64 0 ) ( 576 -64 0 ) ( 608 64 0 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 608 -64 96 ) ( 576 -64 96 ) ( 608 64 96 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -264 -64 0 ) ( -264 -64 -16 ) ( -264 64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 64 0 ) ( -256 64 -16 ) ( -256 -64 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 64 0 ) ( -264 64 -16 ) ( -256 64 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -64 0 ) ( -256 -64 -16 ) ( -264 -64 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 64 -16 ) ( -264 -64 -16 ) ( -256 64 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +( -256 -64 0 ) ( -264 -64 0 ) ( -256 64 0 ) C1A0_LABFLRC [ 1 0 0 32 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -264 -128 128 ) ( -264 -128 0 ) ( -264 -64 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -64 128 ) ( -256 -64 0 ) ( -256 -128 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 -64 128 ) ( -264 -64 0 ) ( -256 -64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -128 128 ) ( -256 -128 0 ) ( -264 -128 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -128 128 ) ( -264 -128 128 ) ( -256 -64 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +( -264 -64 0 ) ( -264 -128 0 ) ( -256 -64 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( -264 -64 128 ) ( -264 -64 96 ) ( -264 64 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 64 128 ) ( -256 64 96 ) ( -256 -64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 64 128 ) ( -264 64 96 ) ( -256 64 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -64 128 ) ( -256 -64 96 ) ( -264 -64 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 -64 128 ) ( -264 -64 128 ) ( -256 64 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +( -264 64 96 ) ( -264 -64 96 ) ( -256 64 96 ) C1A3WALL01 [ -0 -1 0 -0 ] [ -1 0 0 -32 ] 90 1 1 +} +{ +( -256 128 128 ) ( -256 128 0 ) ( -256 64 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 64 128 ) ( -264 64 0 ) ( -264 128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -256 64 128 ) ( -256 64 0 ) ( -264 64 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 128 128 ) ( -264 128 0 ) ( -256 128 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 128 0 ) ( -264 64 0 ) ( -256 128 0 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +( -256 64 128 ) ( -264 64 128 ) ( -256 128 128 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( -272 -64 96 ) ( -272 -64 0 ) ( -272 64 96 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -264 64 96 ) ( -264 64 0 ) ( -264 -64 96 ) LAB1_DOOR01 [ 0 1 0 64 ] [ 0 0 -1 0 ] 0 1 0.75 +( -272 64 96 ) ( -272 64 0 ) ( -264 64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 0 ] 0 1 1 +( -264 -64 96 ) ( -264 -64 0 ) ( -272 -64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 0 ] 0 1 1 +( -264 -64 96 ) ( -272 -64 96 ) ( -264 64 96 ) NULL [ 1 0 0 -8 ] [ 0 -1 0 -0 ] 0 1 1 +( -272 64 0 ) ( -272 -64 0 ) ( -264 64 0 ) METAL_BORD01 [ -0 -1 0 -8 ] [ -1 0 0 32 ] 90 1 1 +} +{ +( 96 -424 128 ) ( 96 -424 96 ) ( 96 -416 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -416 128 ) ( 224 -416 96 ) ( 224 -424 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -424 128 ) ( 224 -424 96 ) ( 96 -424 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -416 128 ) ( 96 -416 96 ) ( 224 -416 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -416 96 ) ( 96 -416 96 ) ( 224 -424 96 ) C1A3WALL01 [ -1 0 0 0 ] [ 0 1 0 32 ] 90 1 1 +( 96 -424 128 ) ( 96 -416 128 ) ( 224 -424 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +} +{ +( 224 -424 128 ) ( 224 -424 0 ) ( 224 -416 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -416 128 ) ( 288 -416 0 ) ( 288 -424 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -424 128 ) ( 288 -424 0 ) ( 224 -424 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -416 128 ) ( 224 -416 0 ) ( 288 -416 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -416 0 ) ( 224 -416 0 ) ( 288 -424 0 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( 224 -424 128 ) ( 224 -416 128 ) ( 288 -424 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +} +{ +( 224 -416 0 ) ( 224 -416 -16 ) ( 224 -424 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -424 0 ) ( 96 -424 -16 ) ( 96 -416 0 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -424 0 ) ( 224 -424 -16 ) ( 96 -424 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -416 0 ) ( 96 -416 -16 ) ( 224 -416 0 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -424 0 ) ( 96 -424 0 ) ( 224 -416 0 ) C1A0_LABFLRC [ 1 0 0 0 ] [ 0 -1 0 -32 ] 0 1 1 +( 96 -416 -16 ) ( 96 -424 -16 ) ( 224 -416 -16 ) NULL [ 1 0 0 -0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( 32 -424 128 ) ( 32 -424 0 ) ( 32 -416 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -416 128 ) ( 96 -416 0 ) ( 96 -424 128 ) C1A3WALL01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -424 128 ) ( 96 -424 0 ) ( 32 -424 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -416 128 ) ( 32 -416 0 ) ( 96 -416 128 ) C1A3WALL01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -416 0 ) ( 32 -416 0 ) ( 96 -424 0 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( 32 -424 128 ) ( 32 -416 128 ) ( 96 -424 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +} +{ +( 96 -432 96 ) ( 96 -432 0 ) ( 96 -424 96 ) NULL [ 0 -1 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 224 -424 96 ) ( 224 -424 0 ) ( 224 -432 96 ) NULL [ 0 -1 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 224 -432 96 ) ( 224 -432 0 ) ( 96 -432 96 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -424 96 ) ( 96 -424 0 ) ( 224 -424 96 ) LAB1_DOOR01 [ 1 0 0 -96 ] [ 0 0 -1 0 ] 0 1 0.75 +( 224 -424 0 ) ( 96 -424 0 ) ( 224 -432 0 ) METAL_BORD01 [ -1 0 0 -8 ] [ 0 1 0 32 ] 90 1 1 +( 96 -432 96 ) ( 96 -424 96 ) ( 224 -432 96 ) NULL [ 0 -1 0 -8 ] [ -1 -0 0 -0 ] 0 1 1 +} +{ +( 224 416 96 ) ( 224 416 -0 ) ( 224 384 96 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 168 416 96 ) ( 168 408 96 ) ( 168 416 -0 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 384 96 ) ( 224 384 -0 ) ( 174 384 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 168 416 96 ) ( 168 416 -0 ) ( 224 416 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 168 416 0 ) ( 168 408 0 ) ( 224 416 0 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 168 408 96 ) ( 168 416 96 ) ( 174 384 96 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 174 384 96 ) ( 174 384 -0 ) ( 168 408 96 ) CLIP [ 0.242536 -0.970143 0 0 ] [ 0 -0 -1 0 ] 0 1 1 +} +{ +( 16 176 96 ) ( 16 176 32 ) ( 16 288 96 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 288 96 ) ( 32 288 32 ) ( 32 176 96 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 288 96 ) ( 16 288 32 ) ( 32 288 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 176 96 ) ( 32 176 32 ) ( 16 176 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 176 96 ) ( 16 176 96 ) ( 32 288 96 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 16 288 32 ) ( 16 176 32 ) ( 32 288 32 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 144 -128 96 ) ( 144 -160 96 ) ( 144 -128 48 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -128 96 ) ( 224 -128 48 ) ( 224 -160 96 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -128 96 ) ( 144 -128 48 ) ( 224 -128 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 224 -160 96 ) ( 224 -160 48 ) ( 144 -160 96 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -160 96 ) ( 144 -128 96 ) ( 224 -160 96 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( 144 -128 48 ) ( 144 -160 48 ) ( 224 -128 48 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +{ +( -175 384 128 ) ( -175 384 32 ) ( -175 161 128 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 161 128 ) ( -176 161 32 ) ( -176 384 128 ) CLIP [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 161 128 ) ( -175 161 32 ) ( -176 161 128 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 128 ) ( -176 384 32 ) ( -175 384 128 ) CLIP [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 32 ) ( -176 161 32 ) ( -175 384 32 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -175 161 128 ) ( -176 161 128 ) ( -175 384 128 ) CLIP [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_door" +"zhlt_lightflags" "0" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"health" "0" +"dmg" "0" +"wait" "4" +"stopsnd" "6" +"movesnd" "7" +"speed" "25" +"angles" "-90 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"spawnflags" "32" +"targetname" "spawndoor" +{ +( 24 64 96 ) ( 24 64 0 ) ( 24 -64 96 ) LAB1_DOOR01 [ 0 1 0 64 ] [ 0 0 -1 0 ] 0 1 0.75 +( 8 -64 96 ) ( 8 -64 0 ) ( 8 64 96 ) LAB1_DOOR01 [ 0 1 0 64 ] [ 0 0 -1 0 ] 0 1 0.75 +( 24 -64 96 ) ( 24 -64 0 ) ( 8 -64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 8 64 96 ) ( 8 64 0 ) ( 24 64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 8 64 0 ) ( 8 -64 0 ) ( 24 64 0 ) LAB1_TRIM3 [ 1 0 0 -8 ] [ 0 -1 0 -0 ] 0 1 1 +( 24 -64 96 ) ( 8 -64 96 ) ( 24 64 96 ) NULL [ 1 0 0 -8 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"angles" "-90 0 0" +{ +( 224 -136 96 ) ( 224 -136 48 ) ( 224 -152 96 ) NULL [ 0 -1 0 -8 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -152 96 ) ( 96 -152 48 ) ( 96 -136 96 ) NULL [ 0 -1 0 -8 ] [ 0 0 -1 0 ] 0 1 1 +( 96 -136 96 ) ( 96 -136 48 ) ( 224 -136 96 ) LAB1_DOOR01 [ 1 0 0 -96 ] [ 0 0 -1 64 ] 0 1 0.75 +( 224 -152 96 ) ( 224 -152 48 ) ( 96 -152 96 ) LAB1_DOOR01 [ 1 0 0 -96 ] [ 0 0 -1 64 ] 0 1 0.75 +( 96 -152 96 ) ( 96 -136 96 ) ( 224 -152 96 ) NULL [ 0 -1 0 -8 ] [ -1 -0 0 -0 ] 0 1 1 +( 224 -136 48 ) ( 96 -136 48 ) ( 224 -152 48 ) LAB1_TRIM3 [ -0 -1 0 -8 ] [ -1 0 0 -0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 32 288 32 ) ( 32 288 96 ) ( 16 288 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 20 284 92 ) ( 28 284 92 ) ( 20 284 36 ) METAL_BORD05 [ -0 0 -1 0 ] [ -1 0 0 0 ] 90 1 1 +( 28 284 92 ) ( 32 288 96 ) ( 28 284 36 ) METAL_BORD05 [ 0 -0 -1 0 ] [ 0 -1 0 0 ] 90 1 1 +( 20 284 36 ) ( 16 288 32 ) ( 20 284 92 ) METAL_BORD05 [ 0 -0 -1 0 ] [ 0 -1 0 0 ] 90 1 1 +( 20 284 92 ) ( 16 288 96 ) ( 28 284 92 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 28 284 36 ) ( 32 288 32 ) ( 20 284 36 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 20 180 92 ) ( 28 180 92 ) ( 20 284 92 ) METAL_BORD05 [ 0 -1 0 32 ] [ 1 0 0 -0 ] 90 1 1 +( 32 288 96 ) ( 32 176 96 ) ( 16 288 96 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 28 284 92 ) ( 32 288 96 ) ( 20 284 92 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 20 180 92 ) ( 16 176 96 ) ( 28 180 92 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 20 284 92 ) ( 16 288 96 ) ( 20 180 92 ) METAL_BORD05 [ 0 1 0 -32 ] [ 0 0 -1 -0 ] 0 1 1 +( 28 180 92 ) ( 32 176 96 ) ( 28 284 92 ) METAL_BORD05 [ 0 1 0 -32 ] [ 0 0 -1 -0 ] 0 1 1 +} +{ +( 28 180 92 ) ( 20 180 92 ) ( 28 180 36 ) METAL_BORD05 [ 0 0 -1 0 ] [ 1 0 0 0 ] 90 1 1 +( 16 176 32 ) ( 16 176 96 ) ( 32 176 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 20 180 36 ) ( 16 176 32 ) ( 28 180 36 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 28 180 92 ) ( 32 176 96 ) ( 20 180 92 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 28 180 36 ) ( 32 176 32 ) ( 28 180 92 ) METAL_BORD05 [ 0 -0 -1 0 ] [ 0 -1 0 0 ] 90 1 1 +( 20 180 92 ) ( 16 176 96 ) ( 20 180 36 ) METAL_BORD05 [ 0 -0 -1 0 ] [ 0 -1 0 0 ] 90 1 1 +} +{ +( 28 180 36 ) ( 20 180 36 ) ( 28 284 36 ) METAL_BORD05 [ -0 -1 0 32 ] [ -1 0 0 -0 ] 90 1 1 +( 16 288 32 ) ( 16 176 32 ) ( 32 288 32 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 20 284 36 ) ( 16 288 32 ) ( 28 284 36 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 28 180 36 ) ( 32 176 32 ) ( 20 180 36 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 28 284 36 ) ( 32 288 32 ) ( 28 180 36 ) METAL_BORD05 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 20 180 36 ) ( 16 176 32 ) ( 20 284 36 ) METAL_BORD05 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "2" +"renderfx" "0" +"renderamt" "50" +{ +( 28 284 92 ) ( 28 284 36 ) ( 28 180 92 ) GLASSBLUE1 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 20 180 92 ) ( 20 180 36 ) ( 20 284 92 ) GLASSBLUE1 [ 0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 28 180 92 ) ( 28 180 36 ) ( 20 180 92 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 20 284 92 ) ( 20 284 36 ) ( 28 284 92 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 20 284 36 ) ( 20 180 36 ) ( 28 284 36 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 28 180 92 ) ( 20 180 92 ) ( 28 284 92 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_door" +"zhlt_lightflags" "0" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"health" "0" +"dmg" "0" +"wait" "4" +"stopsnd" "6" +"movesnd" "7" +"speed" "25" +"angles" "-90 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"spawnflags" "32" +"targetname" "door3" +"master" "ms_computer" +{ +( 312 64 96 ) ( 312 64 0 ) ( 312 -64 96 ) LAB1_DOOR01 [ 0 1 0 64 ] [ 0 0 -1 0 ] 0 1 0.75 +( 296 -64 96 ) ( 296 -64 0 ) ( 296 64 96 ) LAB1_DOOR01 [ 0 1 0 64 ] [ 0 0 -1 0 ] 0 1 0.75 +( 312 -64 96 ) ( 312 -64 0 ) ( 296 -64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 296 64 96 ) ( 296 64 0 ) ( 312 64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 296 64 0 ) ( 296 -64 0 ) ( 312 64 0 ) LAB1_TRIM3 [ 1 0 0 -8 ] [ 0 -1 0 -0 ] 0 1 1 +( 312 -64 96 ) ( 296 -64 96 ) ( 312 64 96 ) NULL [ 1 0 0 -8 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_door" +"zhlt_lightflags" "0" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"health" "0" +"dmg" "0" +"wait" "4" +"stopsnd" "6" +"movesnd" "7" +"speed" "25" +"angles" "-90 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"spawnflags" "32" +"targetname" "escapedoor" +{ +( 584 -64 96 ) ( 584 -64 0 ) ( 584 64 96 ) C1A3_DR1 [ 0 1 0 96 ] [ 0 0 -1 0 ] 0 0.666667 0.666667 +( 600 64 96 ) ( 600 64 0 ) ( 600 -64 96 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 584 64 96 ) ( 584 64 0 ) ( 600 64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 600 -64 96 ) ( 600 -64 0 ) ( 584 -64 96 ) NULL [ 1 0 0 -8 ] [ 0 0 -1 -0 ] 0 1 1 +( 600 -64 96 ) ( 584 -64 96 ) ( 600 64 96 ) NULL [ 1 0 0 -8 ] [ 0 -1 0 0 ] 0 1 1 +( 584 64 0 ) ( 584 -64 0 ) ( 600 64 0 ) LAB1_TRIM3 [ 1 0 0 -8 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"angles" "-90 0 0" +{ +( 96 392 96 ) ( 96 392 80 ) ( 96 408 96 ) NULL [ 0 -1 0 8 ] [ 0 0 -1 0 ] 0 1 1 +( 224 408 96 ) ( 224 408 80 ) ( 224 392 96 ) NULL [ 0 -1 0 8 ] [ 0 0 -1 0 ] 0 1 1 +( 224 392 96 ) ( 224 392 80 ) ( 96 392 96 ) LAB1_DOOR01 [ 1 0 0 -96 ] [ 0 0 -1 106.667 ] 0 1 0.75 +( 96 408 96 ) ( 96 408 80 ) ( 224 408 96 ) LAB1_DOOR01 [ 1 0 0 -96 ] [ 0 0 -1 106.667 ] 0 1 0.75 +( 224 408 80 ) ( 96 408 80 ) ( 224 392 80 ) LAB1_TRIM3 [ -0 -1 0 -8 ] [ -1 0 0 -32 ] 0 1 1 +( 96 392 96 ) ( 96 408 96 ) ( 224 392 96 ) NULL [ 0 -1 0 8 ] [ -1 -0 0 0 ] 0 1 1 +} +} +{ +"classname" "cycler_sprite" +"model" "cstrike/models/deadman.mdl" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"framerate" "10" +"angles" "0 105 0" +"origin" "-68 204 0" +} +{ +"classname" "weapon_357" +"angles" "0 135 0" +"origin" "-92 248 0" +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 16 288 32 ) ( 16 288 0 ) ( 16 224 32 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -16 224 16 ) ( -16 224 0 ) ( -16 288 16 ) ~LAB1_COMP8B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 224 32 ) ( 16 224 0 ) ( -16 224 16 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -16 288 16 ) ( -16 288 0 ) ( 16 288 32 ) ~LAB1_COMP8B [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -16 288 0 ) ( -16 224 0 ) ( 16 288 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -16 224 16 ) ( -16 288 16 ) ( 16 224 32 ) ~LAB1_COMP3D [ -0 -1 0 32 ] [ -1 0 0 16 ] 90 1 1 +} +{ +( 16 224 32 ) ( 16 224 0 ) ( 16 160 32 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -16 160 16 ) ( -16 160 0 ) ( -16 224 16 ) ~LAB1_COMP8B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 160 32 ) ( 16 160 0 ) ( -16 160 16 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -16 224 16 ) ( -16 224 0 ) ( 16 224 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -16 224 0 ) ( -16 160 0 ) ( 16 224 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -16 160 16 ) ( -16 224 16 ) ( 16 160 32 ) ~LAB1_COMP3E [ -0 -1 0 32 ] [ -1 0 0 16 ] 90 1 1 +} +} +{ +"classname" "weapon_556AR" +"angles" "0 210 0" +"origin" "268 638 48" +} +{ +"classname" "weapon_shotgun" +"angles" "0 120 0" +"origin" "267.467 461.814 36" +} +{ +"classname" "ammo_556AR" +"angles" "0 300 0" +"origin" "264 576 36" +} +{ +"classname" "ammo_buckshot" +"angles" "0 120 0" +"origin" "272 532 36" +} +{ +"classname" "ammo_buckshot" +"angles" "0 240 0" +"origin" "256 508 36" +} +{ +"classname" "ammo_556AR" +"angles" "0 285 0" +"origin" "244 584 36" +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 288 424 28 ) ( 288 424 0 ) ( 288 416 28 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 240 424 28 ) ( 264 424 0 ) ( 288 424 28 ) TRRM_WOOD2 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 416 28 ) ( 288 416 0 ) ( 240 416 28 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 264 424 0 ) ( 264 416 0 ) ( 288 424 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 416 28 ) ( 240 416 28 ) ( 288 424 28 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 240 416 28 ) ( 264 416 0 ) ( 240 424 28 ) TRRM_WOOD2 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 288 508 28 ) ( 288 508 0 ) ( 288 500 28 ) NULL [ 0 1 0 -12 ] [ 0 0 -1 0 ] 0 1 1 +( 288 500 28 ) ( 288 500 0 ) ( 240 500 28 ) TRRM_WOOD2 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 240 508 28 ) ( 264 508 0 ) ( 288 508 28 ) TRRM_WOOD2 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 500 28 ) ( 240 500 28 ) ( 288 508 28 ) NULL [ 1 0 0 0 ] [ 0 -1 0 12 ] 0 1 1 +( 264 508 0 ) ( 264 500 0 ) ( 288 508 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 12 ] 0 1 1 +( 240 500 28 ) ( 264 500 0 ) ( 240 508 28 ) TRRM_WOOD2 [ 0 1 0 -12 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 288 592 28 ) ( 288 592 0 ) ( 288 584 28 ) NULL [ 0 1 0 8 ] [ 0 0 -1 0 ] 0 1 1 +( 240 592 28 ) ( 264 592 0 ) ( 288 592 28 ) TRRM_WOOD2 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 584 28 ) ( 288 584 0 ) ( 240 584 28 ) TRRM_WOOD2 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 264 592 0 ) ( 264 584 0 ) ( 288 592 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -8 ] 0 1 1 +( 288 584 28 ) ( 240 584 28 ) ( 288 592 28 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -8 ] 0 1 1 +( 240 584 28 ) ( 264 584 0 ) ( 240 592 28 ) TRRM_WOOD2 [ 0 1 0 8 ] [ 0 0 -1 0 ] 0 1 1 +} +{ +( 240 416 36 ) ( 240 416 28 ) ( 240 592 36 ) TRRM_WOOD2 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 592 36 ) ( 288 592 28 ) ( 288 416 36 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 240 592 36 ) ( 240 592 28 ) ( 288 592 36 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 416 36 ) ( 288 416 28 ) ( 240 416 36 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 416 36 ) ( 240 416 36 ) ( 288 592 36 ) TRRM_WOOD2 [ -0 -1 0 0 ] [ -1 0 0 -18 ] 90 1 1 +( 240 592 28 ) ( 240 416 28 ) ( 288 592 28 ) TRRM_WOOD2 [ -0 -1 0 0 ] [ -1 0 0 -18 ] 90 1 1 +} +} +{ +"classname" "func_door_rotating" +"distance" "90" +"zhlt_lightflags" "0" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"health" "0" +"dmg" "0" +"wait" "-1" +"stopsnd" "0" +"movesnd" "9" +"speed" "100" +"angles" "0 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"spawnflags" "160" +"_minlight" "0" +"renderamt" "255" +"targetname" "gen_rot" +{ +( -224 566 68 ) ( -224 566 60 ) ( -224 574 68 ) ORIGIN [ 0 1 0 6 ] [ 0 0 -1 0 ] 0 1 1 +( -216 574 68 ) ( -216 574 60 ) ( -216 566 68 ) ORIGIN [ 0 1 0 6 ] [ 0 0 -1 0 ] 0 1 1 +( -224 574 68 ) ( -224 574 60 ) ( -216 574 68 ) ORIGIN [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -216 566 68 ) ( -216 566 60 ) ( -224 566 68 ) ORIGIN [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -216 566 68 ) ( -224 566 68 ) ( -216 574 68 ) ORIGIN [ 1 0 0 0 ] [ 0 -1 0 -6 ] 0 1 1 +( -224 574 60 ) ( -224 566 60 ) ( -216 574 60 ) ORIGIN [ 1 0 0 0 ] [ 0 -1 0 -6 ] 0 1 1 +} +{ +( -218 572 84 ) ( -218 572 64 ) ( -218 568 84 ) GENERIC007 [ 0 -0 -1 -0 ] [ 0 -1 0 -8 ] 90 1 1 +( -222 568 84 ) ( -222 568 64 ) ( -222 572 84 ) GENERIC007 [ 0 -0 -1 -0 ] [ 0 -1 0 -8 ] 90 1 1 +( -218 568 84 ) ( -218 568 64 ) ( -222 568 84 ) GENERIC007 [ -0 0 -1 0 ] [ -1 0 0 0 ] 90 1 1 +( -222 572 84 ) ( -222 572 64 ) ( -218 572 84 ) GENERIC007 [ -0 0 -1 0 ] [ -1 0 0 0 ] 90 1 1 +( -222 572 64 ) ( -222 568 64 ) ( -218 572 64 ) GENERIC007 [ 1 0 0 0 ] [ 0 -1 0 -8 ] 0 1 1 +( -218 568 84 ) ( -222 568 84 ) ( -218 572 84 ) GENERIC007 [ 1 0 0 0 ] [ 0 -1 0 -8 ] 0 1 1 +} +} +{ +"classname" "func_button" +"spawnflags" "513" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"delay" "0" +"wait" "-1" +"sounds" "0" +"speed" "5" +"angles" "0 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"target" "mm1" +{ +( -224 520 96 ) ( -224 520 36 ) ( -224 568 96 ) NULL [ 0 1 0 8 ] [ 0 0 -1 0 ] 0 1 1 +( -208 560 44 ) ( -208 528 44 ) ( -208 560 88 ) GENERIC_111A [ 0 1 0 10.6667 ] [ 0 0 -1 48 ] 0 0.75 0.75 +( -224 520 96 ) ( -216 520 96 ) ( -224 520 36 ) GENERIC111B [ -0 0 -1 0 ] [ -1 0 0 0 ] 90 1 1 +( -224 568 96 ) ( -224 568 36 ) ( -216 568 96 ) GENERIC111B [ -0 0 -1 0 ] [ -1 0 0 0 ] 90 0.75 0.75 +( -224 520 96 ) ( -224 568 96 ) ( -216 520 96 ) GENERIC111B [ 1 0 0 0 ] [ 0 -1 0 -8 ] 0 1 1 +( -224 568 36 ) ( -224 520 36 ) ( -216 568 36 ) GENERIC111B [ -0 -1 0 -8 ] [ -1 0 0 0 ] 90 1 1 +( -216 568 96 ) ( -216 568 36 ) ( -208 560 88 ) GENERIC_111A [ 0 1 0 10.6667 ] [ 0 0 -1 48 ] 0 0.75 0.75 +( -208 560 44 ) ( -216 568 36 ) ( -208 528 44 ) GENERIC_111A [ 0 1 0 10.6667 ] [ 0 0 -1 48 ] 0 0.75 0.75 +( -208 560 88 ) ( -208 528 88 ) ( -216 568 96 ) GENERIC_111A [ 0 1 0 10.6667 ] [ 0 0 -1 48 ] 0 0.75 0.75 +( -208 528 88 ) ( -208 528 44 ) ( -216 520 96 ) GENERIC_111A [ 0 1 0 10.6667 ] [ 0 0 -1 48 ] 0 0.75 0.75 +} +} +{ +"classname" "multisource" +"targetname" "comp_ms" +"origin" "-156 186 48" +} +{ +"classname" "multi_manager" +"door3" "1.0" +"targetname" "mm1" +"comp_ms" "1.0" +"compdoor_ms" "1.0" +"gen_rot" "0.0" +"emergency_light" "0.5" +"light_mm" "0.25" +"origin" "-200 544 64" +} +{ +"classname" "multi_manager" +"targetname" "mm2" +"escapedoor_ms" "1.0" +"origin" "-156 202 48" +} +{ +"classname" "multisource" +"targetname" "escapedoor_ms" +"target" "escapedoor" +"origin" "448 0 64" +} +{ +"classname" "trigger_endround" +"spawnflags" "0" +"delay" "0" +"sounds" "0" +"master" "escapedoor_ms" +{ +( 576 128 128 ) ( 576 128 0 ) ( 576 -128 128 ) AAATRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 448 -128 128 ) ( 448 -128 0 ) ( 448 128 128 ) AAATRIGGER [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 576 -128 128 ) ( 576 -128 0 ) ( 448 -128 128 ) AAATRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 448 128 128 ) ( 448 128 0 ) ( 576 128 128 ) AAATRIGGER [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 448 128 0 ) ( 448 -128 0 ) ( 576 128 0 ) AAATRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 576 -128 128 ) ( 448 -128 128 ) ( 576 128 128 ) AAATRIGGER [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_door" +"health" "0" +"dmg" "0" +"lip" "0" +"wait" "4" +"speed" "75" +"delay" "0" +"spawnflags" "0" +"angles" "-90 0 0" +"rendercolor" "0 0 0" +"renderamt" "255" +"targetname" "compdoor" +"movesnd" "8" +"stopsnd" "8" +{ +( 20 304 80 ) ( 20 304 0 ) ( 20 352 80 ) C1A0B_DR4A [ 0 1 0 -21 ] [ 0 0 -1 0 ] 0 0.75 0.833 +( 28 352 80 ) ( 28 352 0 ) ( 28 304 80 ) C1A0B_DR4A [ 0 1 0 -21.3333 ] [ 0 0 -1 0 ] 0 0.75 0.833333 +( 20 352 80 ) ( 20 352 0 ) ( 28 352 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 28 304 80 ) ( 28 304 0 ) ( 20 304 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 28 304 80 ) ( 20 304 80 ) ( 28 352 80 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 20 352 0 ) ( 20 304 0 ) ( 28 352 0 ) LAB1_TRIM3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 0.75 0.833 +} +} +{ +"classname" "func_button" +"spawnflags" "1" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"delay" "0" +"wait" "3" +"sounds" "9" +"speed" "5" +"angles" "0 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"target" "compdoor" +"master" "compdoor_ms" +{ +( 32 360 56 ) ( 32 360 32 ) ( 32 376 56 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 34 376 56 ) ( 34 376 32 ) ( 34 360 56 ) +0BUTTON4 [ 0 1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 32 376 56 ) ( 32 376 32 ) ( 34 376 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 34 360 56 ) ( 34 360 32 ) ( 32 360 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 34 360 56 ) ( 32 360 56 ) ( 34 376 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 32 376 32 ) ( 32 360 32 ) ( 34 376 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 14 360 56 ) ( 14 360 32 ) ( 14 376 56 ) +0BUTTON4 [ 0 -1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 16 376 56 ) ( 16 376 32 ) ( 16 360 56 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 14 376 56 ) ( 14 376 32 ) ( 16 376 56 ) METAL_BORD01 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 360 56 ) ( 16 360 32 ) ( 14 360 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 16 360 32 ) ( 16 376 32 ) ( 14 360 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 14 376 56 ) ( 16 376 56 ) ( 14 360 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 -0 0 ] 0 1 1 +} +} +{ +"classname" "multisource" +"targetname" "compdoor_ms" +"origin" "44 368 44" +} +{ +"classname" "func_button" +"spawnflags" "513" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"delay" "0" +"wait" "-1" +"sounds" "0" +"speed" "5" +"angles" "0 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"master" "comp_ms" +"target" "mm2" +{ +( -176 160 32 ) ( -176 160 0 ) ( -176 224 32 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 224 16 ) ( -144 224 0 ) ( -144 160 16 ) ~LAB1_COMP8B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 160 16 ) ( -144 160 0 ) ( -176 160 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 224 32 ) ( -176 224 0 ) ( -144 224 16 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 160 0 ) ( -144 224 0 ) ( -176 160 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -144 224 16 ) ( -144 160 16 ) ( -176 224 32 ) ~LAB1_COMP3E [ 0 1 0 -32 ] [ 1 -0 0 16 ] 270 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( -176 224 32 ) ( -176 224 0 ) ( -176 288 32 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 288 16 ) ( -144 288 0 ) ( -144 224 16 ) ~LAB1_COMP8B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 288 32 ) ( -176 288 0 ) ( -144 288 16 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 224 16 ) ( -144 224 0 ) ( -176 224 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 224 0 ) ( -144 288 0 ) ( -176 224 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -144 288 16 ) ( -144 224 16 ) ( -176 288 32 ) ~LAB1_COMP3D [ 0 1 0 -32 ] [ 1 -0 0 16 ] 270 1 1 +} +{ +( -176 288 32 ) ( -176 288 0 ) ( -176 352 32 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 352 16 ) ( -144 352 0 ) ( -144 288 16 ) ~LAB1_COMP8B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 352 32 ) ( -176 352 0 ) ( -144 352 16 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 288 16 ) ( -144 288 0 ) ( -176 288 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 288 0 ) ( -144 352 0 ) ( -176 288 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -144 352 16 ) ( -144 288 16 ) ( -176 352 32 ) ~LAB1_COMP3B [ 0 1 0 -32 ] [ 1 -0 0 16 ] 270 1 1 +} +{ +( -144 384 16 ) ( -144 384 0 ) ( -144 352 16 ) ~LAB1_COMP8B [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 352 32 ) ( -176 352 0 ) ( -176 384 32 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 352 16 ) ( -144 352 0 ) ( -176 352 32 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 32 ) ( -176 384 0 ) ( -144 384 16 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -144 352 0 ) ( -144 384 0 ) ( -176 352 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -144 384 16 ) ( -144 352 16 ) ( -176 384 32 ) ~LAB1_COMP3C [ 0 1 0 -32 ] [ 1 -0 0 16 ] 270 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( -32 560 128 ) ( -32 560 127 ) ( -32 528 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 528 128 ) ( -96 528 127 ) ( -96 560 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 560 128 ) ( -96 560 127 ) ( -32 560 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -32 528 128 ) ( -32 528 127 ) ( -96 528 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 528 128 ) ( -96 560 128 ) ( -32 528 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 -0 ] 0 1 1 +( -32 560 127 ) ( -96 560 127 ) ( -32 528 127 ) +0~LIGHT2A [ -1 0 0 -32 ] [ 0 1 0 -16 ] 90 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 96 528 128 ) ( 96 528 127 ) ( 96 560 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 160 560 128 ) ( 160 560 127 ) ( 160 528 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 160 528 128 ) ( 160 528 127 ) ( 96 528 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 96 560 128 ) ( 96 560 127 ) ( 160 560 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 160 560 127 ) ( 96 560 127 ) ( 160 528 127 ) +0~LIGHT2A [ -1 0 0 -32 ] [ 0 1 0 -16 ] 90 1 1 +( 96 528 128 ) ( 96 560 128 ) ( 160 528 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 -0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 176 288 128 ) ( 176 288 127 ) ( 176 224 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 224 128 ) ( 144 224 127 ) ( 144 288 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 176 224 128 ) ( 176 224 127 ) ( 144 224 128 ) NULL [ 1 0 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 144 288 128 ) ( 144 288 127 ) ( 176 288 128 ) NULL [ -1 -0 0 -16 ] [ 0 0 -1 0 ] 0 1 1 +( 144 288 128 ) ( 176 288 128 ) ( 144 224 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 -16 ] 0 1 1 +( 176 224 127 ) ( 176 288 127 ) ( 144 224 127 ) +0~LIGHT2A [ 0 -1 0 32 ] [ -1 -0 0 -16 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 176 160 128 ) ( 176 160 127 ) ( 176 96 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 96 128 ) ( 144 96 127 ) ( 144 160 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 176 96 128 ) ( 176 96 127 ) ( 144 96 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 160 128 ) ( 144 160 127 ) ( 176 160 128 ) NULL [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 160 128 ) ( 176 160 128 ) ( 144 96 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +( 176 96 127 ) ( 176 160 127 ) ( 144 96 127 ) +0~LIGHT2A [ 0 -1 0 32 ] [ -1 -0 0 16 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 176 32 128 ) ( 176 32 127 ) ( 176 -32 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -32 128 ) ( 144 -32 127 ) ( 144 32 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 176 -32 128 ) ( 176 -32 127 ) ( 144 -32 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 32 128 ) ( 144 32 127 ) ( 176 32 128 ) NULL [ -1 -0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 32 128 ) ( 176 32 128 ) ( 144 -32 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +( 176 -32 127 ) ( 176 32 127 ) ( 144 -32 127 ) +0~LIGHT2A [ 0 -1 0 32 ] [ -1 -0 0 16 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( -64 304 128 ) ( -64 304 127 ) ( -64 240 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 240 128 ) ( -96 240 127 ) ( -96 304 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -64 240 128 ) ( -64 240 127 ) ( -96 240 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 304 128 ) ( -96 304 127 ) ( -64 304 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 304 127 ) ( -96 240 127 ) ( -64 304 127 ) +0~LIGHT2A [ -0 -1 0 48 ] [ -1 0 0 -0 ] 90 1 1 +( -64 240 128 ) ( -96 240 128 ) ( -64 304 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( -96 16 128 ) ( -96 16 127 ) ( -96 -16 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -160 -16 128 ) ( -160 -16 127 ) ( -160 16 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -160 16 128 ) ( -160 16 127 ) ( -96 16 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 -16 128 ) ( -96 -16 127 ) ( -160 -16 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -160 -16 128 ) ( -160 16 128 ) ( -96 -16 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( -96 16 127 ) ( -160 16 127 ) ( -96 -16 127 ) +0~LIGHT2A [ -1 0 0 -32 ] [ 0 1 0 16 ] 90 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 480 16 128 ) ( 480 16 127 ) ( 480 -16 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 416 -16 128 ) ( 416 -16 127 ) ( 416 16 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 416 16 128 ) ( 416 16 127 ) ( 480 16 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 480 -16 128 ) ( 480 -16 127 ) ( 416 -16 128 ) NULL [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 416 -16 128 ) ( 416 16 128 ) ( 480 -16 128 ) NULL [ 0 -1 0 0 ] [ -1 -0 0 0 ] 0 1 1 +( 480 16 127 ) ( 416 16 127 ) ( 480 -16 127 ) +0~LIGHT2A [ -1 0 0 32 ] [ 0 1 0 -16 ] 90 1 1 +} +} +{ +"classname" "info_texlights" +"spawnflags" "1" +"~LIGHT3A" "255 0 0 255" +"origin" "160 0 64" +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "12" +{ +( 80 656 96 ) ( 80 656 0 ) ( 80 584 96 ) CRATE11 [ 0 1 0 -10.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 8 584 96 ) ( 8 584 0 ) ( 8 656 96 ) CRATE10 [ 0 1 0 -10.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 8 656 96 ) ( 8 656 0 ) ( 80 656 96 ) CRATE10 [ 1 0 0 -10.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 80 584 96 ) ( 80 584 0 ) ( 8 584 96 ) CRATE10 [ 1 0 0 -10.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 8 584 0 ) ( 80 584 0 ) ( 8 656 0 ) NULL [ 1 0 0 -1.77778 ] [ 0 -1 0 1.77777 ] 0 4.5 4.5 +( 80 656 96 ) ( 80 584 96 ) ( 8 656 96 ) CRATE13 [ 1 0 0 -10.6667 ] [ 0 -1 0 10.6667 ] 0 0.75 0.75 +} +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "10" +{ +( -56 480 96 ) ( -56 480 0 ) ( -56 552 96 ) CRATE11 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 16 552 96 ) ( 16 552 0 ) ( 16 480 96 ) CRATE10 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 16 480 96 ) ( 16 480 0 ) ( -56 480 96 ) CRATE10 [ 1 0 0 74.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -56 552 96 ) ( -56 552 0 ) ( 16 552 96 ) CRATE10 [ 1 0 0 74.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 16 552 0 ) ( -56 552 0 ) ( 16 480 0 ) NULL [ 1 0 0 12.4444 ] [ 0 -1 0 10.6667 ] 0 4.5 4.5 +( -56 480 96 ) ( -56 552 96 ) ( 16 480 96 ) CRATE13 [ 1 0 0 74.6667 ] [ 0 -1 0 64 ] 0 0.75 0.75 +} +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "11" +{ +( 0 664 96 ) ( 0 664 0 ) ( 0 592 96 ) CRATE10 [ 0 1 0 -21.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -72 592 96 ) ( -72 592 0 ) ( -72 664 96 ) CRATE10 [ 0 1 0 -21.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 0 592 96 ) ( 0 592 0 ) ( -72 592 96 ) CRATE11 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -72 664 96 ) ( -72 664 0 ) ( 0 664 96 ) CRATE10 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -72 664 0 ) ( -72 592 0 ) ( 0 664 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 3.55556 ] 0 4.5 4.5 +( 0 592 96 ) ( -72 592 96 ) ( 0 664 96 ) CRATE13 [ 1 0 0 0 ] [ 0 -1 0 21.3333 ] 0 0.75 0.75 +} +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "8" +{ +( 104 568 96 ) ( 104 568 0 ) ( 104 496 96 ) CRATE11 [ 0 1 0 -85.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 32 496 96 ) ( 32 496 0 ) ( 32 568 96 ) CRATE10 [ 0 1 0 -85.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 32 568 96 ) ( 32 568 0 ) ( 104 568 96 ) CRATE10 [ 1 0 0 -42.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 104 496 96 ) ( 104 496 0 ) ( 32 496 96 ) CRATE10 [ 1 0 0 -42.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 32 496 0 ) ( 104 496 0 ) ( 32 568 0 ) NULL [ 1 0 0 -7.11111 ] [ 0 -1 0 14.2222 ] 0 4.5 4.5 +( 104 568 96 ) ( 104 496 96 ) ( 32 568 96 ) CRATE13 [ 1 0 0 -42.6667 ] [ 0 -1 0 85.3333 ] 0 0.75 0.75 +} +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "3" +{ +( 96 490 96 ) ( 96 490 0 ) ( 96 418 96 ) CRATE10 [ 0 1 0 -77.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 24 418 96 ) ( 24 418 0 ) ( 24 490 96 ) CRATE11 [ 0 1 0 -77.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 24 490 96 ) ( 24 490 0 ) ( 96 490 96 ) CRATE10 [ 1 0 0 -32 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 96 418 96 ) ( 96 418 0 ) ( 24 418 96 ) CRATE10 [ 1 0 0 -32 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 24 418 96 ) ( 24 490 96 ) ( 96 418 96 ) CRATE13 [ 1 0 0 -32 ] [ 0 -1 0 77.3333 ] 0 0.75 0.75 +( 96 490 0 ) ( 24 490 0 ) ( 96 418 0 ) NULL [ 1 0 0 -5.33333 ] [ 0 -1 0 12.8889 ] 0 4.5 4.5 +} +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "1" +{ +( -136 416 96 ) ( -136 416 0 ) ( -136 488 96 ) CRATE11 [ 0 1 0 -74.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -64 488 96 ) ( -64 488 0 ) ( -64 416 96 ) CRATE10 [ 0 1 0 -74.6667 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -64 416 96 ) ( -64 416 0 ) ( -136 416 96 ) CRATE10 [ 1 0 0 85.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -136 488 96 ) ( -136 488 0 ) ( -64 488 96 ) CRATE10 [ 1 0 0 85.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -64 488 0 ) ( -136 488 0 ) ( -64 416 0 ) NULL [ 1 0 0 14.2222 ] [ 0 -1 0 12.4444 ] 0 4.5 4.5 +( -136 416 96 ) ( -136 488 96 ) ( -64 416 96 ) CRATE13 [ 1 0 0 85.3333 ] [ 0 -1 0 74.6667 ] 0 0.75 0.75 +} +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "2" +{ +( -168 544 96 ) ( -168 544 0 ) ( -168 616 96 ) CRATE11 [ 0 1 0 -53.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -96 616 96 ) ( -96 616 0 ) ( -96 544 96 ) CRATE10 [ 0 1 0 -53.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -96 544 96 ) ( -96 544 0 ) ( -168 544 96 ) CRATE10 [ 1 0 0 32 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -168 616 96 ) ( -168 616 0 ) ( -96 616 96 ) CRATE10 [ 1 0 0 32 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( -96 616 0 ) ( -168 616 0 ) ( -96 544 0 ) NULL [ 1 0 0 5.33333 ] [ 0 -1 0 8.88889 ] 0 4.5 4.5 +( -168 544 96 ) ( -168 616 96 ) ( -96 544 96 ) CRATE13 [ 1 0 0 32 ] [ 0 -1 0 53.3333 ] 0 0.75 0.75 +} +} +{ +"classname" "weapon_handgrenade" +"angles" "0 0 0" +"origin" "262 528 0" +} +{ +"classname" "weapon_9mmhandgun" +"angles" "0 210 0" +"origin" "265.123 460.828 0" +} +{ +"classname" "weapon_satchel" +"angles" "0 0 0" +"origin" "264 568 0" +} +{ +"classname" "ammo_357" +"angles" "0 210 0" +"origin" "252 554 36" +} +{ +"classname" "light_environment" +"_diffuse_light" "19 28 80" +"pitch" "-45" +"angles" "0 270 0" +"_fade" "1.0" +"_light" "19 28 80 10" +"_sky" "1" +"origin" "736 0 128" +} +{ +"classname" "func_button" +"spawnflags" "1" +"unlocked_sentence" "0" +"locked_sentence" "0" +"unlocked_sound" "0" +"locked_sound" "0" +"delay" "0" +"wait" "-1" +"sounds" "9" +"speed" "5" +"angles" "0 0 0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +"target" "spawndoor_mm" +{ +( -0 104 56 ) ( -0 104 32 ) ( 0 88 56 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -2 88 56 ) ( -2 88 32 ) ( -2 104 56 ) +A~METALSTCH2 [ 0 -1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 0 88 56 ) ( 0 88 32 ) ( -2 88 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -2 104 56 ) ( -2 104 32 ) ( -0 104 56 ) METAL_BORD01 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -2 104 56 ) ( -0 104 56 ) ( -2 88 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 -0 0 ] 0 1 1 +( 0 88 32 ) ( -0 104 32 ) ( -2 88 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 34 104 56 ) ( 34 104 32 ) ( 34 88 56 ) +A~METALSTCH2 [ 0 1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 32 88 56 ) ( 32 88 32 ) ( 32 104 56 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 34 88 56 ) ( 34 88 32 ) ( 32 88 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 104 56 ) ( 32 104 32 ) ( 34 104 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 104 32 ) ( 32 88 32 ) ( 34 104 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 34 88 56 ) ( 32 88 56 ) ( 34 104 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 64 382 56 ) ( 64 382 32 ) ( 64 384 56 ) METAL_BORD01 [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 80 384 56 ) ( 80 384 32 ) ( 80 382 56 ) METAL_BORD01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 80 382 56 ) ( 80 382 32 ) ( 64 382 56 ) +0~METALSTCH2 [ 1 0 0 -0 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 64 384 56 ) ( 64 384 32 ) ( 80 384 56 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 80 384 32 ) ( 64 384 32 ) ( 80 382 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 64 382 56 ) ( 64 384 56 ) ( 80 382 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 -0 0 ] 0 1 1 +} +{ +( 80 418 56 ) ( 80 418 32 ) ( 80 416 56 ) METAL_BORD01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 64 416 56 ) ( 64 416 32 ) ( 64 418 56 ) METAL_BORD01 [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 64 418 56 ) ( 64 418 32 ) ( 80 418 56 ) +0~METALSTCH2 [ 1 0 0 -0 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 80 416 56 ) ( 80 416 32 ) ( 64 416 56 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 64 416 32 ) ( 80 416 32 ) ( 64 418 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 80 418 56 ) ( 80 416 56 ) ( 64 418 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 72 -160 56 ) ( 72 -160 32 ) ( 72 -162 56 ) METAL_BORD01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 56 -162 56 ) ( 56 -162 32 ) ( 56 -160 56 ) METAL_BORD01 [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 56 -160 56 ) ( 56 -160 32 ) ( 72 -160 56 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 72 -162 56 ) ( 72 -162 32 ) ( 56 -162 56 ) +A~METALSTCH2 [ 1 0 0 16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 56 -162 56 ) ( 56 -160 56 ) ( 72 -162 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 72 -160 32 ) ( 56 -160 32 ) ( 72 -162 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 56 -128 56 ) ( 56 -128 32 ) ( 56 -126 56 ) METAL_BORD01 [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 72 -126 56 ) ( 72 -126 32 ) ( 72 -128 56 ) METAL_BORD01 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 72 -128 56 ) ( 72 -128 32 ) ( 56 -128 56 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 56 -126 56 ) ( 56 -126 32 ) ( 72 -126 56 ) +A~METALSTCH2 [ 1 0 0 16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 72 -126 56 ) ( 72 -128 56 ) ( 56 -126 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 56 -128 32 ) ( 72 -128 32 ) ( 56 -126 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 288 104 56 ) ( 288 104 32 ) ( 288 88 56 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 286 88 56 ) ( 286 88 32 ) ( 286 104 56 ) +0~METALSTCH2 [ 0 -1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 288 88 56 ) ( 288 88 32 ) ( 286 88 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 286 104 56 ) ( 286 104 32 ) ( 288 104 56 ) METAL_BORD01 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 286 104 56 ) ( 288 104 56 ) ( 286 88 56 ) METAL_BORD01 [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 88 32 ) ( 288 104 32 ) ( 286 88 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( 320 88 56 ) ( 320 88 32 ) ( 320 104 56 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 322 104 56 ) ( 322 104 32 ) ( 322 88 56 ) +0~METALSTCH2 [ 0 1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 320 104 56 ) ( 320 104 32 ) ( 322 104 56 ) METAL_BORD01 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 322 88 56 ) ( 322 88 32 ) ( 320 88 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 322 88 56 ) ( 320 88 56 ) ( 322 104 56 ) METAL_BORD01 [ 1 0 -0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 320 104 32 ) ( 320 88 32 ) ( 322 104 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "env_spark" +"spawnflags" "64" +"MaxDelay" "0" +"angles" "90 0 0" +"origin" "160 400 96" +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 232 -110 0 ) ( 190.431 -86 0 ) ( 192 -179.282 0 ) NULL [ 0.866026 -0.5 0 0.0821056 ] [ -0.5 -0.866026 0 4.73715 ] 0 1 1 +( 150.431 -155.282 48 ) ( 190.431 -86 48 ) ( 192 -179.282 48 ) XCRATE10C [ -0.5 -0.866026 0 20.7372 ] [ -0.866026 0.5 0 15.9179 ] 90 1 1 +( 150.431 -155.282 48 ) ( 150.431 -155.282 0 ) ( 190.431 -86 48 ) XCRATE10B [ -0.5 -0.866026 0 20.7372 ] [ 0 0 -1 0 ] 0 1 1 +( 232 -110 48 ) ( 232 -110 0 ) ( 192 -179.282 48 ) XCRATE10D [ 0.5 0.866026 0 -20.7372 ] [ 0 0 -1 0 ] 0 1 1 +( 192 -179.282 48 ) ( 192 -179.282 0 ) ( 150.431 -155.282 48 ) XCRATE10A [ 0.866026 -0.5 0 -15.9179 ] [ 0 0 -1 0 ] 0 1 1 +( 190.431 -86 48 ) ( 190.431 -86 0 ) ( 232 -110 48 ) XCRATE10A [ 0.866026 -0.5 0 -15.9179 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "env_spark" +"spawnflags" "64" +"MaxDelay" "0" +"angles" "90 0 0" +"origin" "160 -144 96" +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 185.636 342.303 48 ) ( 164.93 419.577 48 ) ( 232 354.726 48 ) XCRATE10C [ 0.258819 -0.965926 0 -37.4072 ] [ -0.965926 -0.258819 0 27.9047 ] 90 1 1 +( 211.294 432 0 ) ( 164.93 419.577 0 ) ( 232 354.726 0 ) NULL [ 0.965926 0.258819 0 4.0953 ] [ 0.258819 -0.965926 0 10.5928 ] 0 1 1 +( 164.93 419.577 48 ) ( 164.93 419.577 0 ) ( 211.294 432 48 ) XCRATE10A [ 0.965926 0.258819 0 -27.9047 ] [ 0 0 -1 0 ] 0 1 1 +( 232 354.726 48 ) ( 232 354.726 0 ) ( 185.636 342.303 48 ) XCRATE10A [ 0.965926 0.258819 0 -27.9047 ] [ 0 0 -1 0 ] 0 1 1 +( 211.294 432 48 ) ( 211.294 432 0 ) ( 232 354.726 48 ) XCRATE10D [ -0.258819 0.965926 0 37.4072 ] [ 0 0 -1 0 ] 0 1 1 +( 185.636 342.303 48 ) ( 185.636 342.303 0 ) ( 164.93 419.577 48 ) XCRATE10B [ 0.258819 -0.965926 0 -37.4072 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 288 672 48 ) ( 288 672 0 ) ( 288 592 48 ) XCRATE10D [ -0 1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 240 592 48 ) ( 240 592 0 ) ( 240 672 48 ) XCRATE10B [ 0 -1 0 32 ] [ 0 0 -1 0 ] 0 1 1 +( 240 672 48 ) ( 240 672 0 ) ( 288 672 48 ) XCRATE10A [ 1 0 0 -0.000297546 ] [ 0 0 -1 0 ] 0 1 1 +( 288 592 48 ) ( 288 592 0 ) ( 240 592 48 ) XCRATE10A [ 1 0 0 -0.000297546 ] [ 0 0 -1 0 ] 0 1 1 +( 240 592 48 ) ( 240 672 48 ) ( 288 592 48 ) XCRATE10C [ 0 -1 0 31.9999 ] [ -1 -0 0 0.000259399 ] 90 1 1 +( 288 672 0 ) ( 240 672 0 ) ( 288 592 0 ) NULL [ 1 0 0 -0.000297546 ] [ 0 -1 0 16 ] 0 1 1 +} +} +{ +"classname" "ammo_556AR" +"angles" "0 300 0" +"origin" "252 612 48" +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 576 128 48 ) ( 576 128 0 ) ( 576 80 48 ) XCRATE10A [ -0 1 0 16.0004 ] [ 0 0 -1 0 ] 0 1 1 +( 496 80 48 ) ( 496 80 0 ) ( 496 128 48 ) XCRATE10A [ -0 1 0 16.0004 ] [ 0 0 -1 0 ] 0 1 1 +( 576 80 48 ) ( 576 80 0 ) ( 496 80 48 ) XCRATE10B [ 1 0 0 -16 ] [ 0 0 -1 0 ] 0 1 1 +( 496 128 48 ) ( 496 128 0 ) ( 576 128 48 ) XCRATE10D [ -1 -0 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 496 128 0 ) ( 496 80 0 ) ( 576 128 0 ) NULL [ -0 1 0 -15.9996 ] [ 1 0 0 0 ] 0 1 1 +( 576 80 48 ) ( 496 80 48 ) ( 576 128 48 ) XCRATE10C [ 1 0 0 -15.9999 ] [ 0 -1 0 -16.0003 ] 90 1 1 +} +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light5" +"origin" "160 0 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light4" +"origin" "160 128 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light3" +"origin" "160 256 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light4" +"origin" "-80 272 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light2" +"origin" "128 544 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light1" +"origin" "-64 544 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light6" +"origin" "-128 0 119" +} +{ +"classname" "light" +"spawnflags" "0" +"angles" "90 0 0" +"_falloff" "0" +"_fade" "1.0" +"style" "0" +"_light" "250 240 220 75" +"targetname" "light6" +"origin" "448 0 119" +} +{ +"classname" "func_breakable" +"_minlight" "0" +"spawnflags" "256" +"onlydamagedby" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +"explodemagnitude" "0" +"health" "100" +"delay" "0" +"material" "1" +"spawnobject" "4" +{ +( 288 256 96 ) ( 288 256 0 ) ( 288 184 96 ) CRATE10 [ 0 1 0 -53.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 216 184 96 ) ( 216 184 0 ) ( 216 256 96 ) CRATE11 [ 0 1 0 -53.3333 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 216 256 96 ) ( 216 256 0 ) ( 288 256 96 ) CRATE10 [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 288 184 96 ) ( 288 184 0 ) ( 216 184 96 ) CRATE10 [ 1 0 0 -0 ] [ 0 0 -1 0 ] 0 0.75 0.75 +( 216 184 96 ) ( 216 256 96 ) ( 288 184 96 ) CRATE13 [ 1 0 0 -0 ] [ 0 -1 0 53.3333 ] 0 0.75 0.75 +( 288 256 0 ) ( 216 256 0 ) ( 288 184 0 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( -175 384 80 ) ( -175 384 48 ) ( -175 352 80 ) LAB1_COMP3B [ 0 1 0 -0 ] [ 0 0 -1 16 ] 0 1 1 +( -176 352 80 ) ( -176 352 48 ) ( -176 384 80 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 352 80 ) ( -175 352 48 ) ( -176 352 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 80 ) ( -176 384 48 ) ( -175 384 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -176 384 48 ) ( -176 352 48 ) ( -175 384 48 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -175 352 80 ) ( -176 352 80 ) ( -175 384 80 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -176 224 80 ) ( -176 224 48 ) ( -176 288 80 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 288 80 ) ( -175 288 48 ) ( -175 224 80 ) LAB1_COMP3 [ 0 1 0 -32 ] [ 0 0 -1 16 ] 0 1 1 +( -176 288 80 ) ( -176 288 48 ) ( -175 288 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 224 80 ) ( -175 224 48 ) ( -176 224 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 224 80 ) ( -176 224 80 ) ( -175 288 80 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -176 288 48 ) ( -176 224 48 ) ( -175 288 48 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -176 288 80 ) ( -176 288 48 ) ( -176 352 80 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 352 80 ) ( -175 352 48 ) ( -175 288 80 ) LAB1_COMP1 [ 0 1 0 -32 ] [ 0 0 -1 16 ] 0 1 1 +( -176 352 80 ) ( -176 352 48 ) ( -175 352 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 288 80 ) ( -175 288 48 ) ( -176 288 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 288 80 ) ( -176 288 80 ) ( -175 352 80 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( -176 352 48 ) ( -176 288 48 ) ( -175 352 48 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +} +{ +( -176 160 80 ) ( -176 160 48 ) ( -176 224 80 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 224 80 ) ( -175 224 48 ) ( -175 160 80 ) LAB1_COMP2 [ 0 1 0 32 ] [ 0 0 -1 16 ] 0 1 1 +( -176 224 80 ) ( -176 224 48 ) ( -175 224 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 160 80 ) ( -175 160 48 ) ( -176 160 80 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -175 160 80 ) ( -176 160 80 ) ( -175 224 80 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( -176 224 48 ) ( -176 160 48 ) ( -175 224 48 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 288 384 128 ) ( 288 384 120 ) ( 288 320 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 384 128 ) ( 280 384 128 ) ( 288 384 120 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 320 128 ) ( 288 320 120 ) ( 280 320 128 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 320 128 ) ( 280 320 128 ) ( 288 384 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 320 120 ) ( 288 384 120 ) ( 280 320 128 ) ~LIGHT3A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( -96 -128 128 ) ( -96 -120 128 ) ( -96 -128 120 ) METAL_BORD06 [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -160 -128 128 ) ( -160 -128 120 ) ( -160 -120 128 ) METAL_BORD06 [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -96 -128 128 ) ( -96 -128 120 ) ( -160 -128 128 ) NULL [ 1 0 0 -16 ] [ 0 0 -1 0 ] 0 1 1 +( -160 -128 128 ) ( -160 -120 128 ) ( -96 -128 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 16 ] 0 1 1 +( -160 -128 120 ) ( -96 -128 120 ) ( -160 -120 128 ) ~LIGHT3A [ 1 0 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 176 -256 128 ) ( 176 -256 127 ) ( 176 -320 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -320 128 ) ( 144 -320 127 ) ( 144 -256 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 176 -320 128 ) ( 176 -320 127 ) ( 144 -320 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -256 128 ) ( 144 -256 127 ) ( 176 -256 128 ) NULL [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -256 128 ) ( 176 -256 128 ) ( 144 -320 128 ) NULL [ 0 -1 0 -0 ] [ -1 -0 0 -0 ] 0 1 1 +( 176 -320 127 ) ( 176 -256 127 ) ( 144 -320 127 ) +A~LIGHT2A [ 0 -1 0 -0 ] [ -1 -0 0 16 ] 0 1 1 +} +} +{ +"classname" "env_spark" +"spawnflags" "64" +"MaxDelay" "0" +"angles" "90 0 0" +"origin" "160 -288 128" +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 288 576 128 ) ( 288 576 120 ) ( 288 512 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 576 128 ) ( 280 576 128 ) ( 288 576 120 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 512 128 ) ( 288 512 120 ) ( 280 512 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 512 128 ) ( 280 512 128 ) ( 288 576 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 512 120 ) ( 288 576 120 ) ( 280 512 128 ) ~LIGHT3A [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( -224 512 128 ) ( -224 512 120 ) ( -224 576 128 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 512 128 ) ( -216 512 128 ) ( -224 512 120 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 576 128 ) ( -224 576 120 ) ( -216 576 128 ) NULL [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -224 576 128 ) ( -216 576 128 ) ( -224 512 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( -224 576 120 ) ( -224 512 120 ) ( -216 576 128 ) ~LIGHT3A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 288 -64 128 ) ( 288 -64 120 ) ( 288 -128 128 ) NULL [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -64 128 ) ( 280 -64 128 ) ( 288 -64 120 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -128 128 ) ( 288 -128 120 ) ( 280 -128 128 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 -128 128 ) ( 280 -128 128 ) ( 288 -64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -0 ] 0 1 1 +( 288 -128 120 ) ( 288 -64 120 ) ( 280 -128 128 ) ~LIGHT3A [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 288 64 128 ) ( 288 64 120 ) ( 288 0 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 0 128 ) ( 288 0 120 ) ( 280 0 128 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 64 128 ) ( 280 64 128 ) ( 288 64 120 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 0 128 ) ( 280 0 128 ) ( 288 64 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 0 120 ) ( 288 64 120 ) ( 280 0 128 ) ~LIGHT3A [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 288 192 128 ) ( 288 192 120 ) ( 288 128 128 ) NULL [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 192 128 ) ( 280 192 128 ) ( 288 192 120 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 128 128 ) ( 288 128 120 ) ( 280 128 128 ) METAL_BORD06 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 288 128 128 ) ( 280 128 128 ) ( 288 192 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 +( 288 128 120 ) ( 288 192 120 ) ( 280 128 128 ) ~LIGHT3A [ 0 1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 32 320 128 ) ( 32 320 120 ) ( 32 384 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 128 ) ( 32 384 120 ) ( 40 384 128 ) NULL [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 320 128 ) ( 40 320 128 ) ( 32 320 120 ) METAL_BORD06 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 384 128 ) ( 40 384 128 ) ( 32 320 128 ) NULL [ -1 -0 0 -0 ] [ -0 1 0 -0 ] 0 1 1 +( 32 384 120 ) ( 32 320 120 ) ( 40 384 128 ) ~LIGHT3A [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 32 192 128 ) ( 32 192 120 ) ( 32 256 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 192 128 ) ( 40 192 128 ) ( 32 192 120 ) METAL_BORD06 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 256 128 ) ( 32 256 120 ) ( 40 256 128 ) METAL_BORD06 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 256 128 ) ( 40 256 128 ) ( 32 192 128 ) NULL [ -1 -0 0 -0 ] [ -0 1 0 -0 ] 0 1 1 +( 32 256 120 ) ( 32 192 120 ) ( 40 256 128 ) ~LIGHT3A [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 32 64 128 ) ( 32 64 120 ) ( 32 128 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 128 128 ) ( 32 128 120 ) ( 40 128 128 ) METAL_BORD06 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 64 128 ) ( 40 64 128 ) ( 32 64 120 ) METAL_BORD06 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 128 128 ) ( 40 128 128 ) ( 32 64 128 ) NULL [ -1 -0 0 -0 ] [ -0 1 0 -0 ] 0 1 1 +( 32 128 120 ) ( 32 64 120 ) ( 40 128 128 ) ~LIGHT3A [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 32 -128 128 ) ( 32 -128 120 ) ( 32 -64 128 ) NULL [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -64 128 ) ( 32 -64 120 ) ( 40 -64 128 ) METAL_BORD06 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -128 128 ) ( 40 -128 128 ) ( 32 -128 120 ) NULL [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( 32 -64 128 ) ( 40 -64 128 ) ( 32 -128 128 ) NULL [ -1 -0 0 -0 ] [ -0 1 0 -0 ] 0 1 1 +( 32 -64 120 ) ( 32 -128 120 ) ( 40 -64 128 ) ~LIGHT3A [ 0 -1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( -96 128 128 ) ( -96 128 120 ) ( -96 120 128 ) METAL_BORD06 [ -0 1 0 -16 ] [ 0 -0 -1 0 ] 0 1 1 +( -160 128 128 ) ( -160 120 128 ) ( -160 128 120 ) METAL_BORD06 [ -0 1 0 -16 ] [ 0 -0 -1 0 ] 0 1 1 +( -160 128 128 ) ( -160 128 120 ) ( -96 128 128 ) NULL [ -1 -0 0 -16 ] [ 0 -0 -1 0 ] 0 1 1 +( -96 128 128 ) ( -96 120 128 ) ( -160 128 128 ) NULL [ -0 1 0 -16 ] [ 1 0 0 16 ] 0 1 1 +( -96 128 120 ) ( -160 128 120 ) ( -96 120 128 ) ~LIGHT3A [ -1 -0 0 -32 ] [ 0 -0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( 56 -416 56 ) ( 56 -416 32 ) ( 56 -414 56 ) METAL_BORD01 [ 0 -1 0 -32 ] [ 0 0 -1 0 ] 0 1 1 +( 72 -414 56 ) ( 72 -414 32 ) ( 72 -416 56 ) METAL_BORD01 [ 0 1 0 32 ] [ 0 0 -1 0 ] 0 1 1 +( 72 -416 56 ) ( 72 -416 32 ) ( 56 -416 56 ) NULL [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 56 -414 56 ) ( 56 -414 32 ) ( 72 -414 56 ) +A~METALSTCH2 [ 1 0 0 16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( 72 -414 56 ) ( 72 -416 56 ) ( 56 -414 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 -32 ] 0 1 1 +( 56 -416 32 ) ( 72 -416 32 ) ( 56 -414 32 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 -1 0 -32 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"_minlight" "0" +"rendercolor" "0 0 0" +"renderamt" "255" +{ +( -256 88 56 ) ( -256 88 32 ) ( -256 104 56 ) NULL [ 0 -1 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -254 104 56 ) ( -254 104 32 ) ( -254 88 56 ) +A~METALSTCH2 [ 0 -1 0 -16 ] [ 0 0 -1 16 ] 0 0.5 0.5 +( -256 104 56 ) ( -256 104 32 ) ( -254 104 56 ) METAL_BORD01 [ -1 -0 0 -0 ] [ 0 0 -1 0 ] 0 1 1 +( -254 88 56 ) ( -254 88 32 ) ( -256 88 56 ) METAL_BORD01 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( -254 88 56 ) ( -256 88 56 ) ( -254 104 56 ) METAL_BORD01 [ 0 -1 0 -32 ] [ -1 -0 0 -0 ] 0 1 1 +( -256 104 32 ) ( -256 88 32 ) ( -254 104 32 ) METAL_BORD01 [ 0 -1 0 -32 ] [ -1 -0 0 -0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( -0 32 128 ) ( -0 32 120 ) ( 0 -32 128 ) NULL [ -0 1 0 15.9999 ] [ 0 0 -1 0 ] 0 1 1 +( -0 32 128 ) ( -8 32 128 ) ( -0 32 120 ) METAL_BORD06 [ 1 0 0 48 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -32 128 ) ( 0 -32 120 ) ( -8 -32 128 ) METAL_BORD06 [ 1 0 0 48 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -32 128 ) ( -8 -32 128 ) ( -0 32 128 ) NULL [ 1 0 0 0 ] [ 0 -1 0 -15.9999 ] 0 1 1 +( 0 -32 120 ) ( -0 32 120 ) ( -8 -32 128 ) ~LIGHT3A [ -0 1 0 31.9999 ] [ 0 0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( -256 -32 128 ) ( -256 -32 120 ) ( -256 32 128 ) NULL [ 0 -1 0 0.00028801 ] [ 0 -0 -1 0 ] 0 1 1 +( -256 32 128 ) ( -256 32 120 ) ( -248 32 128 ) METAL_BORD06 [ -1 -0 0 -16 ] [ 0 -0 -1 0 ] 0 1 1 +( -256 -32 128 ) ( -248 -32 128 ) ( -256 -32 120 ) METAL_BORD06 [ -1 -0 0 -16 ] [ 0 -0 -1 0 ] 0 1 1 +( -256 32 128 ) ( -248 32 128 ) ( -256 -32 128 ) NULL [ -1 -0 0 -0 ] [ -0 1 0 -0.00028801 ] 0 1 1 +( -256 32 120 ) ( -256 -32 120 ) ( -248 32 128 ) ~LIGHT3A [ 0 -1 0 32.0003 ] [ 0 -0 -1 0 ] 0 1 1 +} +} +{ +"classname" "func_wall" +"zhlt_lightflags" "0" +"rendercolor" "0 0 0" +"rendermode" "0" +"renderfx" "0" +{ +( 169.359 402.641 48 ) ( 189.359 368 48 ) ( 204 422.641 48 ) XCRATE4B [ 0.866025 0.5 0 24.235 ] [ 0.5 -0.866025 0 48.3888 ] 0 0.5 0.5 +( 224 388 80 ) ( 189.359 368 80 ) ( 204 422.641 80 ) XCRATE4B [ 0.866025 0.5 0 24.0205 ] [ 0.5 -0.866025 0 48.0356 ] 0 0.5 0.5 +( 224 388 80 ) ( 224 388 48 ) ( 189.359 368 80 ) XCRATE4A [ 0.866025 0.5 0 24.0205 ] [ 0 0 -1 32 ] 0 0.5 0.5 +( 169.359 402.641 80 ) ( 169.359 402.641 48 ) ( 204 422.641 80 ) XCRATE4A [ 0.866025 0.5 0 24.0205 ] [ 0 0 -1 32 ] 0 0.5 0.5 +( 204 422.641 80 ) ( 204 422.641 48 ) ( 224 388 80 ) XCRATE4A [ -0.5 0.866025 0 -43.8361 ] [ 0 0 -1 32 ] 0 0.5 0.5 +( 189.359 368 80 ) ( 189.359 368 48 ) ( 169.359 402.641 80 ) XCRATE4A [ -0.5 0.866025 0 -48.0356 ] [ 0 0 -1 32 ] 0 0.5 0.5 +} +} +{ +"classname" "info_player_team2" +"angles" "0 0 0" +"origin" "224 -352 36" +} +{ +"classname" "info_player_team1" +"angles" "0 0 0" +"origin" "-192 -64 37" +} +{ +"classname" "info_player_team1" +"angles" "0 0 0" +"origin" "-192 64 37" +} +{ +"classname" "info_player_team1" +"angles" "0 0 0" +"origin" "-112 -64 37" +} +{ +"classname" "info_player_team1" +"angles" "0 0 0" +"origin" "-112 64 37" +} +{ +"classname" "info_player_team1" +"angles" "0 0 0" +"origin" "-32 -64 37" +} +{ +"classname" "info_player_team2" +"angles" "0 0 0" +"origin" "96 -352 36" +} +{ +"classname" "info_player_team2" +"angles" "0 0 0" +"origin" "224 -272 36" +} +{ +"classname" "info_player_team2" +"angles" "0 0 0" +"origin" "96 -272 36" +} +{ +"classname" "info_player_team2" +"angles" "0 0 0" +"origin" "224 -192 36" +} +{ +"classname" "infodecal" +"texture" "{BIGBLOOD1" +"origin" "-96 208 0" +} +{ +"classname" "infodecal" +"texture" "{BIGBLOOD2" +"origin" "-112 160 68" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND2" +"origin" "28 232 56" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND3" +"origin" "32 -294 42" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND2" +"origin" "288 -315 58" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND2" +"origin" "67 -162 44" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND5" +"origin" "32 -218 53" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND5" +"origin" "128 -152 68" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND6" +"origin" "288 -218 53" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND3" +"origin" "28 329 43" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND2" +"origin" "20 232 56" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND5" +"origin" "34 367 43" +} +{ +"classname" "infodecal" +"texture" "{BLOODHAND6" +"origin" "32 294 50" +} +{ +"classname" "infodecal" +"texture" "{BLOOD5" +"origin" "-175 203 66" +} +{ +"classname" "infodecal" +"texture" "{BLOOD3" +"origin" "-123 205 128" +} +{ +"classname" "infodecal" +"texture" "{BLOOD5" +"origin" "-82 314 0" +} +{ +"classname" "multi_manager" +"light1" "0.5" +"light2" "1.0" +"light3" "1.5" +"light4" "2.0" +"light5" "2.5" +"light6" "3.0" +"targetname" "light_mm" +"origin" "160 256 64" +} +{ +"classname" "multi_manager" +"light1" "3.0" +"light2" "2.5" +"light3" "2.0" +"light4" "1.5" +"light5" "1.0" +"light6" "0.5" +"targetname" "light_r_mm" +"downsound" "0.1" +"origin" "160 256 80" +} +{ +"classname" "ambient_generic" +"spawnflags" "56" +"cspinup" "0" +"lfomodvol" "0" +"lfomodpitch" "0" +"lforate" "0" +"lfotype" "0" +"spindown" "0" +"spinup" "0" +"pitchstart" "100" +"pitch" "100" +"fadeout" "0" +"fadein" "0" +"volstart" "0" +"preset" "0" +"health" "10" +"message" "ambience/xtal_down1.wav" +"targetname" "downsound" +"origin" "160 256 96" +} +{ +"classname" "ambient_generic" +"spawnflags" "50" +"cspinup" "0" +"lfomodvol" "0" +"lfomodpitch" "0" +"lforate" "0" +"lfotype" "0" +"spindown" "0" +"spinup" "0" +"pitchstart" "100" +"pitch" "100" +"fadeout" "0" +"fadein" "0" +"volstart" "0" +"preset" "0" +"health" "10" +"message" "weapons/357_shot1.wav" +"targetname" "downsound" +"origin" "-96 248 40" +} +{ +"classname" "multi_manager" +"light_r_mm" "3.0" +"targetname" "spawndoor_mm" +"spawndoor" "0.0" +"origin" "-16 96 48" +} diff --git a/sdk/zombiepanic.fgd b/sdk/zombiepanic.fgd new file mode 100644 index 0000000..285f417 --- /dev/null +++ b/sdk/zombiepanic.fgd @@ -0,0 +1,290 @@ +@BaseClass = Global +[ + globalname(string) : "Global Entity Name" +] + +@BaseClass = Angles +[ + angles(string) : "Pitch Yaw Roll (Y Z X)" : "0 0 0" +] + +@BaseClass = Target +[ + target(target_destination) : "Target" +] + +@BaseClass = Targetname +[ + targetname(target_source) : "Name" +] + +@BaseClass = Team +[ + team(choices) : "Team" : 0 = + [ + 0: "None" + 1: "Terrorists" + 2: "Counter-Terrorists" + ] +] + +@BaseClass base(Targetname, Global) = Breakable +[ + target(target_destination) : "Target on break" + health(integer) : "Strength" : 1 + material(choices) :"Material type" : 0 = + [ + 0: "Glass" + 1: "Wood" + 2: "Metal" + 3: "Flesh" + 4: "Cinder Block" + 5: "Ceiling Tile" + 6: "Computer" + 7: "Unbreakable Glass" + 8: "Rocks" + ] + explosion(choices) : "Gibs Direction" : 0 = + [ + 0: "Random" + 1: "Relative to Attack" + ] + delay(string) : "Delay before fire" : "0" + gibmodel(studio) : "Gib Model" : "" + spawnobject(choices) : "Spawn On Break" : 0 = + [ + 0: "Nothing" + 1: "Armor" + 2: "Healthkit" + 3: "Colt .45" + 4: ".45 Clip" + 5: "M-4 Rifle" + 6: "M-4 Rifle Magazine" + 7: "Shotgun" + 8: "Shotgun Shells" + 9: "357" + 10: "357 clip" + 11: "Hand grenade" + 12: "Satchel Charge" + ] + explodemagnitude(integer) : "Explode Magnitude (0=none)" : 0 +] + +@BaseClass base(Target, Targetname) = Trigger +[ + killtarget(target_destination) : "Kill target" + netname(target_destination) : "Target Path" + master(string) : "Master" + sounds(choices) : "Sound style" : 0 = + [ + 0 : "No Sound" + ] + delay(string) : "Delay before trigger" : "0" + message(string) : "Message (set sound too!)" + spawnflags(flags) = + [ + 1: "Monsters" : 0 + 2: "No Clients" : 0 + 4: "Pushables": 0 + ] +] + +@BaseClass = RenderFxChoices +[ + renderfx(choices) :"Render FX" : 0 = + [ + 0: "Normal" + 1: "Slow Pulse" + 2: "Fast Pulse" + 3: "Slow Wide Pulse" + 4: "Fast Wide Pulse" + 9: "Slow Strobe" + 10: "Fast Strobe" + 11: "Faster Strobe" + 12: "Slow Flicker" + 13: "Fast Flicker" + 5: "Slow Fade Away" + 6: "Fast Fade Away" + 7: "Slow Become Solid" + 8: "Fast Become Solid" + 14: "Constant Glow" + 15: "Distort" + 16: "Hologram (Distort + fade)" + ] +] + +@BaseClass base(RenderFxChoices) = RenderFields +[ + rendermode(choices) : "Render Mode" : 0 = + [ + 0: "Normal" + 1: "Color" + 2: "Texture" + 3: "Glow" + 4: "Solid" + 5: "Additive" + ] + renderamt(integer) : "FX Amount (1 - 255)" + rendercolor(color255) : "FX Color (R G B)" : "0 0 0" +] + + +@SolidClass base(Breakable, RenderFields) = func_breakable : "Breakable Object" +[ + spawnflags(flags) = + [ + 1 : "Only Trigger" : 0 + 2 : "Touch" : 0 + 4 : "Pressure" : 0 + 16: "Explosion Only": 0 + 256: "Instant Crowbar" : 1 + ] + _minlight(string) : "Minimum light level" +] + +@SolidClass base(Global, Targetname, Target, RenderFields, Angles) = func_button : "Button" +[ + speed(integer) : "Speed" : 5 + health(integer) : "Health (shootable if > 0)" + lip(integer) : "Lip" + master(string) : "Master" + sounds(choices) : "Sounds" : 0 = + [ + 0: "None" + 1: "Big zap & Warmup" + 2: "Access Denied" + 3: "Access Granted" + 4: "Quick Combolock" + 5: "Power Deadbolt 1" + 6: "Power Deadbolt 2" + 7: "Plunger" + 8: "Small zap" + 9: "Keycard Sound" + 10: "Buzz" + 11: "Buzz Off" + 14: "Lightswitch" + ] + wait(integer) : "delay before reset (-1 stay)" : 3 + delay(string) : "Delay before trigger" : "0" + spawnflags(flags) = + [ + 1: "Don't move" : 0 + 32: "Toggle" : 0 + 64: "Sparks" : 0 + 256:"Touch Activates": 0 + 512:"Human Only": 0 + ] + locked_sound(choices) : "Locked Sound" : 0 = + [ + 0: "None" + 2: "Access Denied" + 8: "Small zap" + 10: "Buzz" + 11: "Buzz Off" + 12: "Latch Locked" + ] + unlocked_sound(choices) : "Unlocked Sound" : 0 = + [ + 0: "None" + 1: "Big zap & Warmup" + 3: "Access Granted" + 4: "Quick Combolock" + 5: "Power Deadbolt 1" + 6: "Power Deadbolt 2" + 7: "Plunger" + 8: "Small zap" + 9: "Keycard Sound" + 10: "Buzz" + 13: "Latch Unlocked" + 14: "Lightswitch" + ] + locked_sentence(choices) : "Locked Sentence" : 0 = + [ + 0: "None" + 1: "Gen. Access Denied" + 2: "Security Lockout" + 3: "Blast Door" + 4: "Fire Door" + 5: "Chemical Door" + 6: "Radiation Door" + 7: "Gen. Containment" + 8: "Maintenance Door" + 9: "Broken Shut Door" + ] + unlocked_sentence(choices) : "Unlocked Sentence" : 0 = + [ + 0: "None" + 1: "Gen. Access Granted" + 2: "Security Disengaged" + 3: "Blast Door" + 4: "Fire Door" + 5: "Chemical Door" + 6: "Radiation Door" + 7: "Gen. Containment" + 8: "Maintenance area" + ] + _minlight(string) : "Minimum light level" +] + +@BaseClass base(Angles) size(-16 -16 -36, 16 16 36) color(0 255 0) = PlayerClass [] +@BaseClass size(-16 -16 0, 16 16 32) color(0 0 200) base(Targetname, Angles) = Weapon [] + +@PointClass base(PlayerClass) = info_player_team1 : "Survivor Start" [] +@PointClass base(PlayerClass) = info_player_team2 : "Zombie Start" [] + +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_9mmclip.mdl") += ammo_9mmclip : "9mm Pistol Ammo" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_556ARclip.mdl") += ammo_556AR : "5.56mm Assault Rifle Ammo" [] +@PointClass + base(Weapon) + Studio("models/w_chainammo.mdl") += ammo_556box : "box of 200 5.56mm rounds" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_shotbox.mdl") += ammo_buckshot : "Shotgun Ammo" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_357ammobox.mdl") += ammo_357 : "357 Ammo" [] + +@PointClass + base(Weapon) + Studio("models/w_crowbar.mdl") += weapon_crowbar : "Crowbar" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_9mmhandgun.mdl") += weapon_9mmhandgun : "9mm Handgun" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_357.mdl") += weapon_357 : "357 Handgun" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_556ar.mdl") += weapon_556AR : "5.56mm Assault Rifle" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_shotgun.mdl") += weapon_shotgun : "Shotgun" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_satchel.mdl") += weapon_satchel : "Satchel Charge Ammo" [] +@PointClass + base(Weapon) + Studio("models/zombiepanic/v100/items/w_grenade.mdl") += weapon_handgrenade : "Handgrenade Ammo" [] + +@SolidClass base(Trigger) = trigger_endround : "Trigger: End Round" [ + spawnflags(flags) = + [ + 1: "For all" : 0 + ] +] diff --git a/src/include/api_custom_weapons.inc b/src/include/api_custom_weapons.inc index 771dcb5..b720c90 100644 --- a/src/include/api_custom_weapons.inc +++ b/src/include/api_custom_weapons.inc @@ -1,3 +1,5 @@ +// This is a beta version, some functions may be unstable. Use at your own risk. + #if defined _api_custom_weapons_included #endinput #endif @@ -8,6 +10,8 @@ #define WEAPON_NOCLIP -1 #define CW_INVALID_HANDLER CW:-1 +#define DEFAULT_FOV 90 + #define VECTOR_CONE_1DEGREES {0.00873, 0.00873, 0.00873} #define VECTOR_CONE_2DEGREES {0.01745, 0.01745, 0.01745} #define VECTOR_CONE_3DEGREES {0.02618, 0.02618, 0.02618} @@ -20,7 +24,7 @@ #define VECTOR_CONE_10DEGREES {0.08716, 0.08716, 0.08716} #define VECTOR_CONE_15DEGREES {0.13053, 0.13053, 0.13053} #define VECTOR_CONE_20DEGREES {0.17365, 0.17365, 0.17365} -#define VECTOR_CONE_DM_SHOTGUN {0.08716, 0.04362, 0.00} +#define VECTOR_CONE_DM_SHOTGUN {0.08716, 0.04362, 0.00} #define VECTOR_CONE_DM_DOUBLESHOTGUN {0.17365, 0.04362, 0.00} enum CW_Binding { @@ -39,11 +43,21 @@ enum CW_Binding { CWB_GrenadeThrow } -native CW:CW_Register(const szName[], iWeaponId, iClipSize = WEAPON_NOCLIP, iPrimaryAmmoType = -1, iPrimaryAmmoMaxAmount = -1, iSecondaryAmmoType = -1, iSecondaryAmmoMaxAmount = -1, iSlotId = 0, iPosition = 0, iWeaponFlags = 0, const szIcon[] = ""); +enum CW_Flags (<<=1) { + CWF_None, + CWF_NoBulletSmoke = 1, + CWF_NoBulletDecal +} + +native CW:CW_Register(const szName[], iWeaponId, iClipSize = WEAPON_NOCLIP, iPrimaryAmmoType = -1, iPrimaryAmmoMaxAmount = -1, iSecondaryAmmoType = -1, iSecondaryAmmoMaxAmount = -1, iSlotId = 0, iPosition = 0, iWeaponFlags = 0, const szIcon[] = "", CW_Flags:iFlags = CWF_None); native CW_Bind(CW:iHandler, CW_Binding:iBinding, const szFunctionName[]); native CW:CW_GetHandlerByEntity(iEntity); native CW:CW_GetHandler(const szName[]); +native CW_Deploy(pItem); +native CW_Holster(pItem); +native CW_ItemPostFrame(pItem); +native CW_Idle(pItem); native CW_Reload(pItem); native CW_PrimaryAttack(pItem); native CW_SecondaryAttack(pItem); diff --git a/src/include/zombiepanic.inc b/src/include/zombiepanic.inc index fcbc899..2ef62b4 100644 --- a/src/include/zombiepanic.inc +++ b/src/include/zombiepanic.inc @@ -7,12 +7,6 @@ #include -enum ZP_CharacterModels { - CharacterModel_Human, - CharacterModel_Zombie, - CharacterModel_Swipe -} - // Player native bool:ZP_Player_IsZombie(pPlayer); @@ -20,26 +14,27 @@ native bool:ZP_Player_Panic(pPlayer); native bool:ZP_Player_InPanic(pPlayer); native bool:ZP_Player_ToggleFlashlight(pPlayer); native bool:ZP_Player_ToggleZombieVision(pPlayer); -native ZP_Player_PlayZombieAmbient(pPlayer); -forward Zp_Fw_PlayerJoined(pPlayer); +forward ZP_Fw_PlayerJoined(pPlayer); +forward ZP_Fw_PlayerPanic(pPlayer); +forward ZP_Fw_PlayerZombieVision(pPlayer, bool:bValue); +forward ZP_Fw_Player_AimItem(pPlayer, pItem); // Player inventory native ZP_Player_UpdateSpeed(pPlayer); -native ZP_Player_GetCharacter(pPlayer); -native ZP_Player_DropBackpack(pPlayer); +native ZP_Player_DropUnactiveWeapons(pPlayer); +native ZP_Player_DropUnactiveAmmo(pPlayer); native ZP_Player_GetAmmo(pPlayer, const szAmmo[]); native ZP_Player_SetAmmo(pPlayer, const szAmmo[], iValue); native ZP_Player_AddAmmo(pPlayer, const szAmmo[], iValue); native ZP_Player_NextAmmo(pPlayer); native ZP_Player_DropAmmo(pPlayer); -// Characters +// Weapons -native ZP_GetCharacterModelPath(iCharacter, const szPath[], iLen); -native ZP_GetCharacterCount(); -native ZP_GetCharacterModel(iCharacter, ZP_CharacterModels:iModel, szOut[], iLen); +native ZP_Weapons_Register(CW:iCwHandler, Float:flWeight); +native Float:ZP_Weapons_GetWeight(pEntity); // Ammo @@ -50,6 +45,7 @@ native ZP_Ammo_GetName(iHandler, szOut[], iLen); native ZP_Ammo_GetPackSize(iHandler); native ZP_Ammo_GetPackModel(iHandler, szOut[], iLen); native ZP_Ammo_GetMaxAmount(iHandler); +native Float:ZP_Ammo_GetWeight(iHandler); native ZP_Ammo_GetCount(); // Game Rules @@ -58,4 +54,9 @@ native bool:ZP_GameRules_GetObjectiveMode(); native ZP_GameRules_SetObjectiveMode(bool:bValue); native ZP_GameRules_GetZombieLives(); native ZP_GameRules_SetZombieLives(iLives); +native ZP_GameRules_RespawnAsZombie(pPlayer); native ZP_GameRules_DispatchWin(iTeam); + +// Map Info + +native ZP_ShowMapInfo(pPlayer); diff --git a/src/include/zombiepanic_const.inc b/src/include/zombiepanic_const.inc index b8098c3..730db43 100644 --- a/src/include/zombiepanic_const.inc +++ b/src/include/zombiepanic_const.inc @@ -1,5 +1,5 @@ #define ZP_TITLE "Zombie Panic Beta" -#define ZP_VERSION "0.9.5" +#define ZP_VERSION "1.0.0" #define ZP_HUMAN_TEAM 2 #define ZP_ZOMBIE_TEAM 1 @@ -7,21 +7,90 @@ #define ZP_HUMAN_WIN_MESSAGE "#CTs_Win" #define ZP_ZOMBIE_TEAM_NAME "Zombies" #define ZP_HUMAN_TEAM_NAME "Survivors" -#define ZP_HUMAN_SPEED 200.0 -#define ZP_ZOMBIE_SPEED (ZP_HUMAN_SPEED * 0.85875) + #define ZP_HUMAN_HEALTH 100.0 #define ZP_ZOMBIE_HEALTH 200.0 #define ZP_NEW_ROUND_DELAY 5.0 #define ZP_AMMO_RESPAWN_TIME 150.0 - -stock const ZP_WEAPON_PISTOL[] = "zombiepanic/b1/weapon_9mmhandgun"; -stock const ZP_WEAPON_RIFLE[] = "zombiepanic/b1/weapon_556AR"; -stock const ZP_WEAPON_SHOTGUN[] = "zombiepanic/b1/weapon_shotgun"; -stock const ZP_WEAPON_MAGNUM[] = "zombiepanic/b1/weapon_357"; -stock const ZP_WEAPON_SATCHEL[] = "zombiepanic/b1/weapon_satchel"; -stock const ZP_WEAPON_GRENADE[] = "zombiepanic/b1/weapon_handgrenade"; -stock const ZP_WEAPON_SWIPE[] = "zombiepanic/b1/weapon_swipe"; -stock const ZP_WEAPON_CROWBAR[] = "zombiepanic/b1/weapon_crowbar"; +#define ZP_BUTTON_FLAG_HUMAN_ONLY BIT(9) + +#define ZP_MODE 1 // 1 - classic, 2 - zps + +#if ZP_MODE == 1 + #define ZP_HUMAN_SPEED 260.0 + #define ZP_ZOMBIE_SPEED (ZP_HUMAN_SPEED * 0.76923) + #define ZP_PANIC_SPEED_MODIFIER 1.0 + #define ZP_STRAFE_SPEED_MODIFIER 0.612961 + #define ZP_BACKWARD_SPEED_MODIFIER 0.5 + #define ZP_DUCK_SPEED_MODIFIER 1.066825 + + #define ZP_WEIGHT_MELEE (ZP_HUMAN_SPEED / 52.0) + #define ZP_WEIGHT_PISTOL (ZP_HUMAN_SPEED / 21.66) + #define ZP_WEIGHT_MAGNUM (ZP_HUMAN_SPEED / 18.5714) + #define ZP_WEIGHT_RIFLE (ZP_HUMAN_SPEED / 13.0) + #define ZP_WEIGHT_SHOTGUN (ZP_HUMAN_SPEED / 11.8181) + #define ZP_WEIGHT_GRENADE (ZP_HUMAN_SPEED / 52.0) + #define ZP_WEIGHT_SATCHEL (ZP_HUMAN_SPEED / 52.0) + + #define ZP_WEIGHT_PISTOL_AMMO (ZP_HUMAN_SPEED / 910.0455) + #define ZP_WEIGHT_MAGNUM_AMMO (ZP_HUMAN_SPEED / 346.6666) + #define ZP_WEIGHT_RIFLE_AMMO (ZP_HUMAN_SPEED / 1040.0) + #define ZP_WEIGHT_SHOTGUN_AMMO (ZP_HUMAN_SPEED / 173.3333) +#elseif ZP_MODE == 2 + #define ZP_HUMAN_SPEED 195.0 + #define ZP_ZOMBIE_SPEED (ZP_HUMAN_SPEED * 0.77435) + #define ZP_PANIC_SPEED_MODIFIER 1.10487 + #define ZP_STRAFE_SPEED_MODIFIER 1.0 + #define ZP_BACKWARD_SPEED_MODIFIER 0.87179 + #define ZP_DUCK_SPEED_MODIFIER 1.066825 + + #define ZP_WEIGHT_MELEE (ZP_HUMAN_SPEED / 22.94) + #define ZP_WEIGHT_PISTOL (ZP_HUMAN_SPEED / 25.4902) + #define ZP_WEIGHT_MAGNUM (ZP_HUMAN_SPEED / 16.3865) + #define ZP_WEIGHT_RIFLE (ZP_HUMAN_SPEED / 12.0743) + #define ZP_WEIGHT_SHOTGUN (ZP_HUMAN_SPEED / 12.0743) + #define ZP_WEIGHT_GRENADE (ZP_HUMAN_SPEED / 57.3529) + #define ZP_WEIGHT_SATCHEL (ZP_HUMAN_SPEED / 57.3529) + + #define ZP_WEIGHT_PISTOL_AMMO (ZP_HUMAN_SPEED / 928.5714) + #define ZP_WEIGHT_MAGNUM_AMMO (ZP_HUMAN_SPEED / 304.6875) + #define ZP_WEIGHT_RIFLE_AMMO (ZP_HUMAN_SPEED / 928.5714) + #define ZP_WEIGHT_SHOTGUN_AMMO (ZP_HUMAN_SPEED / 156.0) +#else // easy mode + #define ZP_HUMAN_SPEED 200.0 + #define ZP_ZOMBIE_SPEED (ZP_HUMAN_SPEED * 0.78975) + #define ZP_PANIC_SPEED_MODIFIER 1.0 + #define ZP_STRAFE_SPEED_MODIFIER 0.85 + #define ZP_BACKWARD_SPEED_MODIFIER 0.85 + #define ZP_DUCK_SPEED_MODIFIER 1.25 + + #define ZP_WEIGHT_MELEE (ZP_HUMAN_SPEED / 80.0) + #define ZP_WEIGHT_PISTOL (ZP_HUMAN_SPEED / 47.0588) + #define ZP_WEIGHT_MAGNUM (ZP_HUMAN_SPEED / 38.0952) + #define ZP_WEIGHT_RIFLE (ZP_HUMAN_SPEED / 26.6666) + #define ZP_WEIGHT_SHOTGUN (ZP_HUMAN_SPEED / 26.6666) + #define ZP_WEIGHT_GRENADE (ZP_HUMAN_SPEED / 80.0) + #define ZP_WEIGHT_SATCHEL (ZP_HUMAN_SPEED / 80.0) + + #define ZP_WEIGHT_PISTOL_AMMO (ZP_HUMAN_SPEED / 1333.3333) + #define ZP_WEIGHT_MAGNUM_AMMO (ZP_HUMAN_SPEED / 888.8888) + #define ZP_WEIGHT_RIFLE_AMMO (ZP_HUMAN_SPEED / 1000) + #define ZP_WEIGHT_SHOTGUN_AMMO (ZP_HUMAN_SPEED / 400) +#endif + +enum ZP_Music { + ZP_Music_Path[64], + Float:ZP_Music_Duration +} + +stock const ZP_WEAPON_PISTOL[] = "zombiepanic/v100/weapon_9mmhandgun"; +stock const ZP_WEAPON_RIFLE[] = "zombiepanic/v100/weapon_556AR"; +stock const ZP_WEAPON_SHOTGUN[] = "zombiepanic/v100/weapon_shotgun"; +stock const ZP_WEAPON_MAGNUM[] = "zombiepanic/v100/weapon_357"; +stock const ZP_WEAPON_SATCHEL[] = "zombiepanic/v100/weapon_satchel"; +stock const ZP_WEAPON_GRENADE[] = "zombiepanic/v100/weapon_handgrenade"; +stock const ZP_WEAPON_SWIPE[] = "zombiepanic/v100/weapon_swipe"; +stock const ZP_WEAPON_CROWBAR[] = "zombiepanic/v100/weapon_crowbar"; stock const ZP_AMMO_PISTOL[] = "pistol"; stock const ZP_AMMO_RIFLE[] = "rifle"; @@ -30,126 +99,105 @@ stock const ZP_AMMO_MAGNUM[] = "magnum"; stock const ZP_AMMO_GRENADE[] = "grenade"; stock const ZP_AMMO_SATCHEL[] = "satchel"; -stock const ZP_FLASHLIGHT_LIGHTCONE_MODEL[] = "models/zombiepanic/b1/lightcone.mdl"; +stock const ZP_FLASHLIGHT_LIGHTCONE_MODEL[] = "models/zombiepanic/v100/lightcone.mdl"; stock const ZP_FLASHLIGHT_SOUND[] = "items/flashlight1.wav"; -stock const ZP_WEAPONBOX_MODEL[] = "models/zombiepanic/b1/items/w_weaponbox.mdl"; +stock const ZP_WEAPONBOX_MODEL[] = "models/zombiepanic/v100/items/w_weaponbox.mdl"; -stock const ZP_WEAPON_PISTOL_V_MODEL[] = "models/zombiepanic/b1/items/v_9mmhandgun.mdl"; -stock const ZP_WEAPON_PISTOL_P_MODEL[] = "models/zombiepanic/b1/items/p_9mmhandgun.mdl"; -stock const ZP_WEAPON_PISTOL_W_MODEL[] = "models/zombiepanic/b1/items/w_9mmhandgun.mdl"; +stock const ZP_WEAPON_PISTOL_V_MODEL[] = "models/zombiepanic/v100/items/v_9mmhandgun.mdl"; +stock const ZP_WEAPON_PISTOL_P_MODEL[] = "models/zombiepanic/v100/items/p_9mmhandgun.mdl"; +stock const ZP_WEAPON_PISTOL_W_MODEL[] = "models/zombiepanic/v100/items/w_9mmhandgun.mdl"; -stock const ZP_WEAPON_MAGNUM_V_MODEL[] = "models/zombiepanic/b1/items/v_357.mdl"; -stock const ZP_WEAPON_MAGNUM_P_MODEL[] = "models/zombiepanic/b1/items/p_357.mdl"; -stock const ZP_WEAPON_MAGNUM_W_MODEL[] = "models/zombiepanic/b1/items/w_357.mdl"; +stock const ZP_WEAPON_MAGNUM_V_MODEL[] = "models/zombiepanic/v100/items/v_357.mdl"; +stock const ZP_WEAPON_MAGNUM_P_MODEL[] = "models/zombiepanic/v100/items/p_357.mdl"; +stock const ZP_WEAPON_MAGNUM_W_MODEL[] = "models/zombiepanic/v100/items/w_357.mdl"; -stock const ZP_WEAPON_RIFLE_V_MODEL[] = "models/zombiepanic/b1/items/v_556ar.mdl"; -stock const ZP_WEAPON_RIFLE_P_MODEL[] = "models/zombiepanic/b1/items/p_556ar.mdl"; -stock const ZP_WEAPON_RIFLE_W_MODEL[] = "models/zombiepanic/b1/items/w_556ar.mdl"; +stock const ZP_WEAPON_RIFLE_V_MODEL[] = "models/zombiepanic/v100/items/v_556ar.mdl"; +stock const ZP_WEAPON_RIFLE_P_MODEL[] = "models/zombiepanic/v100/items/p_556ar.mdl"; +stock const ZP_WEAPON_RIFLE_W_MODEL[] = "models/zombiepanic/v100/items/w_556ar.mdl"; -stock const ZP_WEAPON_SHOTGUN_V_MODEL[] = "models/zombiepanic/b1/items/v_shotgun.mdl"; -stock const ZP_WEAPON_SHOTGUN_P_MODEL[] = "models/zombiepanic/b1/items/p_shotgun.mdl"; -stock const ZP_WEAPON_SHOTGUN_W_MODEL[] = "models/zombiepanic/b1/items/w_shotgun.mdl"; +stock const ZP_WEAPON_SHOTGUN_V_MODEL[] = "models/zombiepanic/v100/items/v_shotgun.mdl"; +stock const ZP_WEAPON_SHOTGUN_P_MODEL[] = "models/zombiepanic/v100/items/p_shotgun.mdl"; +stock const ZP_WEAPON_SHOTGUN_W_MODEL[] = "models/zombiepanic/v100/items/w_shotgun.mdl"; -stock const ZP_WEAPON_CROWBAR_V_MODEL[] = "models/zombiepanic/b1/items/v_crowbar.mdl"; -stock const ZP_WEAPON_CROWBAR_P_MODEL[] = "models/zombiepanic/b1/items/p_crowbar.mdl"; +stock const ZP_WEAPON_CROWBAR_V_MODEL[] = "models/zombiepanic/v100/items/v_crowbar.mdl"; +stock const ZP_WEAPON_CROWBAR_P_MODEL[] = "models/zombiepanic/v100/items/p_crowbar.mdl"; stock const ZP_WEAPON_CROWBAR_W_MODEL[] = "models/w_crowbar.mdl"; -stock const ZP_WEAPON_GRENADE_V_MODEL[] = "models/zombiepanic/b1/items/v_grenade.mdl"; -stock const ZP_WEAPON_GRENADE_P_MODEL[] = "models/zombiepanic/b1/items/p_grenade.mdl"; -stock const ZP_WEAPON_GRENADE_W_MODEL[] = "models/zombiepanic/b1/items/w_grenade.mdl"; - -stock const ZP_WEAPON_SATCHEL_V_MODEL[] = "models/zombiepanic/b1/items/v_satchel.mdl"; -stock const ZP_WEAPON_SATCHEL_P_MODEL[] = "models/zombiepanic/b1/items/p_satchel.mdl"; -stock const ZP_WEAPON_SATCHEL_W_MODEL[] = "models/zombiepanic/b1/items/w_satchel.mdl"; - -stock const ZP_WEAPON_SATCHELRADIO_V_MODEL[] = "models/zombiepanic/b1/items/v_satchel_radio.mdl"; -stock const ZP_WEAPON_SATCHELRADIO_P_MODEL[] = "models/zombiepanic/b1/items/p_satchel_radio.mdl"; - -stock const ZP_ITEM_MEDKIT_MODEL[] = "models/zombiepanic/b1/items/w_medkit.mdl"; -stock const ZP_ITEM_BATTERY_MODEL[] = "models/zombiepanic/b1/items/w_battery.mdl"; - -stock const ZP_AMMO_PISTOL_MODEL[] = "models/zombiepanic/b1/items/w_9mmclip.mdl"; -stock const ZP_AMMO_RIFLE_MODEL[] = "models/zombiepanic/b1/items/w_556ARclip.mdl"; -stock const ZP_AMMO_SHOTGUN_MODEL[] = "models/zombiepanic/b1/items/w_shotbox.mdl"; -stock const ZP_AMMO_MAGNUM_MODEL[] = "models/zombiepanic/b1/items/w_357ammobox.mdl"; - -stock const ZP_CHARACTER_FOLDER[] = "models/zombiepanic/b1/characters"; - -stock const ZP_STARTUP_SOUND[] = "sound/zombiepanic/b1/music/gamestartup.mp3"; - -stock const ZP_WEAPON_PISTOL_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_9mmhandgun.txt"; -stock const ZP_WEAPON_MAGNUM_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_357.txt"; -stock const ZP_WEAPON_RIFLE_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_556ar.txt"; -stock const ZP_WEAPON_SHOTGUN_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_shotgun.txt"; -stock const ZP_WEAPON_CROWBAR_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_crowbar.txt"; -stock const ZP_WEAPON_SWIPE_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_swipe.txt"; -stock const ZP_WEAPON_GRENADE_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_handgrenade.txt"; -stock const ZP_WEAPON_SATCHEL_HUD_TXT[] = "sprites/zombiepanic/b1/weapon_satchel.txt"; - -stock const ZP_HUD_SPRITES[][] = { - "sprites/zombiepanic/b1/640hud1.spr", - "sprites/zombiepanic/b1/640hud3.spr", - "sprites/zombiepanic/b1/640hud4.spr", - "sprites/zombiepanic/b1/640hud6.spr", - "sprites/zombiepanic/b1/640hud7.spr", - "sprites/zombiepanic/b1/640hudz.spr", - "sprites/zombiepanic/b1/640zombiehead.spr" +stock const ZP_WEAPON_GRENADE_V_MODEL[] = "models/zombiepanic/v100/items/v_grenade.mdl"; +stock const ZP_WEAPON_GRENADE_P_MODEL[] = "models/zombiepanic/v100/items/p_grenade.mdl"; +stock const ZP_WEAPON_GRENADE_W_MODEL[] = "models/zombiepanic/v100/items/w_grenade.mdl"; + +stock const ZP_WEAPON_SATCHEL_V_MODEL[] = "models/zombiepanic/v100/items/v_satchel.mdl"; +stock const ZP_WEAPON_SATCHEL_P_MODEL[] = "models/zombiepanic/v100/items/p_satchel.mdl"; +stock const ZP_WEAPON_SATCHEL_W_MODEL[] = "models/zombiepanic/v100/items/w_satchel.mdl"; + +stock const ZP_WEAPON_SATCHELRADIO_V_MODEL[] = "models/zombiepanic/v100/items/v_satchel_radio.mdl"; +stock const ZP_WEAPON_SATCHELRADIO_P_MODEL[] = "models/zombiepanic/v100/items/p_satchel_radio.mdl"; + +stock const ZP_ITEM_MEDKIT_MODEL[] = "models/zombiepanic/v100/items/w_medkit.mdl"; +stock const ZP_ITEM_BATTERY_MODEL[] = "models/zombiepanic/v100/items/w_battery.mdl"; + +stock const ZP_AMMO_PISTOL_MODEL[] = "models/zombiepanic/v100/items/w_9mmclip.mdl"; +stock const ZP_AMMO_RIFLE_MODEL[] = "models/zombiepanic/v100/items/w_556ARclip.mdl"; +stock const ZP_AMMO_SHOTGUN_MODEL[] = "models/zombiepanic/v100/items/w_shotbox.mdl"; +stock const ZP_AMMO_MAGNUM_MODEL[] = "models/zombiepanic/v100/items/w_357ammobox.mdl"; + +stock const ZP_STARTUP_SOUND[] = "sound/zombiepanic/v100/music/gamestartup.mp3"; + +stock const ZP_MUSIC_LIST[][ZP_Music] = { + { "sound/zombiepanic/v100/music/KM_CityOfSouls.mp3", 3.32}, + { "sound/zombiepanic/v100/music/KM_CloudOfSorrow.mp3", 4.07}, + { "sound/zombiepanic/v100/music/KM_Descent.mp3", 4.18}, + { "sound/zombiepanic/v100/music/KM_ForgottenKingdom.mp3", 2.56}, + { "sound/zombiepanic/v100/music/KM_FrozenWasteland.mp3", 4.54}, + { "sound/zombiepanic/v100/music/KM_Horde.mp3", 4.56}, + { "sound/zombiepanic/v100/music/KM_Nightmare.mp3", 4.53}, + { "sound/zombiepanic/v100/music/KM_Orphanage.mp3", 3.27}, + { "sound/zombiepanic/v100/music/KM_Plague.mp3", 3.10}, }; -stock const ZP_ZOMBIE_AMBIENT_SOUNDS[][] = { - "zombiepanic/b1/player/zomambient1.wav", - "zombiepanic/b1/player/zomambient2.wav", - "zombiepanic/b1/player/zomambient3.wav", - "zombiepanic/b1/player/zomambient4.wav", - "zombiepanic/b1/player/zomambient5.wav", - "zombiepanic/b1/player/zomambient6.wav", - "zombiepanic/b1/player/zomambient7.wav", - "zombiepanic/b1/player/zomambient8.wav", - "zombiepanic/b1/player/zomambient9.wav", - "zombiepanic/b1/player/zomambient10.wav", - "zombiepanic/b1/player/zomambient11.wav", - "zombiepanic/b1/player/zomambient12.wav", - "zombiepanic/b1/player/zomambient13.wav", - "zombiepanic/b1/player/zomambient14.wav", - "zombiepanic/b1/player/zomambient15.wav" -}; - -stock const ZP_ZOMBIE_DEATH_SOUNDS[][] = { - "zombiepanic/b1/player/zombiedeath1.wav", - "zombiepanic/b1/player/zombiedeath2.wav", - "zombiepanic/b1/player/zombiedeath3.wav" -}; +stock const ZP_WEAPON_PISTOL_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_9mmhandgun.txt"; +stock const ZP_WEAPON_MAGNUM_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_357.txt"; +stock const ZP_WEAPON_RIFLE_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_556ar.txt"; +stock const ZP_WEAPON_SHOTGUN_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_shotgun.txt"; +stock const ZP_WEAPON_CROWBAR_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_crowbar.txt"; +stock const ZP_WEAPON_SWIPE_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_swipe.txt"; +stock const ZP_WEAPON_GRENADE_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_handgrenade.txt"; +stock const ZP_WEAPON_SATCHEL_HUD_TXT[] = "sprites/zombiepanic/v100/weapon_satchel.txt"; -stock const ZP_HUMAN_DEATH_SOUNDS[][] = { - "zombiepanic/b1/player/deathscream1.wav", - "zombiepanic/b1/player/deathscream2.wav", - "zombiepanic/b1/player/deathscream3.wav" -}; - -stock const ZP_PANIC_SOUNDS[][] = { - "zombiepanic/b1/player/panicscream1.wav", - "zombiepanic/b1/player/panicscream2.wav", +stock const ZP_HUD_SPRITES[][] = { + "sprites/zombiepanic/v100/640hud1.spr", + "sprites/zombiepanic/v100/640hud3.spr", + "sprites/zombiepanic/v100/640hud4.spr", + "sprites/zombiepanic/v100/640hud6.spr", + "sprites/zombiepanic/v100/640hud7.spr", + "sprites/zombiepanic/v100/640hudz.spr", + "sprites/zombiepanic/v100/640zombiehead.spr", + "sprites/zombiepanic/v100/pistol_xhair.spr", + "sprites/zombiepanic/v100/magnum_xhair.spr", + "sprites/zombiepanic/v100/colt_xhair.spr", + "sprites/zombiepanic/v100/shotgun_xhair.spr" }; stock const ZP_WEAPON_SWIPE_MISS_SOUNDS[][] = { - "zombiepanic/b1/weapons/claw_miss1.wav", - "zombiepanic/b1/weapons/claw_miss1.wav" + "zombiepanic/v100/weapons/claw_miss1.wav", + "zombiepanic/v100/weapons/claw_miss1.wav" }; stock const ZP_WEAPON_SWIPE_HIT_SOUNDS[][] = { - "zombiepanic/b1/weapons/claw_strike1.wav", - "zombiepanic/b1/weapons/claw_strike2.wav", - "zombiepanic/b1/weapons/claw_strike3.wav" + "zombiepanic/v100/weapons/claw_strike1.wav", + "zombiepanic/v100/weapons/claw_strike2.wav", + "zombiepanic/v100/weapons/claw_strike3.wav" }; stock const ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS[][] = { - "zombiepanic/b1/weapons/reload1.wav", - "zombiepanic/b1/weapons/reload3.wav" + "zombiepanic/v100/weapons/reload1.wav", + "zombiepanic/v100/weapons/reload3.wav" }; -stock const ZP_WEAPON_SHOTGUN_SHOT_SOUND[] = "zombiepanic/b1/weapons/sbarrel1.wav"; -stock const ZP_WEAPON_SHOTGUN_PUMP_SOUND[] = "zombiepanic/b1/weapons/scock1.wav"; +stock const ZP_WEAPON_SHOTGUN_SHOT_SOUND[] = "zombiepanic/v100/weapons/sbarrel1.wav"; +stock const ZP_WEAPON_SHOTGUN_PUMP_SOUND[] = "zombiepanic/v100/weapons/scock1.wav"; stock const ZP_WEAPON_CROWBAR_HITBODY_SOUNDS[][] = { "weapons/cbar_hitbod1.wav", @@ -165,9 +213,9 @@ stock const ZP_WEAPON_CROWBAR_HIT_SOUNDS[][] = { stock const ZP_WEAPON_CROWBAR_MISS_SOUND[] = "weapons/cbar_miss1.wav"; stock const ZP_WEAPON_RIFLE_SHOT_SOUNDS[][] = { - "zombiepanic/b1/weapons/hks1.wav", - "zombiepanic/b1/weapons/hks2.wav", - "zombiepanic/b1/weapons/hks3.wav" + "zombiepanic/v100/weapons/hks1.wav", + "zombiepanic/v100/weapons/hks2.wav", + "zombiepanic/v100/weapons/hks3.wav" }; stock const ZP_WEAPON_RIFLE_RELOAD_START_SOUND[] = "items/cliprelease1.wav"; @@ -178,10 +226,8 @@ stock const ZP_WEAPON_MAGNUM_SHOT_SOUNDS[][] = { "weapons/357_shot2.wav" }; -stock const ZP_WEAPON_PISTOL_SHOT_SOUND[] = "zombiepanic/b1/weapons/pl_gun3.wav"; +stock const ZP_WEAPON_PISTOL_SHOT_SOUND[] = "zombiepanic/v100/weapons/pl_gun3.wav"; stock const ZP_WEAPON_PISTOL_RELOAD_START_SOUND[] = "items/9mmclip1.wav"; stock const ZP_WEAPON_PISTOL_RELOAD_END_SOUND[] = "items/9mmclip2.wav"; -stock const ZP_CHARACTERS[][] = { - "male" -}; +stock const ZP_OBJECTIVE_MARK_SPRITE[] = "sprites/zombiepanic/v100/objective_mark.spr"; diff --git a/src/include/zombiepanic_utils.inc b/src/include/zombiepanic_utils.inc index e0eb7f0..b423fce 100644 --- a/src/include/zombiepanic_utils.inc +++ b/src/include/zombiepanic_utils.inc @@ -4,6 +4,34 @@ // #define ITEM_FLAG_LIMITINWORLD 8 // #define ITEM_FLAG_EXHAUSTIBLE 16 // A player can totally exhaust their ammo supply and lose this weapon +stock const AMMO_LIST[15][] = { + "", + "338Magnum", + "762Nato", + "556NatoBox", + "556Nato", + "buckshot", + "45ACP", + "57mm", + "50AE", + "357SIG", + "9mm", + "Flashbang", + "HEGrenade", + "SmokeGrenade", + "C4" +}; + +stock const ITEMS_LIST[][] = { + "armoury_entity", + "item_battery", + "item_healthkit", + "armoury_entity", + "weaponbox", + "weapon_shield", + "grenade" +}; + stock bool:UTIL_IsPlayer(pEntity) { static c_iMaxPlayers; if (!c_iMaxPlayers) { @@ -36,40 +64,23 @@ stock UTIL_Message_Dlight( stock UTIL_CreateAmmoBox(iAmmoId, iAmount) { static iszWeaponbox = 0; - static const szAmmoList[15][] = { - "", - "338Magnum", - "762Nato", - "556NatoBox", - "556Nato", - "buckshot", - "45ACP", - "57mm", - "50AE", - "357SIG", - "9mm", - "Flashbang", - "HEGrenade", - "SmokeGrenade", - "C4" - }; if (!iszWeaponbox) { iszWeaponbox = engfunc(EngFunc_AllocString, "weaponbox"); } - new iWeaponBox = engfunc(EngFunc_CreateNamedEntity, iszWeaponbox); - dllfunc(DLLFunc_Spawn, iWeaponBox); + new pWeaponBox = engfunc(EngFunc_CreateNamedEntity, iszWeaponbox); + dllfunc(DLLFunc_Spawn, pWeaponBox); - set_member(iWeaponBox, m_WeaponBox_rgiszAmmo, szAmmoList[iAmmoId], 0); - set_member(iWeaponBox, m_WeaponBox_rgAmmo, iAmount, 0); - set_member(iWeaponBox, m_WeaponBox_cAmmoTypes, 1); + set_member(pWeaponBox, m_WeaponBox_rgiszAmmo, AMMO_LIST[iAmmoId], 0); + set_member(pWeaponBox, m_WeaponBox_rgAmmo, iAmount, 0); + set_member(pWeaponBox, m_WeaponBox_cAmmoTypes, 1); - return iWeaponBox; + return pWeaponBox; } -stock UTIL_BeamPoints(const Float:vecStart[3], const Float:vecEnd[3], const color[3]) { +stock UTIL_BeamPoints(const Float:vecStart[3], const Float:vecEnd[3], const color[3], iLifetime = 30) { message_begin(MSG_BROADCAST ,SVC_TEMPENTITY); write_byte(TE_BEAMPOINTS); write_coord(floatround(vecStart[0])); // start position @@ -81,7 +92,7 @@ stock UTIL_BeamPoints(const Float:vecStart[3], const Float:vecEnd[3], const colo write_short(engfunc(EngFunc_ModelIndex, "sprites/laserbeam.spr")); // sprite index write_byte(0); // starting frame write_byte(10); // frame rate in 0.1's - write_byte(30); // life in 0.1's + write_byte(iLifetime); // life in 0.1's write_byte(2); // line width in 0.1's write_byte(1); // noise amplitude in 0.01's write_byte(color[0]); // Red @@ -91,3 +102,44 @@ stock UTIL_BeamPoints(const Float:vecStart[3], const Float:vecEnd[3], const colo write_byte(10); // scroll speed in 0.1's message_end(); } + +stock bool:UTIL_IsMasterTriggered(const szMaster[], pActivator) { + new pMaster = engfunc(EngFunc_FindEntityByString, 0, "targetname", szMaster); + + if (pMaster && (ExecuteHam(Ham_ObjectCaps, pMaster) & FCAP_MASTER)) { + return !!ExecuteHamB(Ham_IsTriggered, pMaster, pActivator); + } + + return true; +} + +stock UTIL_CalculateWeaponSpread(pWeapon, const Float:vecSpread[3], Float:flMovementFactor, Float:flFirstShotModifier, Float:flDuckFactor, Float:flAirFactor, Float:vecOut[3]) { + new pPlayer = get_member(pWeapon, m_pPlayer); + new iShotsFired = get_member(pWeapon, m_Weapon_iShotsFired); + new iPlayerFlags = pev(pPlayer, pev_flags); + + xs_vec_copy(vecSpread, vecOut); + + static Float:vecVelocity[3]; + pev(pPlayer, pev_velocity, vecVelocity); + if (xs_vec_len(vecVelocity) > 0) { + if (iShotsFired == 0) { + flMovementFactor *= flFirstShotModifier; + } + + xs_vec_mul_scalar(vecOut, flMovementFactor, vecOut); + } + + if (iPlayerFlags & FL_DUCKING) { + xs_vec_mul_scalar(vecOut, flDuckFactor, vecOut); + } + + if (~iPlayerFlags & FL_ONGROUND) { + xs_vec_mul_scalar(vecOut, flAirFactor, vecOut); + } +} + +stock bool:UTIL_IsPlayerSpectator(pPlayer) { + new iTeam = get_member(pPlayer, m_iTeam); + return iTeam < 1 || iTeam > 2; +} diff --git a/src/scripts/api/api_custom_weapons.sma b/src/scripts/api/api_custom_weapons.sma index 04cb2da..309f39c 100644 --- a/src/scripts/api/api_custom_weapons.sma +++ b/src/scripts/api/api_custom_weapons.sma @@ -10,7 +10,7 @@ #include #define PLUGIN "[API] Custom Weapons" -#define VERSION "0.3.0" +#define VERSION "0.5.2" #define AUTHOR "Hedgehog Fog" #define WALL_PUFF_SPRITE "sprites/wall_puff1.spr" @@ -18,83 +18,82 @@ #define VEC_DUCK_HULL_MIN Float:{-16.0, -16.0, -18.0} #define VEC_DUCK_HULL_MAX Float:{16.0, 16.0, 18.0} -#define AUTOAIM_2DEGREES 0.0348994967025 - #define TOKEN 743647146 enum CW_Data { - CW_Data_PluginId, - CW_Data_Name, - CW_Data_Icon, - CW_Data_Id, - CW_Data_ClipSize, - CW_Data_PrimaryAmmoType, - CW_Data_PrimaryAmmoMaxAmount, - CW_Data_SecondaryAmmoType, - CW_Data_SecondaryAmmoMaxAmount, - CW_Data_SlotId, - CW_Data_Position, - CW_Data_WeaponFlags, - CW_Data_Bindings + CW_Data_PluginId, + CW_Data_Name, + CW_Data_Icon, + CW_Data_Id, + CW_Data_ClipSize, + CW_Data_PrimaryAmmoType, + CW_Data_PrimaryAmmoMaxAmount, + CW_Data_SecondaryAmmoType, + CW_Data_SecondaryAmmoMaxAmount, + CW_Data_SlotId, + CW_Data_Position, + CW_Data_WeaponFlags, + CW_Data_Bindings, + CW_Data_Flags } enum _:WeaponListMessage { - WL_WeaponName[32], - WL_PrimaryAmmoType, - WL_PrimaryAmmoMaxAmount, - WL_SecondaryAmmoType, - WL_SecondaryAmmoMaxAmount, - WL_SlotId, - WL_NumberInSlot, - WL_WeaponId, - WL_Flags + WL_WeaponName[32], + WL_PrimaryAmmoType, + WL_PrimaryAmmoMaxAmount, + WL_SecondaryAmmoType, + WL_SecondaryAmmoMaxAmount, + WL_SlotId, + WL_NumberInSlot, + WL_WeaponId, + WL_Flags } enum _:Function { - Function_PluginId, - Function_FunctionId -} - -new const g_rgszWeaponNames[CSW_P90 + 1][] = { - "", - "weapon_p228", - "weapon_shield", - "weapon_scout", - "weapon_hegrenade", - "weapon_xm1014", - "weapon_c4", - "weapon_mac10", - "weapon_aug", - "weapon_smokegrenade", - "weapon_elite", - "weapon_fiveseven", - "weapon_ump45", - "weapon_sg550", - "weapon_galil", - "weapon_famas", - "weapon_usp", - "weapon_glock18", - "weapon_awp", - "weapon_mp5navy", - "weapon_m249", - "weapon_m3", - "weapon_m4a1", - "weapon_tmp", - "weapon_g3sg1", - "weapon_flashbang", - "weapon_deagle", - "weapon_sg552", - "weapon_ak47", - "weapon_knife", - "weapon_p90" + Function_PluginId, + Function_FunctionId +} + +new const g_rgszWeaponNames[CSW_LAST_WEAPON + 1][] = { + "", + "weapon_p228", + "weapon_shield", + "weapon_scout", + "weapon_hegrenade", + "weapon_xm1014", + "weapon_c4", + "weapon_mac10", + "weapon_aug", + "weapon_smokegrenade", + "weapon_elite", + "weapon_fiveseven", + "weapon_ump45", + "weapon_sg550", + "weapon_galil", + "weapon_famas", + "weapon_usp", + "weapon_glock18", + "weapon_awp", + "weapon_mp5navy", + "weapon_m249", + "weapon_m3", + "weapon_m4a1", + "weapon_tmp", + "weapon_g3sg1", + "weapon_flashbang", + "weapon_deagle", + "weapon_sg552", + "weapon_ak47", + "weapon_knife", + "weapon_p90" }; -new g_iszWeaponNames[CSW_P90 + 1]; -new bool:g_bWeaponHooks[CSW_P90 + 1]; -new g_weaponListDefaults[CSW_P90 + 1][WeaponListMessage]; +new g_iszWeaponNames[CSW_LAST_WEAPON + 1]; +new bool:g_bWeaponHooks[CSW_LAST_WEAPON + 1]; +new g_weaponListDefaults[CSW_LAST_WEAPON + 1][WeaponListMessage]; -new Array:g_weapons[CW_Data]; -new Trie:g_weaponsMap; +new Array:g_rgWeapons[CW_Data]; +new Trie:g_rgWeaponsMap; new g_iWeaponCount; new g_iszWeaponBox; @@ -105,306 +104,333 @@ new gmsgWeaponList; new bool:g_bPrecache; public plugin_precache() { - g_bPrecache = true; - - AllocateStrings(); - InitStorages(); + g_bPrecache = true; + + AllocateStrings(); + InitStorages(); - register_forward(FM_UpdateClientData, "OnUpdateClientData_Post", 1); - register_forward(FM_PrecacheEvent, "OnPrecacheEvent_Post", 1); - register_forward(FM_SetModel, "OnSetModel_Post", 1); + register_forward(FM_UpdateClientData, "OnUpdateClientData_Post", 1); + register_forward(FM_PrecacheEvent, "OnPrecacheEvent_Post", 1); + register_forward(FM_SetModel, "OnSetModel_Post", 1); - RegisterHam(Ham_Spawn, "weaponbox", "OnWeaponboxSpawn_Post"); - RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage", .Post = 0); - RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage_Post", .Post = 1); + RegisterHam(Ham_Spawn, "weaponbox", "OnWeaponboxSpawn_Post"); + RegisterHam(Ham_Player_PreThink, "player", "OnPlayerPreThink_Post", .Post = 1); + RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage", .Post = 0); + RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage_Post", .Post = 1); - register_message(get_user_msgid("DeathMsg"), "OnMessage_DeathMsg"); + register_message(get_user_msgid("DeathMsg"), "OnMessage_DeathMsg"); - precache_model(WALL_PUFF_SPRITE); + precache_model(WALL_PUFF_SPRITE); } public plugin_init() { - g_bPrecache = false; + g_bPrecache = false; - register_plugin(PLUGIN, VERSION, AUTHOR); + register_plugin(PLUGIN, VERSION, AUTHOR); - gmsgWeaponList = get_user_msgid("WeaponList"); + gmsgWeaponList = get_user_msgid("WeaponList"); - register_message(gmsgWeaponList, "OnMessage_WeaponList"); + register_message(gmsgWeaponList, "OnMessage_WeaponList"); - InitWeaponHooks(); + InitWeaponHooks(); } public plugin_natives() { - register_library("api_custom_weapons"); - - register_native("CW_Register", "Native_Register"); - register_native("CW_GetHandlerByEntity", "Native_GetHandlerByEntity"); - register_native("CW_GetHandler", "Native_GetHandler"); - register_native("CW_GiveWeapon", "Native_GiveWeapon"); - register_native("CW_SpawnWeapon", "Native_SpawnWeapon"); - register_native("CW_SpawnWeaponBox", "Native_SpawnWeaponBox"); - - register_native("CW_Reload", "Native_Reload"); - register_native("CW_PrimaryAttack", "Native_PrimaryAttack"); - register_native("CW_SecondaryAttack", "Native_SecondaryAttack"); - - register_native("CW_FireBulletsPlayer", "Native_FireBulletsPlayer"); - register_native("CW_EjectWeaponBrass", "Native_EjectWeaponBrass"); - register_native("CW_PlayAnimation", "Native_PlayAnimation"); - register_native("CW_GetPlayer", "Native_GetPlayer"); - - register_native("CW_DefaultDeploy", "Native_DefaultDeploy"); - register_native("CW_DefaultShot", "Native_DefaultShot"); - register_native("CW_DefaultShotgunShot", "Native_DefaultShotgunShot"); - register_native("CW_DefaultSwing", "Native_DefaultSwing"); - register_native("CW_DefaultReload", "Native_DefaultReload"); - register_native("CW_DefaultShotgunReload", "Native_DefaultShotgunReload"); - register_native("CW_DefaultShotgunIdle", "Native_DefaultShotgunIdle"); - - register_native("CW_GrenadeDetonate", "Native_GrenadeDetonate"); - register_native("CW_GrenadeSmoke", "Native_GrenadeSmoke"); - register_native("CW_RemovePlayerItem", "Native_RemovePlayerItem"); - - register_native("CW_Bind", "Native_Bind"); + register_library("api_custom_weapons"); + + register_native("CW_Register", "Native_Register"); + register_native("CW_GetHandlerByEntity", "Native_GetHandlerByEntity"); + register_native("CW_GetHandler", "Native_GetHandler"); + register_native("CW_GiveWeapon", "Native_GiveWeapon"); + register_native("CW_SpawnWeapon", "Native_SpawnWeapon"); + register_native("CW_SpawnWeaponBox", "Native_SpawnWeaponBox"); + + register_native("CW_Deploy", "Native_Deploy"); + register_native("CW_Holster", "Native_Holster"); + register_native("CW_ItemPostFrame", "Native_ItemPostFrame"); + register_native("CW_Idle", "Native_Idle"); + register_native("CW_Reload", "Native_Reload"); + register_native("CW_PrimaryAttack", "Native_PrimaryAttack"); + register_native("CW_SecondaryAttack", "Native_SecondaryAttack"); + + register_native("CW_FireBulletsPlayer", "Native_FireBulletsPlayer"); + register_native("CW_EjectWeaponBrass", "Native_EjectWeaponBrass"); + register_native("CW_PlayAnimation", "Native_PlayAnimation"); + register_native("CW_GetPlayer", "Native_GetPlayer"); + + register_native("CW_DefaultDeploy", "Native_DefaultDeploy"); + register_native("CW_DefaultShot", "Native_DefaultShot"); + register_native("CW_DefaultShotgunShot", "Native_DefaultShotgunShot"); + register_native("CW_DefaultSwing", "Native_DefaultSwing"); + register_native("CW_DefaultReload", "Native_DefaultReload"); + register_native("CW_DefaultShotgunReload", "Native_DefaultShotgunReload"); + register_native("CW_DefaultShotgunIdle", "Native_DefaultShotgunIdle"); + + register_native("CW_GrenadeDetonate", "Native_GrenadeDetonate"); + register_native("CW_GrenadeSmoke", "Native_GrenadeSmoke"); + register_native("CW_RemovePlayerItem", "Native_RemovePlayerItem"); + register_native("CW_Bind", "Native_Bind"); } public plugin_end() { - DestroyStorages(); + DestroyStorages(); } // ANCHOR: Natives public Native_Bind(iPluginId, iArgc) { - new CW:iHandler = CW:get_param(1); - new iBinding = get_param(2); + new CW:iHandler = CW:get_param(1); + new iBinding = get_param(2); - new szFunctionName[32]; - get_string(3, szFunctionName, charsmax(szFunctionName)); + new szFunctionName[32]; + get_string(3, szFunctionName, charsmax(szFunctionName)); - Bind(iHandler, iBinding, iPluginId, get_func_id(szFunctionName, iPluginId)); + Bind(iHandler, iBinding, iPluginId, get_func_id(szFunctionName, iPluginId)); } public CW:Native_GetHandlerByEntity(iPluginId, iArgc) { - new pEntity = get_param(1); - return GetHandlerByEntity(pEntity); + new pEntity = get_param(1); + return GetHandlerByEntity(pEntity); } public CW:Native_GetHandler(iPluginId, iArgc) { - static szName[64]; - get_string(1, szName, charsmax(szName)); + static szName[64]; + get_string(1, szName, charsmax(szName)); - return GetHandler(szName); + return GetHandler(szName); } public CW:Native_Register(iPluginId, iArgc) { - new szName[64]; - get_string(1, szName, charsmax(szName)); + new szName[64]; + get_string(1, szName, charsmax(szName)); + + new iWeaponId = get_param(2); + new iClipSize = get_param(3); + new iPrimaryAmmoType = get_param(4); + new iPrimaryAmmoMaxAmount = get_param(5); + new iSecondaryAmmoType = get_param(6); + new iSecondaryAmmoMaxAmount = get_param(7); + new iSlotId = get_param(8); + new iPosition = get_param(9); + new iWeaponFlags = get_param(10); - new iWeaponId = get_param(2); - new iClipSize = get_param(3); - new iPrimaryAmmoType = get_param(4); - new iPrimaryAmmoMaxAmount = get_param(5); - new iSecondaryAmmoType = get_param(6); - new iSecondaryAmmoMaxAmount = get_param(7); - new iSlotId = get_param(8); - new iPosition = get_param(9); - new iWeaponFlags = get_param(10); + new szIcon[16]; + get_string(11, szIcon, charsmax(szIcon)); - new szIcon[16]; - get_string(11, szIcon, charsmax(szIcon)); + new CW_Flags:iFlags = CW_Flags:get_param(12); - return RegisterWeapon(iPluginId, szName, iWeaponId, iClipSize, iPrimaryAmmoType, iPrimaryAmmoMaxAmount, iSecondaryAmmoType, iSecondaryAmmoMaxAmount, iSlotId, iPosition, iWeaponFlags, szIcon); + return RegisterWeapon(iPluginId, szName, iWeaponId, iClipSize, iPrimaryAmmoType, iPrimaryAmmoMaxAmount, iSecondaryAmmoType, iSecondaryAmmoMaxAmount, iSlotId, iPosition, iWeaponFlags, szIcon, iFlags); } public Native_GiveWeapon(iPluginId, iArgc) { - new pPlayer = get_param(1); - - static szWeapon[64]; - get_string(2, szWeapon, charsmax(szWeapon)); + new pPlayer = get_param(1); + + static szWeapon[64]; + get_string(2, szWeapon, charsmax(szWeapon)); - new CW:iHandler; - if (TrieGetCell(g_weaponsMap, szWeapon, iHandler)) { - GiveWeapon(pPlayer, iHandler); - } + new CW:iHandler; + if (TrieGetCell(g_rgWeaponsMap, szWeapon, iHandler)) { + GiveWeapon(pPlayer, iHandler); + } } public Native_SpawnWeapon(iPluginId, iArgc) { - new CW:iHandler = CW:get_param(1); - return SpawnWeapon(iHandler); + new CW:iHandler = CW:get_param(1); + return SpawnWeapon(iHandler); } public Native_SpawnWeaponBox(iPluginId, iArgc) { - new CW:iHandler = CW:get_param(1); - return SpawnWeaponBox(iHandler); + new CW:iHandler = CW:get_param(1); + return SpawnWeaponBox(iHandler); } public bool:Native_DefaultDeploy(iPluginId, iArgc) { - new pWeapon = get_param(1); + new pWeapon = get_param(1); - static szViewModel[64]; - get_string(2, szViewModel, charsmax(szViewModel)); + static szViewModel[64]; + get_string(2, szViewModel, charsmax(szViewModel)); - static szWeaponModel[64]; - get_string(3, szWeaponModel, charsmax(szWeaponModel)); + static szWeaponModel[64]; + get_string(3, szWeaponModel, charsmax(szWeaponModel)); - new iAnim = get_param(4); + new iAnim = get_param(4); - static szAnimExt[16]; - get_string(5, szAnimExt, charsmax(szAnimExt)); + static szAnimExt[16]; + get_string(5, szAnimExt, charsmax(szAnimExt)); - return DefaultDeploy(pWeapon, szViewModel, szWeaponModel, iAnim, szAnimExt); + return DefaultDeploy(pWeapon, szViewModel, szWeaponModel, iAnim, szAnimExt); } public Native_FireBulletsPlayer(iPluginId, iArgc) { - new pWeapon = get_param(1); - new iShots = get_param(2); + new pWeapon = get_param(1); + new iShots = get_param(2); - static Float:vecSrc[3]; - get_array_f(3, vecSrc, sizeof(vecSrc)); - - static Float:vecDirShooting[3]; - get_array_f(4, vecDirShooting, sizeof(vecDirShooting)); + static Float:vecSrc[3]; + get_array_f(3, vecSrc, sizeof(vecSrc)); + + static Float:vecDirShooting[3]; + get_array_f(4, vecDirShooting, sizeof(vecDirShooting)); - static Float:vecSpread[3]; - get_array_f(5, vecSpread, sizeof(vecSpread)); + static Float:vecSpread[3]; + get_array_f(5, vecSpread, sizeof(vecSpread)); - new Float:flDistance = get_param_f(6); - new Float:flDamage = get_param_f(7); - new pevAttacker = get_param(8); + new Float:flDistance = get_param_f(6); + new Float:flDamage = get_param_f(7); + new pevAttacker = get_param(8); - static Float:vecOut[3]; + static Float:vecOut[3]; - FireBulletsPlayer(pWeapon, iShots, vecSrc, vecDirShooting, vecSpread, flDistance, flDamage, pevAttacker, vecOut); + FireBulletsPlayer(pWeapon, iShots, vecSrc, vecDirShooting, vecSpread, flDistance, flDamage, pevAttacker, vecOut); - set_array_f(9, vecOut, sizeof(vecOut)); + set_array_f(9, vecOut, sizeof(vecOut)); } public bool:Native_EjectWeaponBrass(iPluginId, iArgc) { - new pItem = get_param(1); - new iModelIndex = get_param(2); - new iSoundType = get_param(3); + new pItem = get_param(1); + new iModelIndex = get_param(2); + new iSoundType = get_param(3); - return EjectWeaponBrass(pItem, iModelIndex, iSoundType); + return EjectWeaponBrass(pItem, iModelIndex, iSoundType); } public bool:Native_DefaultShot(iPluginId, iArgc) { - new pItem = get_param(1); - new Float:flDamage = get_param_f(2); - new Float:flRate = get_param_f(3); + new pItem = get_param(1); + new Float:flDamage = get_param_f(2); + new Float:flRate = get_param_f(3); - static Float:vecSpread[3]; - get_array_f(4, vecSpread, sizeof(vecSpread)); + static Float:vecSpread[3]; + get_array_f(4, vecSpread, sizeof(vecSpread)); - new iShots = get_param(5); - new Float:flDistance = get_param_f(6); + new iShots = get_param(5); + new Float:flDistance = get_param_f(6); - return DefaultShot(pItem, flDamage, flRate, vecSpread, iShots, flDistance); + return DefaultShot(pItem, flDamage, flRate, vecSpread, iShots, flDistance); } public bool:Native_DefaultShotgunShot(iPluginId, iArgc) { - new pItem = get_param(1); - new Float:flDamage = get_param_f(2); - new Float:flRate = get_param_f(3); - new Float:flPumpDelay = get_param_f(4); + new pItem = get_param(1); + new Float:flDamage = get_param_f(2); + new Float:flRate = get_param_f(3); + new Float:flPumpDelay = get_param_f(4); - static Float:vecSpread[3]; - get_array_f(5, vecSpread, sizeof(vecSpread)); + static Float:vecSpread[3]; + get_array_f(5, vecSpread, sizeof(vecSpread)); - new iShots = get_param(6); - new Float:flDistance = get_param_f(7); + new iShots = get_param(6); + new Float:flDistance = get_param_f(7); - return DefaultShotgunShot(pItem, flDamage, flRate, flPumpDelay, vecSpread, iShots, flDistance); + return DefaultShotgunShot(pItem, flDamage, flRate, flPumpDelay, vecSpread, iShots, flDistance); } public Native_DefaultSwing(iPluginId, iArgc) { - new pItem = get_param(1); - new Float:flDamage = get_param_f(2); - new Float:flRate = get_param_f(3); - new Float:flDistance = get_param_f(4); + new pItem = get_param(1); + new Float:flDamage = get_param_f(2); + new Float:flRate = get_param_f(3); + new Float:flDistance = get_param_f(4); - return DefaultSwing(pItem, flDamage, flRate, flDistance); + return DefaultSwing(pItem, flDamage, flRate, flDistance); } public Native_PlayAnimation(iPluginID, argc) { - new pItem = get_param(1); - new iSequence = get_param(2); - new Float:flDuration = get_param_f(3); + new pItem = get_param(1); + new iSequence = get_param(2); + new Float:flDuration = get_param_f(3); - PlayWeaponAnim(pItem, iSequence, flDuration); + PlayWeaponAnim(pItem, iSequence, flDuration); } public Native_GetPlayer(iPluginID, argc) { - new pItem = get_param(1); - return GetPlayer(pItem); + new pItem = get_param(1); + return GetPlayer(pItem); } public bool:Native_DefaultReload(iPluginId, iArgc) { - new pItem = get_param(1); - new iAnim = get_param(2); - new Float:flDelay = get_param_f(3); + new pItem = get_param(1); + new iAnim = get_param(2); + new Float:flDelay = get_param_f(3); - return DefaultReload(pItem, iAnim, flDelay); + return DefaultReload(pItem, iAnim, flDelay); } public bool:Native_DefaultShotgunReload(iPluginId, iArgc) { - new pItem = get_param(1); - new iStartAnim = get_param(2); - new iEndAnim = get_param(3); - new Float:flDelay = get_param_f(4); - new Float:flDuration = get_param_f(5); + new pItem = get_param(1); + new iStartAnim = get_param(2); + new iEndAnim = get_param(3); + new Float:flDelay = get_param_f(4); + new Float:flDuration = get_param_f(5); - return DefaultShotgunReload(pItem, iStartAnim, iEndAnim, flDelay, flDuration); + return DefaultShotgunReload(pItem, iStartAnim, iEndAnim, flDelay, flDuration); } public bool:Native_DefaultShotgunIdle(iPluginId, iArgc) { - new pItem = get_param(1); - new iAnim = get_param(2); - new iReloadEndAnim = get_param(3); - new Float:flDuration = get_param_f(4); - new Float:flReloadEndDuration = get_param_f(5); - - static szPumpSound[64]; - get_string(6, szPumpSound, charsmax(szPumpSound)); + new pItem = get_param(1); + new iAnim = get_param(2); + new iReloadEndAnim = get_param(3); + new Float:flDuration = get_param_f(4); + new Float:flReloadEndDuration = get_param_f(5); + + static szPumpSound[64]; + get_string(6, szPumpSound, charsmax(szPumpSound)); - return DefaultShotgunIdle(pItem, iAnim, iReloadEndAnim, flDuration, flReloadEndDuration, szPumpSound); + return DefaultShotgunIdle(pItem, iAnim, iReloadEndAnim, flDuration, flReloadEndDuration, szPumpSound); +} + +public Native_Deploy(iPluginId, iArgc) { + new pItem = get_param(1); + WeaponDeploy(pItem); +} + +public Native_Holster(iPluginId, iArgc) { + new pItem = get_param(1); + WeaponHolster(pItem); +} + +public Native_ItemPostFrame(iPluginId, iArgc) { + new pItem = get_param(1); + ItemPostFrame(pItem); +} + +public Native_Idle(iPluginId, iArgc) { + new pItem = get_param(1); + WeaponIdle(pItem); } public Native_Reload(iPluginId, iArgc) { - new pItem = get_param(1); - Reload(pItem); + new pItem = get_param(1); + Reload(pItem); } + public Native_PrimaryAttack(iPluginId, iArgc) { - new pItem = get_param(1); - PrimaryAttack(pItem); + new pItem = get_param(1); + PrimaryAttack(pItem); } public Native_SecondaryAttack(iPluginId, iArgc) { - new pItem = get_param(1); - SecondaryAttack(pItem); + new pItem = get_param(1); + SecondaryAttack(pItem); } public Native_GrenadeDetonate(iPluginId, iArgc) { - new pGrenade = get_param(1); - new Float:flRadius = get_param_f(2); - new Float:flMagnitude = get_param_f(3); - GrenadeDetonate(pGrenade, flRadius, flMagnitude); + new pGrenade = get_param(1); + new Float:flRadius = get_param_f(2); + new Float:flMagnitude = get_param_f(3); + GrenadeDetonate(pGrenade, flRadius, flMagnitude); } public Native_GrenadeSmoke(iPluginId, iArgc) { - new pGrenade = get_param(1); - GrenadeSmoke(pGrenade); + new pGrenade = get_param(1); + GrenadeSmoke(pGrenade); } public Native_RemovePlayerItem(iPluginId, iArgc) { - new pItem = get_param(1); - RemovePlayerItem(pItem); + new pItem = get_param(1); + RemovePlayerItem(pItem); } // ANCHOR: Forwards public client_disconnected(pPlayer) { - SetWeaponPrediction(pPlayer, true); + SetWeaponPrediction(pPlayer, true); } // ANCHOR: Hook Callbacks @@ -412,7 +438,7 @@ public client_disconnected(pPlayer) { public OnItemDeploy(this) { new CW:iHandler = GetHandlerByEntity(this); if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; + return HAM_IGNORED; } WeaponDeploy(this); @@ -423,7 +449,7 @@ public OnItemDeploy(this) { public OnItemHolster(this) { new CW:iHandler = GetHandlerByEntity(this); if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; + return HAM_IGNORED; } WeaponHolster(this); @@ -434,7 +460,7 @@ public OnItemHolster(this) { public OnItemPostFrame(this) { new CW:iHandler = GetHandlerByEntity(this); if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; + return HAM_IGNORED; } ItemPostFrame(this); @@ -443,29 +469,29 @@ public OnItemPostFrame(this) { } public OnUpdateClientData_Post(pPlayer, iSendWeapons, pCdHandle) { - if (!is_user_alive(pPlayer)) { - return FMRES_IGNORED; - } + if (!is_user_alive(pPlayer)) { + return FMRES_IGNORED; + } - new pItem = get_member(pPlayer, m_pActiveItem); - if (pItem == -1) { - return FMRES_IGNORED; - } + new pItem = get_member(pPlayer, m_pActiveItem); + if (pItem == -1) { + return FMRES_IGNORED; + } - new CW:iHandler = GetHandlerByEntity(pItem); - if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; - } + new CW:iHandler = GetHandlerByEntity(pItem); + if (iHandler == CW_INVALID_HANDLER) { + return HAM_IGNORED; + } - set_cd(pCdHandle, CD_flNextAttack, get_gametime() + 0.001); // block default animation + set_cd(pCdHandle, CD_flNextAttack, get_gametime() + 0.001); // block default animation - return FMRES_HANDLED; + return FMRES_HANDLED; } public OnItemSlot(this) { new CW:iHandler = GetHandlerByEntity(this); if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; + return HAM_IGNORED; } new iSlot = GetData(iHandler, CW_Data_SlotId); @@ -474,16 +500,16 @@ public OnItemSlot(this) { return HAM_SUPERCEDE; } -public OnCSItemGetMaxSpeed(this) { +public OnCSItemGetMaxSpeed(this) { new CW:iHandler = GetHandlerByEntity(this); if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; + return HAM_IGNORED; } new Float:flMaxSpeed = ExecuteBindedFunction(CWB_GetMaxSpeed, this); if (_:flMaxSpeed != PLUGIN_CONTINUE) { - SetHamReturnFloat(flMaxSpeed); - return HAM_OVERRIDE; + SetHamReturnFloat(flMaxSpeed); + return HAM_OVERRIDE; } return HAM_IGNORED; @@ -492,13 +518,13 @@ public OnCSItemGetMaxSpeed(this) { public OnItemAddToPlayer_Post(this, pPlayer) { new pPlayer = GetPlayer(this); if (!ExecuteHam(Ham_IsPlayer, pPlayer)) { - return HAM_IGNORED; + return HAM_IGNORED; } new CW:iHandler = GetHandlerByEntity(this); if (iHandler == CW_INVALID_HANDLER) { - new iWeaponId = get_member(this, m_iId); - ResetWeaponList(pPlayer, iWeaponId); + new iWeaponId = get_member(this, m_iId); + ResetWeaponList(pPlayer, iWeaponId); } else { set_member(this, m_Weapon_iPrimaryAmmoType, GetData(iHandler, CW_Data_PrimaryAmmoType)); UpdateWeaponList(pPlayer, iHandler); @@ -508,421 +534,446 @@ public OnItemAddToPlayer_Post(this, pPlayer) { } public OnSpawn_Post(this) { - new CW:iHandler = GetHandlerByEntity(this); - if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; - } + new CW:iHandler = GetHandlerByEntity(this); + if (iHandler == CW_INVALID_HANDLER) { + return HAM_IGNORED; + } - ExecuteBindedFunction(CWB_Spawn, this); + ExecuteBindedFunction(CWB_Spawn, this); - return HAM_IGNORED; + return HAM_IGNORED; } public OnWeaponboxSpawn_Post(this) { - g_pNewWeaponboxEnt = this; + g_pNewWeaponboxEnt = this; +} + +public OnPlayerPreThink_Post(pPlayer) { + new pActiveItem = get_member(pPlayer, m_pActiveItem); + if (pActiveItem == -1) { + SetWeaponPrediction(pPlayer, false); + return HAM_IGNORED; + } + + new CW:iHandler = GetHandlerByEntity(pActiveItem); + SetWeaponPrediction(pPlayer, iHandler == CW_INVALID_HANDLER); + + return HAM_HANDLED; } public OnPlayerTakeDamage(pPlayer, pInflictor, pAttacker) { - g_pKillerItem = pInflictor; + g_pKillerItem = pInflictor; } public OnPlayerTakeDamage_Post() { - g_pKillerItem = -1; + g_pKillerItem = -1; } public OnMessage_DeathMsg(iMsgId, iDest, pPlayer) { - if (g_pKillerItem == -1) { - return PLUGIN_CONTINUE; - } + if (g_pKillerItem == -1) { + return PLUGIN_CONTINUE; + } - new pKiller = get_msg_arg_int(1); - if (!pKiller) { - return PLUGIN_CONTINUE; - } + new pKiller = get_msg_arg_int(1); + if (!pKiller) { + return PLUGIN_CONTINUE; + } - if (!ExecuteHam(Ham_IsPlayer, pKiller)) { - return PLUGIN_CONTINUE; - } + if (!ExecuteHam(Ham_IsPlayer, pKiller)) { + return PLUGIN_CONTINUE; + } - if (!is_user_alive(pKiller)) { - return PLUGIN_CONTINUE; - } + if (!is_user_alive(pKiller)) { + return PLUGIN_CONTINUE; + } - new CW:iHandler = GetHandlerByEntity(g_pKillerItem); - if (iHandler == CW_INVALID_HANDLER) { - return PLUGIN_CONTINUE; - } + new CW:iHandler = GetHandlerByEntity(g_pKillerItem); + if (iHandler == CW_INVALID_HANDLER) { + return PLUGIN_CONTINUE; + } + + static szIcon[64]; + GetStringData(iHandler, CW_Data_Icon, szIcon, charsmax(szIcon)); + if (szIcon[0] == '^0') { + GetStringData(iHandler, CW_Data_Name, szIcon, charsmax(szIcon)); + } - static szIcon[16]; - GetStringData(iHandler, CW_Data_Icon, szIcon, charsmax(szIcon)); - set_msg_arg_string(4, szIcon); + set_msg_arg_string(4, szIcon); - return PLUGIN_CONTINUE; + return PLUGIN_CONTINUE; } public OnSetModel_Post(this, const szModel[]) { - if (!pev_valid(this)) { - return FMRES_IGNORED; - } + if (!pev_valid(this)) { + return FMRES_IGNORED; + } - if (!g_pNewWeaponboxEnt) { - return FMRES_IGNORED; - } + if (!g_pNewWeaponboxEnt) { + return FMRES_IGNORED; + } - if (this != g_pNewWeaponboxEnt) { - return FMRES_IGNORED; - } + if (this != g_pNewWeaponboxEnt) { + return FMRES_IGNORED; + } - static szClassname[32]; - pev(this, pev_classname, szClassname, charsmax(szClassname)); + static szClassname[32]; + pev(this, pev_classname, szClassname, charsmax(szClassname)); - if (!equal(szClassname, "weaponbox")) { - g_pNewWeaponboxEnt = 0; - return FMRES_IGNORED; - } + if (!equal(szClassname, "weaponbox")) { + g_pNewWeaponboxEnt = 0; + return FMRES_IGNORED; + } - new pItem = FindWeaponBoxSingleItem(this); - if (pItem == -1) { - return FMRES_IGNORED; - } + new pItem = FindWeaponBoxSingleItem(this); + if (pItem == -1) { + return FMRES_IGNORED; + } - new CW:iHandler = GetHandlerByEntity(pItem); - if (iHandler == CW_INVALID_HANDLER) { - return FMRES_IGNORED; - } + new CW:iHandler = GetHandlerByEntity(pItem); + if (iHandler == CW_INVALID_HANDLER) { + return FMRES_IGNORED; + } - ExecuteBindedFunction(CWB_WeaponBoxModelUpdate, pItem, this); - g_pNewWeaponboxEnt = 0; + ExecuteBindedFunction(CWB_WeaponBoxModelUpdate, pItem, this); + g_pNewWeaponboxEnt = 0; - return FMRES_HANDLED; + return FMRES_HANDLED; } public OnWeaponClCmd(pPlayer) { - static szName[64]; - read_argv(0, szName, charsmax(szName)); + static szName[64]; + read_argv(0, szName, charsmax(szName)); - new CW:iHandler; - TrieGetCell(g_weaponsMap, szName, iHandler); + new CW:iHandler; + TrieGetCell(g_rgWeaponsMap, szName, iHandler); - new iWeapon = GetData(iHandler, CW_Data_Id); + new iWeapon = GetData(iHandler, CW_Data_Id); - static szBaseName[32]; - get_weaponname(iWeapon, szBaseName, charsmax(szBaseName)); - client_cmd(pPlayer, szBaseName); + static szBaseName[32]; + get_weaponname(iWeapon, szBaseName, charsmax(szBaseName)); + client_cmd(pPlayer, szBaseName); - return PLUGIN_HANDLED; + return PLUGIN_HANDLED; } public OnCanDrop(this) { - new CW:iHandler = GetHandlerByEntity(this); - if (iHandler == CW_INVALID_HANDLER) { - return HAM_IGNORED; - } + new CW:iHandler = GetHandlerByEntity(this); + if (iHandler == CW_INVALID_HANDLER) { + return HAM_IGNORED; + } - new bool:bCanDrop = ExecuteBindedFunction(CWB_CanDrop, this) == PLUGIN_CONTINUE; + SetHamReturnInteger( + ExecuteBindedFunction(CWB_CanDrop, this) == PLUGIN_CONTINUE ? 1 : 0 + ); - SetHamReturnInteger(bCanDrop ? 1 : 0); - return HAM_OVERRIDE; + return HAM_OVERRIDE; } public OnMessage_WeaponList(iMsgId, iMsgDest, pPlayer) { - new iWeaponId = get_msg_arg_int(8); + new iWeaponId = get_msg_arg_int(8); - if (g_weaponListDefaults[iWeaponId][WL_WeaponId] == iWeaponId) { - return PLUGIN_CONTINUE; // already initialized - } + if (g_weaponListDefaults[iWeaponId][WL_WeaponId] == iWeaponId) { + return PLUGIN_CONTINUE; // already initialized + } - get_msg_arg_string(1, g_weaponListDefaults[iWeaponId][WL_WeaponName], 31); - g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoType] = get_msg_arg_int(2); - g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoMaxAmount] = get_msg_arg_int(3); - g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoType] = get_msg_arg_int(4); - g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoMaxAmount] = get_msg_arg_int(5); - g_weaponListDefaults[iWeaponId][WL_SlotId] = get_msg_arg_int(6); - g_weaponListDefaults[iWeaponId][WL_NumberInSlot] = get_msg_arg_int(7); - g_weaponListDefaults[iWeaponId][WL_WeaponId] = iWeaponId; - g_weaponListDefaults[iWeaponId][WL_Flags] = get_msg_arg_int(9); + get_msg_arg_string(1, g_weaponListDefaults[iWeaponId][WL_WeaponName], 31); + g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoType] = get_msg_arg_int(2); + g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoMaxAmount] = get_msg_arg_int(3); + g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoType] = get_msg_arg_int(4); + g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoMaxAmount] = get_msg_arg_int(5); + g_weaponListDefaults[iWeaponId][WL_SlotId] = get_msg_arg_int(6); + g_weaponListDefaults[iWeaponId][WL_NumberInSlot] = get_msg_arg_int(7); + g_weaponListDefaults[iWeaponId][WL_WeaponId] = iWeaponId; + g_weaponListDefaults[iWeaponId][WL_Flags] = get_msg_arg_int(9); - return PLUGIN_CONTINUE; + return PLUGIN_CONTINUE; } // ANCHOR: Weapon Entity Methods CompleteReload(this) { - new CW:iHandler = GetHandlerByEntity(this); - new pPlayer = GetPlayer(this); - new iMaxClip = GetData(iHandler, CW_Data_ClipSize); - new iClip = get_member(this, m_Weapon_iClip); - new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); - new iBpAmmo = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); - new iSize = min(iMaxClip - iClip, iBpAmmo); + new CW:iHandler = GetHandlerByEntity(this); + new pPlayer = GetPlayer(this); + new iMaxClip = GetData(iHandler, CW_Data_ClipSize); + new iClip = get_member(this, m_Weapon_iClip); + new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); + new iBpAmmo = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); + new iSize = min(iMaxClip - iClip, iBpAmmo); - set_member(this, m_Weapon_iClip, iClip + iSize); - set_member(pPlayer, m_rgAmmo, iBpAmmo - iSize, iPrimaryAmmoIndex); - set_member(this, m_Weapon_fInReload, 0); + set_member(this, m_Weapon_iClip, iClip + iSize); + set_member(pPlayer, m_rgAmmo, iBpAmmo - iSize, iPrimaryAmmoIndex); + set_member(this, m_Weapon_fInReload, 0); - ExecuteBindedFunction(CWB_DefaultReloadEnd, this); + ExecuteBindedFunction(CWB_DefaultReloadEnd, this); } ItemPostFrame(this) { - new CW:iHandler = GetHandlerByEntity(this); - new pPlayer = GetPlayer(this); - new flInReload = get_member(this, m_Weapon_fInReload); - new iMaxClip = GetData(iHandler, CW_Data_ClipSize); - new iFlags = GetData(iHandler, CW_Data_WeaponFlags); - new Float:flNextAttack = get_member(pPlayer, m_flNextAttack); - new button = pev(pPlayer, pev_button); - new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); - new iSecondaryAmmoIndex = 0; - new Float:flNextPrimaryAttack = get_member(this, m_Weapon_flNextPrimaryAttack); - new Float:flNextSecondaryAttack = get_member(this, m_Weapon_flNextSecondaryAttack); - new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); - new iSecondaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iSecondaryAmmoIndex); - - if (flInReload && flNextAttack <= 0.0) { - CompleteReload(this); - } - - new Float:flReloadEndTime = get_member(this, m_Weapon_flNextReload); - if (flReloadEndTime && flReloadEndTime < get_gametime()) { - set_member(this, m_Weapon_flNextReload, 0.0); - ExecuteBindedFunction(CWB_Pump, this); - } - - if ((button & IN_ATTACK2) && flNextSecondaryAttack <= 0) { - if (iSecondaryAmmoIndex > 0 && !iSecondaryAmmoAmount) { - set_member(this, m_Weapon_fFireOnEmpty, 1); - } - - SecondaryAttack(this); - } else if ((button & IN_ATTACK) && flNextPrimaryAttack <= 0) { - if ((!get_member(this, m_Weapon_iClip) && iPrimaryAmmoIndex > 0) || (iMaxClip == -1 && !iPrimaryAmmoAmount)) { - set_member(this, m_Weapon_fFireOnEmpty, 1); - } - - PrimaryAttack(this); - } else if ((button & IN_RELOAD) && iMaxClip != WEAPON_NOCLIP && !flInReload) { - Reload(this); - } else if (!(button & (IN_ATTACK|IN_ATTACK2))) { - set_member(this, m_Weapon_fFireOnEmpty, 0); - - if (!IsUseable(this) && flNextPrimaryAttack < 0.0) { - // if (!(iFlags & ITEM_FLAG_NOAUTOSWITCHEMPTY) && g_pGameRules->GetNextBestWeapon(m_pPlayer, this)) { - // set_member(this, m_Weapon_flNextPrimaryAttack, 0.3); - // return; - // } - } else { - if (!get_member(this, m_Weapon_iClip) && !(iFlags & ITEM_FLAG_NOAUTORELOAD) && flNextPrimaryAttack < 0.0) { + new CW:iHandler = GetHandlerByEntity(this); + new pPlayer = GetPlayer(this); + new flInReload = get_member(this, m_Weapon_fInReload); + new iMaxClip = GetData(iHandler, CW_Data_ClipSize); + new iWeaponFlags = GetData(iHandler, CW_Data_WeaponFlags); + new Float:flNextAttack = get_member(pPlayer, m_flNextAttack); + new button = pev(pPlayer, pev_button); + new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); + new iSecondaryAmmoIndex = 0; + new Float:flNextPrimaryAttack = get_member(this, m_Weapon_flNextPrimaryAttack); + new Float:flNextSecondaryAttack = get_member(this, m_Weapon_flNextSecondaryAttack); + new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); + new iSecondaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iSecondaryAmmoIndex); + + if (flInReload && flNextAttack <= 0.0) { + CompleteReload(this); + } + + new Float:flReloadEndTime = get_member(this, m_Weapon_flNextReload); + if (flReloadEndTime && flReloadEndTime < get_gametime()) { + set_member(this, m_Weapon_flNextReload, 0.0); + ExecuteBindedFunction(CWB_Pump, this); + } + + if ((button & IN_ATTACK2) && flNextSecondaryAttack <= 0) { + if (iSecondaryAmmoIndex > 0 && !iSecondaryAmmoAmount) { + set_member(this, m_Weapon_fFireOnEmpty, 1); + } + + SecondaryAttack(this); + } else if ((button & IN_ATTACK) && flNextPrimaryAttack <= 0) { + if ((!get_member(this, m_Weapon_iClip) && iPrimaryAmmoIndex > 0) || (iMaxClip == -1 && !iPrimaryAmmoAmount)) { + set_member(this, m_Weapon_fFireOnEmpty, 1); + } + + PrimaryAttack(this); + } else if ((button & IN_RELOAD) && iMaxClip != WEAPON_NOCLIP && !flInReload) { Reload(this); + } else if (!(button & (IN_ATTACK|IN_ATTACK2))) { + set_member(this, m_Weapon_fFireOnEmpty, 0); + + if (!IsUseable(this) && flNextPrimaryAttack < 0.0) { + // if (!(iWeaponFlags & ITEM_FLAG_NOAUTOSWITCHEMPTY) && g_pGameRules->GetNextBestWeapon(m_pPlayer, this)) { + // set_member(this, m_Weapon_flNextPrimaryAttack, 0.3); + // return; + // } + } else { + if (!get_member(this, m_Weapon_iClip) && !(iWeaponFlags & ITEM_FLAG_NOAUTORELOAD) && flNextPrimaryAttack < 0.0) { + Reload(this); + return; + } + } + + set_member(this, m_Weapon_iShotsFired, 0); + WeaponIdle(this); return; - } } - set_member(this, m_Weapon_iShotsFired, 0); - WeaponIdle(this); - return; - } - - if (ShouldWeaponIdle(this)) { - WeaponIdle(this); - } + if (ShouldWeaponIdle(this)) { + WeaponIdle(this); + } } SecondaryAttack(this) { - if (ExecuteBindedFunction(CWB_SecondaryAttack, this) > PLUGIN_CONTINUE) { - return; - } + if (ExecuteBindedFunction(CWB_SecondaryAttack, this) > PLUGIN_CONTINUE) { + return; + } } PrimaryAttack(this) { - if (ExecuteBindedFunction(CWB_PrimaryAttack, this) > PLUGIN_CONTINUE) { - return; - } + if (get_member_game(m_bFreezePeriod)) { + return; + } + + if (ExecuteBindedFunction(CWB_PrimaryAttack, this) > PLUGIN_CONTINUE) { + return; + } } Reload(this) { - if (ExecuteBindedFunction(CWB_Reload, this) > PLUGIN_CONTINUE) { - return; - } + if (ExecuteBindedFunction(CWB_Reload, this) > PLUGIN_CONTINUE) { + return; + } } WeaponIdle(this) { - if (get_member(this, m_Weapon_flTimeWeaponIdle) > 0.0) { - return; - } + if (get_member(this, m_Weapon_flTimeWeaponIdle) > 0.0) { + return; + } - if (ExecuteBindedFunction(CWB_Idle, this) > PLUGIN_CONTINUE) { - return; - } + if (ExecuteBindedFunction(CWB_Idle, this) > PLUGIN_CONTINUE) { + return; + } } WeaponHolster(this) { - new pPlayer = GetPlayer(this); - SetWeaponPrediction(pPlayer, true); - set_member(this, m_Weapon_fInReload, 0); + new pPlayer = GetPlayer(this); + SetWeaponPrediction(pPlayer, true); + set_member(this, m_Weapon_fInReload, 0); + set_member(this, m_Weapon_fInSpecialReload, 0); - if (ExecuteBindedFunction(CWB_Holster, this) > PLUGIN_CONTINUE) { - return; - } + if (ExecuteBindedFunction(CWB_Holster, this) > PLUGIN_CONTINUE) { + return; + } } WeaponDeploy(this) { - set_member(this, m_Weapon_iShotsFired, 0); + if (ExecuteBindedFunction(CWB_Deploy, this) > PLUGIN_CONTINUE) { + return; + } - new pPlayer = GetPlayer(this); - SetWeaponPrediction(pPlayer, false); + new pPlayer = GetPlayer(this); + SetWeaponPrediction(pPlayer, false); - if (ExecuteBindedFunction(CWB_Deploy, this) > PLUGIN_CONTINUE) { - return; - } + // SetThink(this, "DisablePrediction"); + // set_pev(this, pev_nextthink, get_gametime() + 0.1); } bool:ShouldWeaponIdle(this) { - #pragma unused this - return false; + #pragma unused this + return false; } bool:IsUseable(this) { - new CW:iHandler = GetHandlerByEntity(this); - new pPlayer = GetPlayer(this); - new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); - new iMaxAmmo1 = GetData(iHandler, CW_Data_PrimaryAmmoMaxAmount); - new iClip = get_member(this, m_Weapon_iClip); - new iBpAmmo = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); + new CW:iHandler = GetHandlerByEntity(this); + new pPlayer = GetPlayer(this); + new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); + new iMaxAmmo1 = GetData(iHandler, CW_Data_PrimaryAmmoMaxAmount); + new iClip = get_member(this, m_Weapon_iClip); + new iBpAmmo = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); - if (iClip <= 0) { - if (iBpAmmo <= 0 && iMaxAmmo1 != -1) { - return false; + if (iClip <= 0) { + if (iBpAmmo <= 0 && iMaxAmmo1 != -1) { + return false; + } } - } - return true; + return true; } PlayWeaponAnim(this, iSequence, Float:flDuration) { - SendWeaponAnim(this, iSequence); - set_member(this, m_Weapon_flTimeWeaponIdle, flDuration); + SendWeaponAnim(this, iSequence); + set_member(this, m_Weapon_flTimeWeaponIdle, flDuration); } SendWeaponAnim(this, iAnim) { - ExecuteHamB(Ham_CS_Weapon_SendWeaponAnim, this, iAnim, 0); - // new pPlayer = GetPlayer(this); - // set_pev(pPlayer, pev_weaponanim, iAnim); - - // message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, _, pPlayer); - // write_byte(iAnim); - // write_byte(pev(pPlayer, pev_body)); - // message_end(); + ExecuteHamB(Ham_CS_Weapon_SendWeaponAnim, this, iAnim, 0); } GetPlayer(this) { - return get_member(this, m_pPlayer); + return get_member(this, m_pPlayer); } FireBulletsPlayer(this, cShots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], Float:flDistance, Float:flDamage, pAttacker, Float:vecOut[3]) { - new pPlayer = GetPlayer(this); - new shared_rand = pPlayer > 0 ? get_member(pPlayer, random_seed) : 0; - - new tr = create_tr2(); - static Float:vecRight[3]; - get_global_vector(GL_v_right, vecRight); - - static Float:vecUp[3]; - get_global_vector(GL_v_up, vecUp); - - static Float:vecMultiplier[3]; + new CW:iHandler = GetHandlerByEntity(this); + if (iHandler == CW_INVALID_HANDLER) { + return; + } - if (!pAttacker) { - pAttacker = this; // the default attacker is ourselves - } + new pPlayer = GetPlayer(this); + new shared_rand = pPlayer > 0 ? get_member(pPlayer, random_seed) : 0; + new CW_Flags:iFlags = GetData(iHandler, CW_Data_Flags); - // ClearMultiDamage(); - // gMultiDamage.type = DMG_BULLET | DMG_NEVERGIB; + new tr = create_tr2(); - for (new iShot = 1; iShot <= cShots; iShot++) { - //Use player's random seed. - // get circular gaussian spread - vecMultiplier[0] = SharedRandomFloat( shared_rand + iShot, -0.5, 0.5 ) + SharedRandomFloat( shared_rand + ( 1 + iShot ) , -0.5, 0.5 ); - vecMultiplier[1] = SharedRandomFloat( shared_rand + ( 2 + iShot ), -0.5, 0.5 ) + SharedRandomFloat( shared_rand + ( 3 + iShot ), -0.5, 0.5 ); - vecMultiplier[2] = vecMultiplier[0] * vecMultiplier[0] + vecMultiplier[1] * vecMultiplier[1]; + static Float:vecRight[3]; + get_global_vector(GL_v_right, vecRight); - static Float:vecDir[3]; - for (new i = 0; i < 3; ++i) { - vecDir[i] = vecDirShooting[i] + (vecMultiplier[0] * vecSpread[0] * vecRight[i]) + (vecMultiplier[1] * vecSpread[1] * vecUp[i]); - } + static Float:vecUp[3]; + get_global_vector(GL_v_up, vecUp); + static Float:vecMultiplier[3]; - static Float:vecEnd[3]; - for (new i = 0; i < 3; ++i) { - vecEnd[i] = vecSrc[i] + (vecDir[i] * flDistance); + if (!pAttacker) { + pAttacker = this; // the default attacker is ourselves } - engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, this, tr); + // ClearMultiDamage(); + // gMultiDamage.type = DMG_BULLET | DMG_NEVERGIB; - new Float:flFraction; - get_tr2(tr, TR_flFraction, flFraction); - - // do damage, paint decals - if (flFraction != 1.0) { - new pHit = get_tr2(tr, TR_pHit); + for (new iShot = 1; iShot <= cShots; iShot++) { + //Use player's random seed. + // get circular gaussian spread + vecMultiplier[0] = SharedRandomFloat( shared_rand + iShot, -0.5, 0.5 ) + SharedRandomFloat( shared_rand + ( 1 + iShot ) , -0.5, 0.5 ); + vecMultiplier[1] = SharedRandomFloat( shared_rand + ( 2 + iShot ), -0.5, 0.5 ) + SharedRandomFloat( shared_rand + ( 3 + iShot ), -0.5, 0.5 ); + vecMultiplier[2] = vecMultiplier[0] * vecMultiplier[0] + vecMultiplier[1] * vecMultiplier[1]; - if (pHit < 0) { - pHit = 0; - } + static Float:vecDir[3]; + for (new i = 0; i < 3; ++i) { + vecDir[i] = vecDirShooting[i] + (vecMultiplier[0] * vecSpread[0] * vecRight[i]) + (vecMultiplier[1] * vecSpread[1] * vecUp[i]); + } - - rg_multidmg_clear(); - ExecuteHamB(Ham_TraceAttack, pHit, pAttacker, flDamage, vecDir, tr, DMG_BULLET | DMG_NEVERGIB); - rg_multidmg_apply(this, pAttacker); - - // TEXTURETYPE_PlaySound(&tr, vecSrc, vecEnd, iBulletType); - // DecalGunshot( &tr, iBulletType ); + static Float:vecEnd[3]; + for (new i = 0; i < 3; ++i) { + vecEnd[i] = vecSrc[i] + (vecDir[i] * flDistance); + } - new iDecalIndex = random_num(get_decal_index("{shot1"), get_decal_index("{shot5") + 1); - // new iDecalIndex = ExecuteHam(Ham_DamageDecal, pHit, DMG_BULLET); - // DecalTrace2(tr, iDecalIndex); + engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, this, tr); + + new Float:flFraction; + get_tr2(tr, TR_flFraction, flFraction); + + // do damage, paint decals + if (flFraction != 1.0) { + new pHit = get_tr2(tr, TR_pHit); + + if (pHit < 0) { + pHit = 0; + } + + rg_multidmg_clear(); + ExecuteHamB(Ham_TraceAttack, pHit, pAttacker, flDamage, vecDir, tr, DMG_BULLET | DMG_NEVERGIB); + rg_multidmg_apply(this, pAttacker); + + // TEXTURETYPE_PlaySound(&tr, vecSrc, vecEnd, iBulletType); + // DecalGunshot( &tr, iBulletType ); + + // new iDecalIndex = ExecuteHam(Ham_DamageDecal, pHit, DMG_BULLET); + // DecalTrace2(tr, iDecalIndex); + + if (!ExecuteHam(Ham_IsPlayer, pHit)) { + if (~iFlags & CWF_NoBulletSmoke) { + BulletSmoke(tr); + } + + if (~iFlags & CWF_NoBulletDecal) { + new iDecalIndex = random_num(get_decal_index("{shot1"), get_decal_index("{shot5") + 1); + MakeDecal(tr, pHit, iDecalIndex); + } + } + } - if (!ExecuteHam(Ham_IsPlayer, pHit)) { - BulletSmoke(tr); - MakeDecal(tr, pHit, iDecalIndex); - } + // make bullet trails + static Float:vecEndPos[3]; + get_tr2(tr, TR_vecEndPos, vecEndPos); - // GunshotDecalTrace(tr, iDecalIndex); + BubbleTrail(vecSrc, vecEndPos, floatround((flDistance * flFraction) / 64.0)); } - // make bullet trails - static Float:vecEndPos[3]; - get_tr2(tr, TR_vecEndPos, vecEndPos); - - BubbleTrail(vecSrc, vecEndPos, floatround((flDistance * flFraction) / 64.0)); - } + vecOut[0] = vecMultiplier[0] * vecSpread[0]; + vecOut[1] = vecMultiplier[1] * vecSpread[1]; + vecOut[2] = 0.0; - vecOut[0] = vecMultiplier[0] * vecSpread[0]; - vecOut[1] = vecMultiplier[1] * vecSpread[1]; - vecOut[2] = 0.0; - - free_tr2(tr); + free_tr2(tr); } GrenadeDetonate(this, Float:flRadius, Float:flMagnitude) { - static Float:vecStart[3]; - pev(this, pev_origin, vecStart); - vecStart[2] += 8.0; + static Float:vecStart[3]; + pev(this, pev_origin, vecStart); + vecStart[2] += 8.0; - static Float:vecEnd[3]; - xs_vec_copy(vecStart, vecEnd); - vecEnd[2] -= 40.0; + static Float:vecEnd[3]; + xs_vec_copy(vecStart, vecEnd); + vecEnd[2] -= 40.0; - new pTr = create_tr2(); - engfunc(EngFunc_TraceLine, vecStart, vecEnd, IGNORE_MONSTERS, this, pTr); - GrenadeExplode(this, pTr, DMG_GRENADE | DMG_ALWAYSGIB, flRadius, flMagnitude); - free_tr2(pTr); + new pTr = create_tr2(); + engfunc(EngFunc_TraceLine, vecStart, vecEnd, IGNORE_MONSTERS, this, pTr); + GrenadeExplode(this, pTr, DMG_GRENADE | DMG_ALWAYSGIB, flRadius, flMagnitude); + free_tr2(pTr); } GrenadeExplode(this, pTr, iDamageBits, Float:flRadius, Float:flMagnitude) { new Float:flDamage; pev(this, pev_dmg, flDamage); - set_pev(this, pev_model, ""); + set_pev(this, pev_model, NULL_STRING); set_pev(this, pev_solid, SOLID_NOT); set_pev(this, pev_takedamage, DAMAGE_NO); @@ -939,7 +990,7 @@ GrenadeExplode(this, pTr, iDamageBits, Float:flRadius, Float:flMagnitude) { get_tr2(pTr, TR_vecEndPos, vecOrigin); for (new i = 0; i < 3; ++i) { - vecOrigin[i] += (vecPlaneNormal[i] * (flMagnitude ? flMagnitude : flDamage - 24.0) * 0.6); + vecOrigin[i] += (vecPlaneNormal[i] * (flMagnitude ? flMagnitude : flDamage - 24.0) * 0.6); } set_pev(this, pev_origin, vecOrigin); @@ -961,822 +1012,858 @@ GrenadeExplode(this, pTr, iDamageBits, Float:flRadius, Float:flMagnitude) { // SetThink( &CGrenade::Smoke ); // GrenadeSmoke(vecOrigin, flDamage); - set_pev(this, pev_velocity, Float:{0.0, 0.0, 0.0}); + set_pev(this, pev_velocity, NULL_VECTOR); set_pev(this, pev_nextthink, get_gametime() + 0.1); if (PointContents(vecOrigin) != CONTENTS_WATER) { - new iSparkCount = random(4); - for (new i = 0; i < iSparkCount; ++i) { - SparkShower(vecOrigin, vecPlaneNormal, 0); - } + new iSparkCount = random(4); + for (new i = 0; i < iSparkCount; ++i) { + SparkShower(vecOrigin, vecPlaneNormal, 0); + } } } +// ANCHOR: Weapon Callbacks + +public Smack(this) { + new CW:iHandler = GetHandlerByEntity(this); + new CW_Flags:iFlags = GetData(iHandler, CW_Data_Flags); + + new tr = pev(this, pev_iuser1); + new pHit = get_tr2(tr, TR_pHit); + if (pHit < 0) { + pHit = 0; + } + + if (~iFlags & CWF_NoBulletDecal) { + new iDecalIndex = random_num(get_decal_index("{shot1"), get_decal_index("{shot5") + 1); + MakeDecal(tr, pHit, iDecalIndex, false); + } + + free_tr2(tr); + + SetThink(this, NULL_STRING); +} + +public DisablePrediction(this) { + new pPlayer = GetPlayer(this); + SetWeaponPrediction(pPlayer, false); + SetThink(this, NULL_STRING); +} + // ANCHOR: Weapon Entity Default Methods bool:DefaultReload(this, iAnim, Float:flDelay) { - new CW:iHandler = GetHandlerByEntity(this); - new pPlayer = GetPlayer(this); - new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); - new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); + new CW:iHandler = GetHandlerByEntity(this); + new pPlayer = GetPlayer(this); + new iPrimaryAmmoIndex = get_member(this, m_Weapon_iPrimaryAmmoType); + new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoIndex); - if (iPrimaryAmmoAmount <= 0) { - return false; - } + if (iPrimaryAmmoAmount <= 0) { + return false; + } - new iClip = get_member(this, m_Weapon_iClip); - new iClipSize = GetData(iHandler, CW_Data_ClipSize); + new iClip = get_member(this, m_Weapon_iClip); + new iClipSize = GetData(iHandler, CW_Data_ClipSize); - new size = min(iClipSize - iClip, iPrimaryAmmoAmount); - if (size == 0) { - return false; - } + new size = min(iClipSize - iClip, iPrimaryAmmoAmount); + if (size == 0) { + return false; + } - if (get_member(this, m_Weapon_fInReload)) { - return false; - } + if (get_member(this, m_Weapon_fInReload)) { + return false; + } - set_member(pPlayer, m_flNextAttack, flDelay); - set_member(this, m_Weapon_fInReload, 1); + set_member(pPlayer, m_flNextAttack, flDelay); + set_member(this, m_Weapon_fInReload, 1); - PlayWeaponAnim(this, iAnim, 3.0); - rg_set_animation(pPlayer, PLAYER_RELOAD); + PlayWeaponAnim(this, iAnim, 3.0); + rg_set_animation(pPlayer, PLAYER_RELOAD); - return true; + return true; } bool:DefaultShotgunReload(this, iStartAnim, iEndAnim, Float:flDelay, Float:flDuration) { - new pPlayer = GetPlayer(this); - new iClip = get_member(this, m_Weapon_iClip); - new iPrimaryAmmoType = get_member(this, m_Weapon_iPrimaryAmmoType); - new CW:iHandler = GetHandlerByEntity(this); - new iClipSize = GetData(iHandler, CW_Data_ClipSize); - - if (get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType) <= 0 || iClip == iClipSize) { - return false; - } - - // don't reload until recoil is done - new Float:flNextPrimaryAttack = get_member(this, m_Weapon_flNextPrimaryAttack); - new flInSpecialReload = get_member(this, m_Weapon_fInSpecialReload); - if (flNextPrimaryAttack > 0.0) { - return false; - } + new pPlayer = GetPlayer(this); + new iClip = get_member(this, m_Weapon_iClip); + new iPrimaryAmmoType = get_member(this, m_Weapon_iPrimaryAmmoType); + new CW:iHandler = GetHandlerByEntity(this); + new iClipSize = GetData(iHandler, CW_Data_ClipSize); - new Float:flTimeWeaponIdle = get_member(this, m_Weapon_flTimeWeaponIdle); - // check to see if we're ready to reload - if (flInSpecialReload == 0) { - rg_set_animation(pPlayer, PLAYER_RELOAD); - PlayWeaponAnim(this, iStartAnim, flDelay); + if (get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType) <= 0 || iClip == iClipSize) { + return false; + } - set_member(this, m_Weapon_fInSpecialReload, 1); - set_member(pPlayer, m_flNextAttack, flDelay); - set_member(this, m_Weapon_flNextPrimaryAttack, 1.0); - set_member(this, m_Weapon_flNextSecondaryAttack, 1.0); - } else if (flInSpecialReload == 1) { - if (flTimeWeaponIdle > 0.0) { - return false; + // don't reload until recoil is done + new Float:flNextPrimaryAttack = get_member(this, m_Weapon_flNextPrimaryAttack); + new flInSpecialReload = get_member(this, m_Weapon_fInSpecialReload); + if (flNextPrimaryAttack > 0.0) { + return false; } - set_member(this, m_Weapon_fInSpecialReload, 2); + new Float:flTimeWeaponIdle = get_member(this, m_Weapon_flTimeWeaponIdle); + // check to see if we're ready to reload + if (flInSpecialReload == 0) { + rg_set_animation(pPlayer, PLAYER_RELOAD); + PlayWeaponAnim(this, iStartAnim, flDelay); + + set_member(this, m_Weapon_fInSpecialReload, 1); + set_member(pPlayer, m_flNextAttack, flDelay); + set_member(this, m_Weapon_flNextPrimaryAttack, 1.0); + set_member(this, m_Weapon_flNextSecondaryAttack, 1.0); + } else if (flInSpecialReload == 1) { + if (flTimeWeaponIdle > 0.0) { + return false; + } - // if (RANDOM_LONG(0,1)) - // EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/reload1.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG(0,0x1f)); - // else - // EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/reload3.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG(0,0x1f)); + set_member(this, m_Weapon_fInSpecialReload, 2); - PlayWeaponAnim(this, iEndAnim, flDuration); - } else { - // Add them to the clip - set_member(this, m_Weapon_iClip, ++iClip); - set_member(this, m_Weapon_fInSpecialReload, 1); - set_member(pPlayer, m_rgAmmo, get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType) - 1, iPrimaryAmmoType); - } + // if (RANDOM_LONG(0,1)) + // EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/reload1.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG(0,0x1f)); + // else + // EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/reload3.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG(0,0x1f)); - return true; + PlayWeaponAnim(this, iEndAnim, flDuration); + } else { + // Add them to the clip + set_member(this, m_Weapon_iClip, ++iClip); + set_member(this, m_Weapon_fInSpecialReload, 1); + set_member(pPlayer, m_rgAmmo, get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType) - 1, iPrimaryAmmoType); + } + + return true; } bool:DefaultShotgunIdle(this, iAnim, iReloadEndAnim, Float:flDuration, Float:flReloadEndDuration, const szPumpSound[]) { - new CW:iHandler = GetHandlerByEntity(this); - if (iHandler == CW_INVALID_HANDLER) { - return false; - } + new CW:iHandler = GetHandlerByEntity(this); + if (iHandler == CW_INVALID_HANDLER) { + return false; + } - new Float:flTimeWeaponIdle = get_member(this, m_Weapon_flTimeWeaponIdle); - if (flTimeWeaponIdle < 0.0) { - new pPlayer = get_member(this, m_pPlayer); - new iPrimaryAmmoType = get_member(this, m_Weapon_iPrimaryAmmoType); - new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType); - new flInSpecialReload = get_member(this, m_Weapon_fInSpecialReload); - new iClip = get_member(this, m_Weapon_iClip); - - if (!iClip && flInSpecialReload == 0 && iPrimaryAmmoAmount) { - Reload(this); - } else if (flInSpecialReload != 0) { - new iClipSize = GetData(iHandler, CW_Data_ClipSize); - if (iClip < iClipSize && iPrimaryAmmoAmount) { - Reload(this); - } else { - set_member(this, m_Weapon_fInSpecialReload, 0); - emit_sound(pPlayer, CHAN_ITEM, szPumpSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - PlayWeaponAnim(this, iReloadEndAnim, flReloadEndDuration); - } - } else { - PlayWeaponAnim(this, iAnim, flDuration); + new Float:flTimeWeaponIdle = get_member(this, m_Weapon_flTimeWeaponIdle); + if (flTimeWeaponIdle < 0.0) { + new pPlayer = get_member(this, m_pPlayer); + new iPrimaryAmmoType = get_member(this, m_Weapon_iPrimaryAmmoType); + new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType); + new flInSpecialReload = get_member(this, m_Weapon_fInSpecialReload); + new iClip = get_member(this, m_Weapon_iClip); + + if (!iClip && flInSpecialReload == 0 && iPrimaryAmmoAmount) { + Reload(this); + } else if (flInSpecialReload != 0) { + new iClipSize = GetData(iHandler, CW_Data_ClipSize); + if (iClip < iClipSize && iPrimaryAmmoAmount) { + Reload(this); + } else { + set_member(this, m_Weapon_fInSpecialReload, 0); + emit_sound(pPlayer, CHAN_ITEM, szPumpSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + PlayWeaponAnim(this, iReloadEndAnim, flReloadEndDuration); + } + } else { + PlayWeaponAnim(this, iAnim, flDuration); + } } - } - return true; + return true; } bool:DefaultDeploy(this, const szViewModel[], const szWeaponModel[], iAnim, const szAnimExt[]) { - // if (!CanDeploy(this)) { - // return false; - // } + // if (!CanDeploy(this)) { + // return false; + // } - // new CW:iHandler = GetHandlerByEntity(this); - new pPlayer = GetPlayer(this); - set_pev(pPlayer, pev_viewmodel2, szViewModel); - set_pev(pPlayer, pev_weaponmodel2, szWeaponModel); + // new CW:iHandler = GetHandlerByEntity(this); + new pPlayer = GetPlayer(this); + set_pev(pPlayer, pev_viewmodel2, szViewModel); + set_pev(pPlayer, pev_weaponmodel2, szWeaponModel); + + // strcpy( m_pPlayer->m_szAnimExtention, szAnimExt ); + SendWeaponAnim(this, iAnim); - // strcpy( m_pPlayer->m_szAnimExtention, szAnimExt ); - SendWeaponAnim(this, iAnim); + if (szAnimExt[0] != '^0') { + set_member(pPlayer, m_szAnimExtention, szAnimExt); + } - if (szAnimExt[0] != '^0') { - set_member(pPlayer, m_szAnimExtention, szAnimExt); - } + set_member(this, m_Weapon_iShotsFired, 0); + set_member(this, m_Weapon_flTimeWeaponIdle, 1.0); + set_member(this, m_Weapon_flLastFireTime, 0.0); + set_member(this, m_Weapon_flDecreaseShotsFired, get_gametime()); - set_member(pPlayer, m_flNextAttack, 0.5); - set_member(this, m_Weapon_flTimeWeaponIdle, 1.0); + set_member(pPlayer, m_flNextAttack, 0.5); + set_member(pPlayer, m_iFOV, DEFAULT_FOV); + set_member(pPlayer, m_iLastZoom, DEFAULT_FOV); + set_member(pPlayer, m_bResumeZoom, 0); + set_pev(pPlayer, pev_fov, float(DEFAULT_FOV)); - return true; + return true; } bool:DefaultShot(this, Float:flDamage, Float:flRate, Float:flSpread[3], iShots, Float:flDistance) { - new iClip = get_member(this, m_Weapon_iClip); - if (iClip <= 0) { - return false; - } + new iClip = get_member(this, m_Weapon_iClip); + if (iClip <= 0) { + return false; + } - new pPlayer = GetPlayer(this); + new pPlayer = GetPlayer(this); - static Float:vecDirShooting[3]; - ExecuteHam(Ham_CS_Player_GetAutoaimVector, pPlayer, AUTOAIM_2DEGREES, vecDirShooting); + static Float:vecDirShooting[3]; + MakeAimDir(pPlayer, 1.0, vecDirShooting); - static Float:vecSrc[3]; - ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecSrc); + static Float:vecSrc[3]; + ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecSrc); - static Float:vecOut[3]; - FireBulletsPlayer(this, iShots, vecSrc, vecDirShooting, flSpread, flDistance, flDamage, pPlayer, vecOut); + static Float:vecOut[3]; + FireBulletsPlayer(this, iShots, vecSrc, vecDirShooting, flSpread, flDistance, flDamage, pPlayer, vecOut); - set_member(this, m_Weapon_iClip, --iClip); + set_member(this, m_Weapon_iClip, --iClip); - set_member(this, m_Weapon_flNextPrimaryAttack, flRate); - set_member(this, m_Weapon_flNextSecondaryAttack, flRate); + set_member(this, m_Weapon_flNextPrimaryAttack, flRate); + set_member(this, m_Weapon_flNextSecondaryAttack, flRate); - new iShotsFired = get_member(this, m_Weapon_iShotsFired); - set_member(this, m_Weapon_iShotsFired, ++iShotsFired); + new iShotsFired = get_member(this, m_Weapon_iShotsFired); + set_member(this, m_Weapon_iShotsFired, ++iShotsFired); - rg_set_animation(pPlayer, PLAYER_ATTACK1); + rg_set_animation(pPlayer, PLAYER_ATTACK1); - return true; + return true; } bool:DefaultShotgunShot(this, Float:flDamage, Float:flRate, Float:flPumpDelay, Float:flSpread[3], iShots, Float:flDistance) { - new iClip = get_member(this, m_Weapon_iClip); - if (iClip <= 0) { - Reload(this); - if (iClip == 0) { - // PlayEmptySound(); - } + new iClip = get_member(this, m_Weapon_iClip); + if (iClip <= 0) { + Reload(this); + if (iClip == 0) { + // PlayEmptySound(); + } - return false; - } + return false; + } - // m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME; - // m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH; + // m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME; + // m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH; - // m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH; + // m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH; - if (!DefaultShot(this, flDamage, flRate, flSpread, iShots, flDistance)) { - return false; - } + if (!DefaultShot(this, flDamage, flRate, flSpread, iShots, flDistance)) { + return false; + } - set_member(this, m_Weapon_fInSpecialReload, 0); + set_member(this, m_Weapon_fInSpecialReload, 0); - if (iClip != 0) { - set_member(this, m_Weapon_flNextReload, get_gametime() + flPumpDelay); - } + if (iClip != 0) { + set_member(this, m_Weapon_flNextReload, get_gametime() + flPumpDelay); + } - return true; + return true; } DefaultSwing(this, Float:flDamage, Float:flRate, Float:flDistance) { - new pPlayer = GetPlayer(this); - - static Float:vecSrc[3]; - ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecSrc); + new CW:iHandler = GetHandlerByEntity(this); + if (iHandler == CW_INVALID_HANDLER) { + return -1; + } - static Float:vecAngles[3]; - pev(pPlayer, pev_v_angle, vecAngles); - engfunc(EngFunc_MakeVectors, vecAngles); + new pPlayer = GetPlayer(this); - static Float:vecEnd[3]; - get_global_vector(GL_v_forward, vecEnd); - xs_vec_mul_scalar(vecEnd, flDistance, vecEnd); - xs_vec_add(vecSrc, vecEnd, vecEnd); + static Float:vecSrc[3]; + ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecSrc); - new tr = create_tr2(); - engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, this, tr); + static Float:vecEnd[3]; + MakeAimDir(pPlayer, flDistance, vecEnd); + xs_vec_add(vecSrc, vecEnd, vecEnd); - new Float:flFraction; - get_tr2(tr, TR_flFraction, flFraction); + new tr = create_tr2(); + engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, this, tr); - if (flFraction >= 1.0) { - engfunc(EngFunc_TraceHull, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, HULL_HEAD, this, tr); + new Float:flFraction; get_tr2(tr, TR_flFraction, flFraction); - if (flFraction < 1.0) { - // Calculate the point of interANCHOR of the line (or hull) and the object we hit - // This is and approximation of the "best" interANCHOR - new pHit = get_tr2(tr, TR_pHit); - if (pHit != -1) { - FindHullIntersection(vecSrc, tr, VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX, this); - } + if (flFraction >= 1.0) { + engfunc(EngFunc_TraceHull, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, HULL_HEAD, this, tr); + get_tr2(tr, TR_flFraction, flFraction); - get_tr2(tr, TR_vecEndPos, vecEnd); // This is the point on the actual surface (the hull could have hit space) - get_tr2(tr, TR_flFraction, flFraction); + if (flFraction < 1.0) { + // Calculate the point of interANCHOR of the line (or hull) and the object we hit + // This is and approximation of the "best" interANCHOR + new pHit = get_tr2(tr, TR_pHit); + if (pHit != -1) { + FindHullIntersection(vecSrc, tr, VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX, this); + } + + get_tr2(tr, TR_vecEndPos, vecEnd); // This is the point on the actual surface (the hull could have hit space) + get_tr2(tr, TR_flFraction, flFraction); + } } - } - new iShotsFired = get_member(this, m_Weapon_iShotsFired); - set_member(this, m_Weapon_iShotsFired, iShotsFired + 1); + new iShotsFired = get_member(this, m_Weapon_iShotsFired); + set_member(this, m_Weapon_iShotsFired, iShotsFired + 1); - set_member(this, m_Weapon_flNextPrimaryAttack, flRate); - - rg_set_animation(pPlayer, PLAYER_ATTACK1); - - if (flFraction >= 1.0) { - free_tr2(tr); - return -1; - } + set_member(this, m_Weapon_flNextPrimaryAttack, flRate); - new pHit = get_tr2(tr, TR_pHit); - if (pHit < 0) { - set_tr2(tr, TR_pHit, 0); - pHit = 0; - } + rg_set_animation(pPlayer, PLAYER_ATTACK1); - rg_multidmg_clear(); + if (flFraction >= 1.0) { + free_tr2(tr); + return -1; + } - // if (get_member(this, m_Weapon_flNextPrimaryAttack) + 1.0 < 0.0) { - // first swing does full damage - static Float:vecDir[3]; - xs_vec_sub(vecSrc, vecEnd, vecDir); - xs_vec_normalize(vecDir, vecDir); + new pHit = get_tr2(tr, TR_pHit); + if (pHit < 0) { + set_tr2(tr, TR_pHit, 0); + pHit = 0; + } - ExecuteHamB(Ham_TraceAttack, pHit, pPlayer, flDamage, vecDir, tr, DMG_CLUB); - // } + rg_multidmg_clear(); - rg_multidmg_apply(this, pPlayer); + // if (get_member(this, m_Weapon_flNextPrimaryAttack) + 1.0 < 0.0) { + // first swing does full damage + static Float:vecDir[3]; + xs_vec_sub(vecSrc, vecEnd, vecDir); + xs_vec_normalize(vecDir, vecDir); - set_pev(this, pev_iuser1, tr); - SetThink(this, "Smack"); - set_pev(this, pev_nextthink, get_gametime() + (flRate * 0.5)); + ExecuteHamB(Ham_TraceAttack, pHit, pPlayer, flDamage, vecDir, tr, DMG_CLUB); + // } - return pHit; -} + rg_multidmg_apply(this, pPlayer); -public Smack(this) { - new tr = pev(this, pev_iuser1); - new pHit = get_tr2(tr, TR_pHit); - if (pHit < 0) { - pHit = 0; - } + set_pev(this, pev_iuser1, tr); + SetThink(this, "Smack"); + set_pev(this, pev_nextthink, get_gametime() + (flRate * 0.5)); - new iDecalIndex = random_num(get_decal_index("{shot1"), get_decal_index("{shot5") + 1); - MakeDecal(tr, pHit, iDecalIndex, false); - free_tr2(tr); + return pHit; } // ANCHOR: Weapon Methods -CW:RegisterWeapon(iPluginId, const szName[], iWeaponId, iClipSize, iPrimaryAmmoType, iPrimaryAmmoMaxAmount, iSecondaryAmmoType, iSecondaryAmmoMaxAmount, iSlotId, iPosition, iWeaponFlags, const szIcon[]) { - new CW:iHandler = CreateWeaponData(szName); - SetData(iHandler, CW_Data_PluginId, iPluginId); - SetStringData(iHandler, CW_Data_Name, szName); - SetData(iHandler, CW_Data_Id, iWeaponId); - SetData(iHandler, CW_Data_ClipSize, iClipSize); - SetData(iHandler, CW_Data_PrimaryAmmoType, iPrimaryAmmoType); - SetData(iHandler, CW_Data_PrimaryAmmoMaxAmount, iPrimaryAmmoMaxAmount); - SetData(iHandler, CW_Data_SecondaryAmmoType, iSecondaryAmmoType); - SetData(iHandler, CW_Data_SecondaryAmmoMaxAmount, iSecondaryAmmoMaxAmount); - SetData(iHandler, CW_Data_SlotId, iSlotId); - SetData(iHandler, CW_Data_Position, iPosition); - SetData(iHandler, CW_Data_WeaponFlags, iWeaponFlags); - SetStringData(iHandler, CW_Data_Icon, szIcon); - - if (!g_bPrecache && !g_bWeaponHooks[iWeaponId]) { // we are not able to get weapon name in precache state - RegisterWeaponHooks(iWeaponId); - } +CW:RegisterWeapon(iPluginId, const szName[], iWeaponId, iClipSize, iPrimaryAmmoType, iPrimaryAmmoMaxAmount, iSecondaryAmmoType, iSecondaryAmmoMaxAmount, iSlotId, iPosition, iWeaponFlags, const szIcon[], CW_Flags:iFlags) { + new CW:iHandler = CreateWeaponData(szName); + SetData(iHandler, CW_Data_PluginId, iPluginId); + SetStringData(iHandler, CW_Data_Name, szName); + SetData(iHandler, CW_Data_Id, iWeaponId); + SetData(iHandler, CW_Data_ClipSize, iClipSize); + SetData(iHandler, CW_Data_PrimaryAmmoType, iPrimaryAmmoType); + SetData(iHandler, CW_Data_PrimaryAmmoMaxAmount, iPrimaryAmmoMaxAmount); + SetData(iHandler, CW_Data_SecondaryAmmoType, iSecondaryAmmoType); + SetData(iHandler, CW_Data_SecondaryAmmoMaxAmount, iSecondaryAmmoMaxAmount); + SetData(iHandler, CW_Data_SlotId, iSlotId); + SetData(iHandler, CW_Data_Position, iPosition); + SetData(iHandler, CW_Data_WeaponFlags, iWeaponFlags); + SetStringData(iHandler, CW_Data_Icon, szIcon); + SetData(iHandler, CW_Data_Flags, iFlags); + + if (!g_bPrecache && !g_bWeaponHooks[iWeaponId]) { // we are not able to get weapon name in precache state + RegisterWeaponHooks(iWeaponId); + } - register_clcmd(szName, "OnWeaponClCmd"); + register_clcmd(szName, "OnWeaponClCmd"); - return iHandler; + return iHandler; } CW:GetHandler(const szName[]) { - new CW:iHandler; - if (!TrieGetCell(g_weaponsMap, szName, iHandler)) { - return CW_INVALID_HANDLER; - } + new CW:iHandler; + if (!TrieGetCell(g_rgWeaponsMap, szName, iHandler)) { + return CW_INVALID_HANDLER; + } - return iHandler; + return iHandler; } CW:GetHandlerByEntity(pEntity) { - new iToken = pev(pEntity, pev_impulse); + new iToken = pev(pEntity, pev_impulse); - if (iToken >= TOKEN && iToken < TOKEN + g_iWeaponCount) { - return CW:(iToken - TOKEN); - } + if (iToken >= TOKEN && iToken < TOKEN + g_iWeaponCount) { + return CW:(iToken - TOKEN); + } - return CW_INVALID_HANDLER; + return CW_INVALID_HANDLER; } SpawnWeapon(CW:iHandler) { - new iWeaponId = GetData(iHandler, CW_Data_Id); + new iWeaponId = GetData(iHandler, CW_Data_Id); - new pEntity = engfunc(EngFunc_CreateNamedEntity, g_iszWeaponNames[iWeaponId]); - set_pev(pEntity, pev_impulse, TOKEN + _:iHandler); - dllfunc(DLLFunc_Spawn, pEntity); + new pEntity = engfunc(EngFunc_CreateNamedEntity, g_iszWeaponNames[iWeaponId]); + set_pev(pEntity, pev_impulse, TOKEN + _:iHandler); + dllfunc(DLLFunc_Spawn, pEntity); - new iPrimaryAmmoType = GetData(iHandler, CW_Data_PrimaryAmmoType); + new iPrimaryAmmoType = GetData(iHandler, CW_Data_PrimaryAmmoType); - set_member(pEntity, m_Weapon_iClip, GetData(iHandler, CW_Data_ClipSize)); - set_member(pEntity, m_Weapon_iPrimaryAmmoType, iPrimaryAmmoType); - set_member(pEntity, m_Weapon_iDefaultAmmo, 0); - // set_member(pEntity, m_Weapon_iShell, 0); - // set_member(pEntity, m_Weapon_bDelayFire, true); - // set_member(pEntity, m_Weapon_fFireOnEmpty, true); + set_member(pEntity, m_Weapon_iClip, GetData(iHandler, CW_Data_ClipSize)); + set_member(pEntity, m_Weapon_iPrimaryAmmoType, iPrimaryAmmoType); + set_member(pEntity, m_Weapon_iDefaultAmmo, 0); + // set_member(pEntity, m_Weapon_iShell, 0); + // set_member(pEntity, m_Weapon_bDelayFire, true); + // set_member(pEntity, m_Weapon_fFireOnEmpty, true); - ExecuteBindedFunction(CWB_Spawn, pEntity); + ExecuteBindedFunction(CWB_Spawn, pEntity); - return pEntity; + return pEntity; } SpawnWeaponBox(CW:iHandler) { - new pWeaponBox = engfunc(EngFunc_CreateNamedEntity, g_iszWeaponBox); - dllfunc(DLLFunc_Spawn, pWeaponBox); + new pWeaponBox = engfunc(EngFunc_CreateNamedEntity, g_iszWeaponBox); + dllfunc(DLLFunc_Spawn, pWeaponBox); + + new pItem = SpawnWeapon(iHandler); + set_pev(pItem, pev_spawnflags, pev(pItem, pev_spawnflags) | SF_NORESPAWN); + set_pev(pItem, pev_effects, EF_NODRAW); + set_pev(pItem, pev_movetype, MOVETYPE_NONE); + set_pev(pItem, pev_solid, SOLID_NOT); + set_pev(pItem, pev_model, 0); + set_pev(pItem, pev_modelindex, 0); + set_pev(pItem, pev_owner, pWeaponBox); - new pItem = SpawnWeapon(iHandler); - set_pev(pItem, pev_spawnflags, pev(pItem, pev_spawnflags) | SF_NORESPAWN); - set_pev(pItem, pev_effects, EF_NODRAW); - set_pev(pItem, pev_movetype, MOVETYPE_NONE); - set_pev(pItem, pev_solid, SOLID_NOT); - set_pev(pItem, pev_model, 0); - set_pev(pItem, pev_modelindex, 0); - set_pev(pItem, pev_owner, pWeaponBox); + new iSlot = GetData(iHandler, CW_Data_SlotId); + set_member(pWeaponBox, m_WeaponBox_rgpPlayerItems, pItem, iSlot); - new iSlot = GetData(iHandler, CW_Data_SlotId); - set_member(pWeaponBox, m_WeaponBox_rgpPlayerItems, pItem, iSlot); + dllfunc(DLLFunc_Spawn, pWeaponBox); - dllfunc(DLLFunc_Spawn, pWeaponBox); + // engfunc(EngFunc_SetSize, pWeaponBox, {-8.0, -8.0, 0.0}, {8.0, 8.0, 4.0}); - return pWeaponBox; + return pWeaponBox; } // ANCHOR: Player Methods GiveWeapon(pPlayer, CW:iHandler) { - new pWeapon = SpawnWeapon(iHandler); - if(ExecuteHam(Ham_AddPlayerItem, pPlayer, pWeapon)) { - ExecuteHam(Ham_Item_AttachToPlayer, pWeapon, pPlayer); - emit_sound(pPlayer, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } + new pWeapon = SpawnWeapon(iHandler); + if (ExecuteHamB(Ham_AddPlayerItem, pPlayer, pWeapon)) { + ExecuteHamB(Ham_Item_AttachToPlayer, pWeapon, pPlayer); + emit_sound(pWeapon, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } UpdateWeaponList(pPlayer, CW:iHandler) { - new iWeaponId = GetData(iHandler, CW_Data_Id); - - static szName[64]; - GetStringData(iHandler, CW_Data_Name, szName, charsmax(szName)); - - new iPrimaryAmmoType = GetData(iHandler, CW_Data_PrimaryAmmoType); - new iPrimaryAmmoMaxCount = GetData(iHandler, CW_Data_PrimaryAmmoMaxAmount); - new iSecondaryAmmoType = GetData(iHandler, CW_Data_SecondaryAmmoType); - new iSecondaryAmmoMaxCount = GetData(iHandler, CW_Data_SecondaryAmmoMaxAmount); - new iSlotId = GetData(iHandler, CW_Data_SlotId); - new iPosition = GetData(iHandler, CW_Data_Position); - new iFlags = GetData(iHandler, CW_Data_WeaponFlags); - - emessage_begin(MSG_ONE, gmsgWeaponList, _, pPlayer); - ewrite_string(szName); - ewrite_byte(iPrimaryAmmoType); - ewrite_byte(iPrimaryAmmoMaxCount); - ewrite_byte(iSecondaryAmmoType); - ewrite_byte(iSecondaryAmmoMaxCount); - ewrite_byte(iSlotId); - ewrite_byte(iPosition); - ewrite_byte(iWeaponId); - ewrite_byte(iFlags); - emessage_end(); + new iWeaponId = GetData(iHandler, CW_Data_Id); + + static szName[64]; + GetStringData(iHandler, CW_Data_Name, szName, charsmax(szName)); + + new iPrimaryAmmoType = GetData(iHandler, CW_Data_PrimaryAmmoType); + new iPrimaryAmmoMaxCount = GetData(iHandler, CW_Data_PrimaryAmmoMaxAmount); + new iSecondaryAmmoType = GetData(iHandler, CW_Data_SecondaryAmmoType); + new iSecondaryAmmoMaxCount = GetData(iHandler, CW_Data_SecondaryAmmoMaxAmount); + new iSlotId = GetData(iHandler, CW_Data_SlotId); + new iPosition = GetData(iHandler, CW_Data_Position); + new iWeaponFlags = GetData(iHandler, CW_Data_WeaponFlags); + + emessage_begin(MSG_ONE, gmsgWeaponList, _, pPlayer); + ewrite_string(szName); + ewrite_byte(iPrimaryAmmoType); + ewrite_byte(iPrimaryAmmoMaxCount); + ewrite_byte(iSecondaryAmmoType); + ewrite_byte(iSecondaryAmmoMaxCount); + ewrite_byte(iSlotId); + ewrite_byte(iPosition); + ewrite_byte(iWeaponId); + ewrite_byte(iWeaponFlags); + emessage_end(); } ResetWeaponList(pPlayer, iWeaponId) { - message_begin(MSG_ONE, gmsgWeaponList, _, pPlayer); - write_string(g_weaponListDefaults[iWeaponId][WL_WeaponName]); - write_byte(g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoType]); - write_byte(g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoMaxAmount]); - write_byte(g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoType]); - write_byte(g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoMaxAmount]); - write_byte(g_weaponListDefaults[iWeaponId][WL_SlotId]); - write_byte(g_weaponListDefaults[iWeaponId][WL_NumberInSlot]); - write_byte(g_weaponListDefaults[iWeaponId][WL_WeaponId]); - write_byte(g_weaponListDefaults[iWeaponId][WL_Flags]); - message_end(); + message_begin(MSG_ONE, gmsgWeaponList, _, pPlayer); + write_string(g_weaponListDefaults[iWeaponId][WL_WeaponName]); + write_byte(g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoType]); + write_byte(g_weaponListDefaults[iWeaponId][WL_PrimaryAmmoMaxAmount]); + write_byte(g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoType]); + write_byte(g_weaponListDefaults[iWeaponId][WL_SecondaryAmmoMaxAmount]); + write_byte(g_weaponListDefaults[iWeaponId][WL_SlotId]); + write_byte(g_weaponListDefaults[iWeaponId][WL_NumberInSlot]); + write_byte(g_weaponListDefaults[iWeaponId][WL_WeaponId]); + write_byte(g_weaponListDefaults[iWeaponId][WL_Flags]); + message_end(); } SetWeaponPrediction(pPlayer, bool:bValue) { - new pszInfoBuffer = engfunc(EngFunc_GetInfoKeyBuffer, pPlayer); - engfunc(EngFunc_SetClientKeyValue, pPlayer, pszInfoBuffer, "cl_lw", bValue ? "1" : "0"); + new pszInfoBuffer = engfunc(EngFunc_GetInfoKeyBuffer, pPlayer); + engfunc(EngFunc_SetClientKeyValue, pPlayer, pszInfoBuffer, "cl_lw", bValue ? "1" : "0"); } RemovePlayerItem(pItem) { - new pPlayer = GetPlayer(pItem); + new pPlayer = GetPlayer(pItem); - new iWeaponId = get_member(pItem, m_iId); + new iWeaponId = get_member(pItem, m_iId); - if (pItem == get_member(pPlayer, m_pActiveItem)) { - ExecuteHamB(Ham_Weapon_RetireWeapon, pItem); - } + if (pItem == get_member(pPlayer, m_pActiveItem)) { + ExecuteHamB(Ham_Weapon_RetireWeapon, pItem); + } - ExecuteHamB(Ham_RemovePlayerItem, pPlayer, pItem); - ExecuteHamB(Ham_Item_Kill, pItem); - set_pev(pPlayer, pev_weapons, pev(pPlayer, pev_weapons) & ~(1< 1.0) { - vecMidUp[2] = flMinZ + (flDiff / 2.0); + vecMidUp[2] = flMinZ; + if (PointContents(vecMidUp) != CONTENTS_WATER) { + return flMinZ; + } + vecMidUp[2] = flMaxZ; if (PointContents(vecMidUp) == CONTENTS_WATER) { - flMinZ = vecMidUp[2]; - } else { - flMaxZ = vecMidUp[2]; + return flMaxZ; } - flDiff = flMaxZ - flMinZ; - } - - return vecMidUp[2]; -} + new Float:flDiff = flMaxZ - flMinZ; + while (flDiff > 1.0) { + vecMidUp[2] = flMinZ + (flDiff / 2.0); -FindHullIntersection(const Float:vecSrc[3], &tr, const Float:vecMins[3], const Float:vecMaxs[3], pEntity) { - new Float:flDistance = 8192.0; + if (PointContents(vecMidUp) == CONTENTS_WATER) { + flMinZ = vecMidUp[2]; + } else { + flMaxZ = vecMidUp[2]; + } - static Float:rgvecMinsMaxs[2][3]; - for (new i = 0; i < 3; ++i) { - rgvecMinsMaxs[0][i] = vecMins[i]; - rgvecMinsMaxs[1][i] = vecMaxs[i]; - } + flDiff = flMaxZ - flMinZ; + } - static Float:vecHullEnd[3]; - get_tr2(tr, TR_vecEndPos, vecHullEnd); + return vecMidUp[2]; +} - for (new i = 0; i < 3; ++i) { - vecHullEnd[i] = vecSrc[i] + ((vecHullEnd[i] - vecSrc[i]) * 2.0); - } +FindHullIntersection(const Float:vecSrc[3], &tr, const Float:vecMins[3], const Float:vecMaxs[3], pEntity) { + new Float:flDistance = 8192.0; - new tmpTrace = create_tr2(); - engfunc(EngFunc_TraceLine, vecSrc, vecHullEnd, DONT_IGNORE_MONSTERS, pEntity, tmpTrace); + static Float:rgvecMinsMaxs[2][3]; + for (new i = 0; i < 3; ++i) { + rgvecMinsMaxs[0][i] = vecMins[i]; + rgvecMinsMaxs[1][i] = vecMaxs[i]; + } - new Float:flFraction; - get_tr2(tmpTrace, TR_flFraction, flFraction); + static Float:vecHullEnd[3]; + get_tr2(tr, TR_vecEndPos, vecHullEnd); - if (flFraction < 1.0) { - free_tr2(tr); - tr = tmpTrace; - return; - } + for (new i = 0; i < 3; ++i) { + vecHullEnd[i] = vecSrc[i] + ((vecHullEnd[i] - vecSrc[i]) * 2.0); + } - static Float:vecEnd[3]; - for (new i = 0; i < 2; i++) { - for (new j = 0; j < 2; j++) { - for (new k = 0; k < 2; k++) { - vecEnd[0] = vecHullEnd[0] + rgvecMinsMaxs[i][0]; - vecEnd[1] = vecHullEnd[1] + rgvecMinsMaxs[j][1]; - vecEnd[2] = vecHullEnd[2] + rgvecMinsMaxs[k][2]; + new tmpTrace = create_tr2(); + engfunc(EngFunc_TraceLine, vecSrc, vecHullEnd, DONT_IGNORE_MONSTERS, pEntity, tmpTrace); - engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, pEntity, tmpTrace); - get_tr2(tmpTrace, TR_flFraction, flFraction); + new Float:flFraction; + get_tr2(tmpTrace, TR_flFraction, flFraction); - new Float:vecEndPos[3]; - get_tr2(tmpTrace, TR_vecEndPos, vecEndPos); + if (flFraction < 1.0) { + free_tr2(tr); + tr = tmpTrace; + return; + } - if (flFraction < 1.0) { - new Float:flThisDistance = get_distance_f(vecEndPos, vecSrc); - if (flThisDistance < flDistance) { - free_tr2(tr); - tr = tmpTrace; - flDistance = flThisDistance; - } + static Float:vecEnd[3]; + for (new i = 0; i < 2; i++) { + for (new j = 0; j < 2; j++) { + for (new k = 0; k < 2; k++) { + vecEnd[0] = vecHullEnd[0] + rgvecMinsMaxs[i][0]; + vecEnd[1] = vecHullEnd[1] + rgvecMinsMaxs[j][1]; + vecEnd[2] = vecHullEnd[2] + rgvecMinsMaxs[k][2]; + + engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, pEntity, tmpTrace); + get_tr2(tmpTrace, TR_flFraction, flFraction); + + new Float:vecEndPos[3]; + get_tr2(tmpTrace, TR_vecEndPos, vecEndPos); + + if (flFraction < 1.0) { + new Float:flThisDistance = get_distance_f(vecEndPos, vecSrc); + if (flThisDistance < flDistance) { + free_tr2(tr); + tr = tmpTrace; + flDistance = flThisDistance; + } + } + } } - } } - } } -_RadiusDamage(const Float:vecOrigin[3], iInflictor, iAttacker, Float:flDamage, Float:flRadius, iClassIgnore, iDamageBits) { - #pragma unused iClassIgnore +_RadiusDamage(const Float:vecOrigin[3], iInflictor, pAttacker, Float:flDamage, Float:flRadius, iClassIgnore, iDamageBits) { + #pragma unused iClassIgnore - static Float:vecSrc[3]; - xs_vec_copy(vecOrigin, vecSrc); + static Float:vecSrc[3]; + xs_vec_copy(vecOrigin, vecSrc); - new Float:flFalloff = flRadius ? (flDamage / flRadius) : 1.0; - new bool:bInWater = (PointContents(vecSrc) == CONTENTS_WATER); + new Float:flFalloff = flRadius ? (flDamage / flRadius) : 1.0; + new bool:bInWater = (PointContents(vecSrc) == CONTENTS_WATER); - vecSrc[2] += 1.0; // in case grenade is lying on the ground + vecSrc[2] += 1.0; // in case grenade is lying on the ground - if ( !iAttacker ) { - iAttacker = iInflictor; - } + if (!pAttacker) { + pAttacker = iInflictor; + } - new pTr = create_tr2(); + new pTr = create_tr2(); - new pEntity; - new iPrevEntity; - while ((pEntity = engfunc(EngFunc_FindEntityInSphere, pEntity, vecSrc, flRadius)) != 0) { - if (iPrevEntity >= pEntity) { - break; - } + new pEntity; + new iPrevEntity; + while ((pEntity = engfunc(EngFunc_FindEntityInSphere, pEntity, vecSrc, flRadius)) != 0) { + if (iPrevEntity >= pEntity) { + break; + } - if (!pev_valid(pEntity)) { - continue; - } + if (!pev_valid(pEntity)) { + continue; + } - if (ExecuteHam(Ham_IsPlayer, pEntity) && !rg_is_player_can_takedamage(pEntity, iAttacker)) { - continue; - } + if (ExecuteHam(Ham_IsPlayer, pEntity) && !rg_is_player_can_takedamage(pEntity, pAttacker)) { + continue; + } - if (pev(pEntity, pev_takedamage) == DAMAGE_NO) { - continue; - } + if (pev(pEntity, pev_takedamage) == DAMAGE_NO) { + continue; + } - static szClassname[32]; - pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); + static szClassname[32]; + pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); - // UNDONE: this should check a damage mask, not an ignore - // if ( iClassIgnore != CLASS_NONE && pEntity->Classify() == iClassIgnore ) {// houndeyes don't hurt other houndeyes with their attack - // continue; - // } + // UNDONE: this should check a damage mask, not an ignore + // if ( iClassIgnore != CLASS_NONE && pEntity->Classify() == iClassIgnore ) {// houndeyes don't hurt other houndeyes with their attack + // continue; + // } - new iWaterLevel = pev(pEntity, pev_waterlevel); + new iWaterLevel = pev(pEntity, pev_waterlevel); - if (bInWater && iWaterLevel == 0) { - continue; - } + if (bInWater && iWaterLevel == 0) { + continue; + } - if (!bInWater && iWaterLevel == 3) { - continue; - } + if (!bInWater && iWaterLevel == 3) { + continue; + } - static Float:vecSpot[3]; - ExecuteHamB(Ham_BodyTarget, pEntity, vecSrc, vecSpot); - engfunc(EngFunc_TraceLine, vecSrc, vecSpot, IGNORE_MONSTERS, iInflictor, pTr); + static Float:vecSpot[3]; + ExecuteHamB(Ham_BodyTarget, pEntity, vecSrc, vecSpot); + engfunc(EngFunc_TraceLine, vecSrc, vecSpot, IGNORE_MONSTERS, iInflictor, pTr); - static Float:flFraction; - get_tr2(pTr, TR_flFraction, flFraction); + static Float:flFraction; + get_tr2(pTr, TR_flFraction, flFraction); - if (flFraction != 1.0 && get_tr2(pTr, TR_pHit) != pEntity) { - continue; - } + if (flFraction != 1.0 && get_tr2(pTr, TR_pHit) != pEntity) { + continue; + } - if (get_tr2(pTr, TR_StartSolid)) { - set_tr2(pTr, TR_vecEndPos, vecSrc); - set_tr2(pTr, TR_flFraction, 0.0); - flFraction = 0.0; - } + if (get_tr2(pTr, TR_StartSolid)) { + set_tr2(pTr, TR_vecEndPos, vecSrc); + set_tr2(pTr, TR_flFraction, 0.0); + flFraction = 0.0; + } - static Float:vecEnd[3]; - get_tr2(pTr, TR_vecEndPos, vecEnd); + static Float:vecEnd[3]; + get_tr2(pTr, TR_vecEndPos, vecEnd); - new Float:flAdjustedDamage = flDamage - (get_distance_f(vecSrc, vecEnd) * flFalloff); + new Float:flAdjustedDamage = flDamage - (get_distance_f(vecSrc, vecEnd) * flFalloff); - if (flAdjustedDamage < 0.0) { - flAdjustedDamage = 0.0; - } + if (flAdjustedDamage < 0.0) { + flAdjustedDamage = 0.0; + } - if (flFraction != 1.0) { - static Float:vecDir[3]; - xs_vec_sub(vecEnd, vecSrc, vecDir); - xs_vec_normalize(vecDir, vecDir); + if (flFraction != 1.0) { + static Float:vecDir[3]; + xs_vec_sub(vecEnd, vecSrc, vecDir); + xs_vec_normalize(vecDir, vecDir); - rg_multidmg_clear(); - ExecuteHamB(Ham_TraceAttack, pEntity, iInflictor, flAdjustedDamage, vecDir, pTr, iDamageBits); - rg_multidmg_apply(iInflictor, iAttacker); - } else { - ExecuteHamB(Ham_TakeDamage, pEntity, iInflictor, iAttacker, flAdjustedDamage, iDamageBits); + rg_multidmg_clear(); + ExecuteHamB(Ham_TraceAttack, pEntity, iInflictor, flAdjustedDamage, vecDir, pTr, iDamageBits); + rg_multidmg_apply(iInflictor, pAttacker); + } else { + ExecuteHamB(Ham_TakeDamage, pEntity, iInflictor, pAttacker, flAdjustedDamage, iDamageBits); + } + + iPrevEntity = pEntity; } - iPrevEntity = pEntity; - } + free_tr2(pTr); +} - free_tr2(pTr); +MakeAimDir(pPlayer, Float:flDistance, Float:vecOut[3]) { + static Float:vecAngles[3]; + pev(pPlayer, pev_v_angle, vecAngles); + engfunc(EngFunc_MakeVectors, vecAngles); + + get_global_vector(GL_v_forward, vecOut); + xs_vec_mul_scalar(vecOut, flDistance, vecOut); } // ANCHOR: Storages AllocateStrings() { - g_iszWeaponBox = engfunc(EngFunc_AllocString, "weaponbox"); + g_iszWeaponBox = engfunc(EngFunc_AllocString, "weaponbox"); - for (new iWeaponId = 0; iWeaponId <= CSW_P90; ++iWeaponId) { - if (g_rgszWeaponNames[iWeaponId][0] == '^0') { - continue; - } + for (new iWeaponId = 0; iWeaponId <= CSW_LAST_WEAPON; ++iWeaponId) { + if (g_rgszWeaponNames[iWeaponId][0] == '^0') { + continue; + } - g_iszWeaponNames[iWeaponId] = engfunc(EngFunc_AllocString, g_rgszWeaponNames[iWeaponId]); - } + g_iszWeaponNames[iWeaponId] = engfunc(EngFunc_AllocString, g_rgszWeaponNames[iWeaponId]); + } } InitStorages() { - g_weapons[CW_Data_Name] = ArrayCreate(64, 1); - g_weapons[CW_Data_Icon] = ArrayCreate(16, 1); + g_rgWeapons[CW_Data_Name] = ArrayCreate(64, 1); + g_rgWeapons[CW_Data_Icon] = ArrayCreate(16, 1); - for (new i = 0; i < _:CW_Data; ++i) { - if (!g_weapons[CW_Data:i]) { - g_weapons[CW_Data:i] = ArrayCreate(1, 1); + for (new i = 0; i < _:CW_Data; ++i) { + if (!g_rgWeapons[CW_Data:i]) { + g_rgWeapons[CW_Data:i] = ArrayCreate(1, 1); + } } - } - g_weaponsMap = TrieCreate(); + g_rgWeaponsMap = TrieCreate(); } DestroyStorages() { - for (new CW:iHandler = CW:0; _:iHandler < g_iWeaponCount; ++iHandler) { - DestroyWeaponData(iHandler); - } + for (new CW:iHandler = CW:0; _:iHandler < g_iWeaponCount; ++iHandler) { + DestroyWeaponData(iHandler); + } - for (new i = 0; i < _:CW_Data; ++i) { - ArrayDestroy(Array:g_weapons[CW_Data:i]); - } + for (new i = 0; i < _:CW_Data; ++i) { + ArrayDestroy(Array:g_rgWeapons[CW_Data:i]); + } - TrieDestroy(g_weaponsMap); + TrieDestroy(g_rgWeaponsMap); } // ANCHOR: Weapon Data CW:CreateWeaponData(const szName[]) { - new CW:iHandler = CW:g_iWeaponCount; + new CW:iHandler = CW:g_iWeaponCount; - for (new iParam = 0; iParam < _:CW_Data; ++iParam) { - ArrayPushCell(Array:g_weapons[CW_Data:iParam], 0); - } + for (new iParam = 0; iParam < _:CW_Data; ++iParam) { + ArrayPushCell(Array:g_rgWeapons[CW_Data:iParam], 0); + } - TrieSetCell(g_weaponsMap, szName, iHandler); + TrieSetCell(g_rgWeaponsMap, szName, iHandler); - InitBindings(iHandler); + InitBindings(iHandler); - g_iWeaponCount++; + g_iWeaponCount++; - return iHandler; + return iHandler; } DestroyWeaponData(CW:iHandler) { - DestroyBindings(iHandler); + DestroyBindings(iHandler); } any:GetData(CW:iHandler, CW_Data:iParam) { - return ArrayGetCell(Array:g_weapons[iParam], _:iHandler); + return ArrayGetCell(Array:g_rgWeapons[iParam], _:iHandler); } GetStringData(CW:iHandler, CW_Data:iParam, szOut[], iLen) { - ArrayGetString(Array:g_weapons[iParam], _:iHandler, szOut, iLen); + ArrayGetString(Array:g_rgWeapons[iParam], _:iHandler, szOut, iLen); } SetData(CW:iHandler, CW_Data:iParam, any:value) { - ArraySetCell(Array:g_weapons[iParam], _:iHandler, value); + ArraySetCell(Array:g_rgWeapons[iParam], _:iHandler, value); } SetStringData(CW:iHandler, CW_Data:iParam, const szValue[]) { - ArraySetString(Array:g_weapons[iParam], _:iHandler, szValue); + ArraySetString(Array:g_rgWeapons[iParam], _:iHandler, szValue); } // ANCHOR: Weapon Bindings Array:InitBindings(CW:iHandler) { - new Array:irgBindings = ArrayCreate(Function, _:CW_Binding); - for (new i = 0; i < _:CW_Binding; ++i) { - new rgBinding[Function]= {-1, -1}; - ArrayPushArray(irgBindings, rgBinding); - } + new Array:irgBindings = ArrayCreate(Function, _:CW_Binding); + for (new i = 0; i < _:CW_Binding; ++i) { + new rgBinding[Function]= {-1, -1}; + ArrayPushArray(irgBindings, rgBinding); + } - SetData(iHandler, CW_Data_Bindings, irgBindings); + SetData(iHandler, CW_Data_Bindings, irgBindings); } DestroyBindings(CW:iHandler) { - new Array:irgBindings = GetData(iHandler, CW_Data_Bindings); - ArrayDestroy(irgBindings); + new Array:irgBindings = GetData(iHandler, CW_Data_Bindings); + ArrayDestroy(irgBindings); } Bind(CW:iHandler, iBinding, iPluginId, iFunctionid) { - new rgBinding[Function]; - rgBinding[Function_PluginId] = iPluginId; - rgBinding[Function_FunctionId] = iFunctionid; + new rgBinding[Function]; + rgBinding[Function_PluginId] = iPluginId; + rgBinding[Function_FunctionId] = iFunctionid; - new Array:irgBindings = GetData(iHandler, CW_Data_Bindings); - ArraySetArray(irgBindings, iBinding, rgBinding); + new Array:irgBindings = GetData(iHandler, CW_Data_Bindings); + ArraySetArray(irgBindings, iBinding, rgBinding); } GetBinding(CW:iHandler, CW_Binding:iBinding, &iPluginId, &iFunctionId) { - new Array:iszBindings = GetData(iHandler, CW_Data_Bindings); + new Array:iszBindings = GetData(iHandler, CW_Data_Bindings); - static rgBinding[Function]; - ArrayGetArray(iszBindings, _:iBinding, rgBinding, sizeof(rgBinding)); + static rgBinding[Function]; + ArrayGetArray(iszBindings, _:iBinding, rgBinding, sizeof(rgBinding)); - if (rgBinding[Function_PluginId] == -1) { - return false; - } + if (rgBinding[Function_PluginId] == -1) { + return false; + } - if (rgBinding[Function_FunctionId] == -1) { - return false; - } + if (rgBinding[Function_FunctionId] == -1) { + return false; + } - iPluginId = rgBinding[Function_PluginId]; - iFunctionId = rgBinding[Function_FunctionId]; + iPluginId = rgBinding[Function_PluginId]; + iFunctionId = rgBinding[Function_FunctionId]; - return true; + return true; } any:ExecuteBindedFunction(CW_Binding:iBinding, this, any:...) { - new CW:iHandler = GetHandlerByEntity(this); - - new iPluginId, iFunctionId; - if (!GetBinding(iHandler, iBinding, iPluginId, iFunctionId)) { - return PLUGIN_CONTINUE; - } + new CW:iHandler = GetHandlerByEntity(this); - if (callfunc_begin_i(iFunctionId, iPluginId) == 1) { - callfunc_push_int(this); - - if (iBinding == CWB_WeaponBoxModelUpdate) { - new pWeaponBox = getarg(2); - callfunc_push_int(pWeaponBox); + new iPluginId, iFunctionId; + if (!GetBinding(iHandler, iBinding, iPluginId, iFunctionId)) { + return PLUGIN_CONTINUE; } - return callfunc_end(); - } - - return PLUGIN_CONTINUE; + if (callfunc_begin_i(iFunctionId, iPluginId) == 1) { + callfunc_push_int(this); + + if (iBinding == CWB_WeaponBoxModelUpdate) { + new pWeaponBox = getarg(2); + callfunc_push_int(pWeaponBox); + } + + return callfunc_end(); + } + + return PLUGIN_CONTINUE; } // ANCHOR: Weapon hooks InitWeaponHooks() { - for (new CW:iHandler = CW:0; _:iHandler < g_iWeaponCount; ++iHandler) { - new iWeaponId = GetData(iHandler, CW_Data_Id); - if (!g_bWeaponHooks[iWeaponId]) { - RegisterWeaponHooks(iWeaponId); + for (new CW:iHandler = CW:0; _:iHandler < g_iWeaponCount; ++iHandler) { + new iWeaponId = GetData(iHandler, CW_Data_Id); + if (!g_bWeaponHooks[iWeaponId]) { + RegisterWeaponHooks(iWeaponId); + } } - } } RegisterWeaponHooks(iWeaponId) { @@ -1809,17 +1896,17 @@ SparkShower(const Float:vecOrigin[3], const Float:vecAngles[3], iOwner) { GrenadeExplosion(const Float:vecOrigin[3], Float:flDamage) { new iModelIndex = PointContents(vecOrigin) != CONTENTS_WATER - ? engfunc(EngFunc_ModelIndex, "sprites/zerogxplode.spr") - : engfunc(EngFunc_ModelIndex, "sprites/WXplo1.spr"); + ? engfunc(EngFunc_ModelIndex, "sprites/zerogxplode.spr") + : engfunc(EngFunc_ModelIndex, "sprites/WXplo1.spr"); new iScale = floatround((flDamage - 50.0) * 0.60); if (iScale < 8) { - iScale = 8; + iScale = 8; } if (iScale > 255) { - iScale = 255; + iScale = 255; } engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecOrigin, 0); @@ -1835,115 +1922,115 @@ GrenadeExplosion(const Float:vecOrigin[3], Float:flDamage) { } GrenadeSmoke(pGrenade) { - static Float:vecOrigin[3]; - pev(pGrenade, pev_origin, vecOrigin); + static Float:vecOrigin[3]; + pev(pGrenade, pev_origin, vecOrigin); - static Float:flDamage; - pev(pGrenade, pev_dmg, flDamage); + static Float:flDamage; + pev(pGrenade, pev_dmg, flDamage); - if (PointContents(vecOrigin) == CONTENTS_WATER) { - static Float:vecSize[3] = {64.0, 64.0, 64.0}; + if (PointContents(vecOrigin) == CONTENTS_WATER) { + static Float:vecSize[3] = {64.0, 64.0, 64.0}; - static Float:vecMins[3]; - xs_vec_sub(vecOrigin, vecSize, vecMins); + static Float:vecMins[3]; + xs_vec_sub(vecOrigin, vecSize, vecMins); - static Float:vecMaxs[3]; - xs_vec_add(vecOrigin, vecSize, vecMaxs); + static Float:vecMaxs[3]; + xs_vec_add(vecOrigin, vecSize, vecMaxs); - Bubbles(vecMins, vecMaxs, 100); - } else { - new iModelIndex = engfunc(EngFunc_ModelIndex, "sprites/steam1.spr"); + Bubbles(vecMins, vecMaxs, 100); + } else { + new iModelIndex = engfunc(EngFunc_ModelIndex, "sprites/steam1.spr"); - new Float:flRadius = (flDamage - 50.0) * 0.80; - if (flRadius < 8.0) { - flRadius = 9.0; + new Float:flRadius = (flDamage - 50.0) * 0.80; + if (flRadius < 8.0) { + flRadius = 9.0; + } + + engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecOrigin, 0); + write_byte(TE_SMOKE); + engfunc(EngFunc_WriteCoord, vecOrigin[0]); + engfunc(EngFunc_WriteCoord, vecOrigin[1]); + engfunc(EngFunc_WriteCoord, vecOrigin[2]); + write_short(iModelIndex); + write_byte(floatround(flRadius)); // scale * 10 + write_byte(12); // framerate + message_end(); } - - engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecOrigin, 0); - write_byte(TE_SMOKE); - engfunc(EngFunc_WriteCoord, vecOrigin[0]); - engfunc(EngFunc_WriteCoord, vecOrigin[1]); - engfunc(EngFunc_WriteCoord, vecOrigin[2]); - write_short(iModelIndex); - write_byte(floatround(flRadius)); // scale * 10 - write_byte(12); // framerate - message_end(); - } } Bubbles(const Float:vecMins[3], const Float:vecMaxs[3], iCount) { - static Float:vecMid[3]; - for (new i = 0; i < 3; ++i) { - vecMid[i] = (vecMins[i] + vecMaxs[i]) * 0.5; - } - - new Float:flHeight = WaterLevel(vecMid, vecMid[2], vecMid[2] + 1024.0) - vecMins[2]; - new iModelIndex = engfunc(EngFunc_ModelIndex, "sprites/bubble.spr"); - - engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecMid, 0); - write_byte(TE_BUBBLES); - engfunc(EngFunc_WriteCoord, vecMins[0]); - engfunc(EngFunc_WriteCoord, vecMins[1]); - engfunc(EngFunc_WriteCoord, vecMins[2]); - engfunc(EngFunc_WriteCoord, vecMaxs[0]); - engfunc(EngFunc_WriteCoord, vecMaxs[1]); - engfunc(EngFunc_WriteCoord, vecMaxs[2]); - engfunc(EngFunc_WriteCoord, flHeight); // height - write_short(iModelIndex); - write_byte(iCount); // count - write_coord(8); // speed - message_end(); + static Float:vecMid[3]; + for (new i = 0; i < 3; ++i) { + vecMid[i] = (vecMins[i] + vecMaxs[i]) * 0.5; + } + + new Float:flHeight = WaterLevel(vecMid, vecMid[2], vecMid[2] + 1024.0) - vecMins[2]; + new iModelIndex = engfunc(EngFunc_ModelIndex, "sprites/bubble.spr"); + + engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecMid, 0); + write_byte(TE_BUBBLES); + engfunc(EngFunc_WriteCoord, vecMins[0]); + engfunc(EngFunc_WriteCoord, vecMins[1]); + engfunc(EngFunc_WriteCoord, vecMins[2]); + engfunc(EngFunc_WriteCoord, vecMaxs[0]); + engfunc(EngFunc_WriteCoord, vecMaxs[1]); + engfunc(EngFunc_WriteCoord, vecMaxs[2]); + engfunc(EngFunc_WriteCoord, flHeight); // height + write_short(iModelIndex); + write_byte(iCount); // count + write_coord(8); // speed + message_end(); } DecalTrace(pTr, iDecal) { - if (iDecal < 0) { - return; - } - - new Float:flFraction; - get_tr2(pTr, TR_flFraction, flFraction); - - if (flFraction == 1.0) { - return; - } - - // Only decal BSP models - new pHit = get_tr2(pTr, TR_pHit); - if (pHit != -1) { - if (pHit && !ExecuteHam(Ham_IsBSPModel, pHit)) { - return; - } - } else { - pHit = 0; - } - - new iMessage = TE_DECAL; - if (pHit != 0) { - if (iDecal > 255) { - iMessage = TE_DECALHIGH; - iDecal -= 256; - } - } else { - iMessage = TE_WORLDDECAL; - if (iDecal > 255) { - iMessage = TE_WORLDDECALHIGH; - iDecal -= 256; - } - } - - static Float:vecEndPos[3]; - get_tr2(pTr, TR_vecEndPos, vecEndPos); - - engfunc(EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, vecEndPos, 0); - write_byte(iMessage); - engfunc(EngFunc_WriteCoord, vecEndPos[0]); - engfunc(EngFunc_WriteCoord, vecEndPos[1]); - engfunc(EngFunc_WriteCoord, vecEndPos[2]); - write_byte(iDecal); - if (pHit) { - write_short(pHit); - } - message_end(); + if (iDecal < 0) { + return; + } + + new Float:flFraction; + get_tr2(pTr, TR_flFraction, flFraction); + + if (flFraction == 1.0) { + return; + } + + // Only decal BSP models + new pHit = get_tr2(pTr, TR_pHit); + if (pHit != -1) { + if (pHit && !ExecuteHam(Ham_IsBSPModel, pHit)) { + return; + } + } else { + pHit = 0; + } + + new iMessage = TE_DECAL; + if (pHit != 0) { + if (iDecal > 255) { + iMessage = TE_DECALHIGH; + iDecal -= 256; + } + } else { + iMessage = TE_WORLDDECAL; + if (iDecal > 255) { + iMessage = TE_WORLDDECALHIGH; + iDecal -= 256; + } + } + + static Float:vecEndPos[3]; + get_tr2(pTr, TR_vecEndPos, vecEndPos); + + engfunc(EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, vecEndPos, 0); + write_byte(iMessage); + engfunc(EngFunc_WriteCoord, vecEndPos[0]); + engfunc(EngFunc_WriteCoord, vecEndPos[1]); + engfunc(EngFunc_WriteCoord, vecEndPos[2]); + write_byte(iDecal); + if (pHit) { + write_short(pHit); + } + message_end(); } BulletSmoke(pTr) { @@ -1957,7 +2044,7 @@ BulletSmoke(pTr) { static iModelIndex; if (!iModelIndex) { - iModelIndex = engfunc(EngFunc_ModelIndex, WALL_PUFF_SPRITE); + iModelIndex = engfunc(EngFunc_ModelIndex, WALL_PUFF_SPRITE); } engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecEnd, 0); @@ -1973,161 +2060,161 @@ BulletSmoke(pTr) { } MakeDecal(pTr, pEntity, iDecalIndex, bool:bGunshotDecal = true) { - static vecOrigin[3]; - get_tr2(pTr, TR_vecEndPos, vecOrigin); - - new pHit; - get_tr2(pTr, TR_pHit, pHit); - - if(pHit) { - emessage_begin(MSG_BROADCAST, SVC_TEMPENTITY); - ewrite_byte(TE_DECAL); - engfunc(EngFunc_WriteCoord, vecOrigin[0]); - engfunc(EngFunc_WriteCoord, vecOrigin[1]); - engfunc(EngFunc_WriteCoord, vecOrigin[2]); - ewrite_byte(iDecalIndex); - ewrite_short(pHit); - emessage_end(); - } else { - emessage_begin(MSG_BROADCAST, SVC_TEMPENTITY); - ewrite_byte(TE_WORLDDECAL); - engfunc(EngFunc_WriteCoord, vecOrigin[0]); - engfunc(EngFunc_WriteCoord, vecOrigin[1]); - engfunc(EngFunc_WriteCoord, vecOrigin[2]); - ewrite_byte(iDecalIndex); - emessage_end(); - } + static vecOrigin[3]; + get_tr2(pTr, TR_vecEndPos, vecOrigin); + + new pHit; + get_tr2(pTr, TR_pHit, pHit); + + if(pHit) { + emessage_begin(MSG_BROADCAST, SVC_TEMPENTITY); + ewrite_byte(TE_DECAL); + engfunc(EngFunc_WriteCoord, vecOrigin[0]); + engfunc(EngFunc_WriteCoord, vecOrigin[1]); + engfunc(EngFunc_WriteCoord, vecOrigin[2]); + ewrite_byte(iDecalIndex); + ewrite_short(pHit); + emessage_end(); + } else { + emessage_begin(MSG_BROADCAST, SVC_TEMPENTITY); + ewrite_byte(TE_WORLDDECAL); + engfunc(EngFunc_WriteCoord, vecOrigin[0]); + engfunc(EngFunc_WriteCoord, vecOrigin[1]); + engfunc(EngFunc_WriteCoord, vecOrigin[2]); + ewrite_byte(iDecalIndex); + emessage_end(); + } - if (bGunshotDecal) { - message_begin(MSG_BROADCAST, SVC_TEMPENTITY); - write_byte(TE_GUNSHOTDECAL); - engfunc(EngFunc_WriteCoord, vecOrigin[0]); - engfunc(EngFunc_WriteCoord, vecOrigin[1]); - engfunc(EngFunc_WriteCoord, vecOrigin[2]); - write_short(pEntity); - write_byte(iDecalIndex); - message_end(); - } + if (bGunshotDecal) { + message_begin(MSG_BROADCAST, SVC_TEMPENTITY); + write_byte(TE_GUNSHOTDECAL); + engfunc(EngFunc_WriteCoord, vecOrigin[0]); + engfunc(EngFunc_WriteCoord, vecOrigin[1]); + engfunc(EngFunc_WriteCoord, vecOrigin[2]); + write_short(pEntity); + write_byte(iDecalIndex); + message_end(); + } } BubbleTrail(const Float:from[3], const Float:to[3], count) { - new Float:flHeight = WaterLevel(from, from[2], from[2] + 256); - flHeight = flHeight - from[2]; + new Float:flHeight = WaterLevel(from, from[2], from[2] + 256); + flHeight = flHeight - from[2]; - if (flHeight < 8) { - flHeight = WaterLevel(to, to[2], to[2] + 256.0); - flHeight = flHeight - to[2]; if (flHeight < 8) { - return; - } + flHeight = WaterLevel(to, to[2], to[2] + 256.0); + flHeight = flHeight - to[2]; + if (flHeight < 8) { + return; + } - // UNDONE: do a ploink sound - flHeight = flHeight + to[2] - from[2]; - } + // UNDONE: do a ploink sound + flHeight = flHeight + to[2] - from[2]; + } - if (count > 255) { - count = 255; - } + if (count > 255) { + count = 255; + } - static g_sModelIndexBubbles; - if (!g_sModelIndexBubbles) { - g_sModelIndexBubbles = engfunc(EngFunc_ModelIndex, "sprites/bubble.spr"); - } + static g_sModelIndexBubbles; + if (!g_sModelIndexBubbles) { + g_sModelIndexBubbles = engfunc(EngFunc_ModelIndex, "sprites/bubble.spr"); + } - engfunc(EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, from, 0); - write_byte(TE_BUBBLETRAIL); - engfunc(EngFunc_WriteCoord, from[0]); - engfunc(EngFunc_WriteCoord, from[1]); - engfunc(EngFunc_WriteCoord, from[2]); - engfunc(EngFunc_WriteCoord, to[0]); - engfunc(EngFunc_WriteCoord, to[1]); - engfunc(EngFunc_WriteCoord, to[2]); - engfunc(EngFunc_WriteCoord, flHeight); - write_short(g_sModelIndexBubbles); - write_byte(count); - write_coord(8); - message_end(); + engfunc(EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, from, 0); + write_byte(TE_BUBBLETRAIL); + engfunc(EngFunc_WriteCoord, from[0]); + engfunc(EngFunc_WriteCoord, from[1]); + engfunc(EngFunc_WriteCoord, from[2]); + engfunc(EngFunc_WriteCoord, to[0]); + engfunc(EngFunc_WriteCoord, to[1]); + engfunc(EngFunc_WriteCoord, to[2]); + engfunc(EngFunc_WriteCoord, flHeight); + write_short(g_sModelIndexBubbles); + write_byte(count); + write_coord(8); + message_end(); } ExplosionDecalTrace(pTr) { switch (random(3)) { case 0: { - DecalTrace(pTr, engfunc(EngFunc_DecalIndex, "{scorch1")); + DecalTrace(pTr, engfunc(EngFunc_DecalIndex, "{scorch1")); } case 1: { - DecalTrace(pTr, engfunc(EngFunc_DecalIndex, "{scorch2")); + DecalTrace(pTr, engfunc(EngFunc_DecalIndex, "{scorch2")); } case 2: { - DecalTrace(pTr, engfunc(EngFunc_DecalIndex, "{scorch3")); + DecalTrace(pTr, engfunc(EngFunc_DecalIndex, "{scorch3")); } } } DebrisSound(pEntity) { - switch (random(3)) { - case 0: { - emit_sound(pEntity, CHAN_VOICE, "weapons/debris1.wav", 0.55, ATTN_NORM, 0, PITCH_NORM); - } - case 1: { - emit_sound(pEntity, CHAN_VOICE, "weapons/debris2.wav", 0.55, ATTN_NORM, 0, PITCH_NORM); - } - case 2: { - emit_sound(pEntity, CHAN_VOICE, "weapons/debris3.wav", 0.55, ATTN_NORM, 0, PITCH_NORM); - } - } + switch (random(3)) { + case 0: { + emit_sound(pEntity, CHAN_VOICE, "weapons/debris1.wav", 0.55, ATTN_NORM, 0, PITCH_NORM); + } + case 1: { + emit_sound(pEntity, CHAN_VOICE, "weapons/debris2.wav", 0.55, ATTN_NORM, 0, PITCH_NORM); + } + case 2: { + emit_sound(pEntity, CHAN_VOICE, "weapons/debris3.wav", 0.55, ATTN_NORM, 0, PITCH_NORM); + } + } } bool:EjectWeaponBrass(this, iModelIndex, iSoundType) { - new pPlayer = GetPlayer(this); + new pPlayer = GetPlayer(this); - if (!iModelIndex) { - return false; - } - - static Float:vecViewOfs[3]; - pev(pPlayer, pev_view_ofs, vecViewOfs); - - static Float:vecAngles[3]; - pev(pPlayer, pev_angles, vecAngles); - - static Float:vecUp[3]; - angle_vector(vecAngles, ANGLEVECTOR_UP, vecUp); - - static Float:vecForward[3]; - angle_vector(vecAngles, ANGLEVECTOR_FORWARD, vecForward); - - static Float:vecRight[3]; - angle_vector(vecAngles, ANGLEVECTOR_RIGHT, vecRight); - - static Float:vecOrigin[3]; - pev(pPlayer, pev_origin, vecOrigin); - - for (new i = 0; i < 3; ++i) { - vecOrigin[i] = vecOrigin[i] + vecViewOfs[i] + (vecUp[i] * -9.0) + (vecForward[i] * 16.0); - } - - static Float:vecVelocity[3]; - pev(pPlayer, pev_velocity, vecVelocity); - - for (new i = 0; i < 3; ++i) { - vecVelocity[i] = vecVelocity[i] + (vecRight[i] * random_float(50.0, 70.0)) + (vecUp[i] * random_float(100.0, 150.0)) + (vecForward[i] * 25.0); - } - - engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, vecOrigin, 0); - write_byte(TE_MODEL); - engfunc(EngFunc_WriteCoord, vecOrigin[0]); - engfunc(EngFunc_WriteCoord, vecOrigin[1]); - engfunc(EngFunc_WriteCoord, vecOrigin[2]); - engfunc(EngFunc_WriteCoord, vecVelocity[0]); - engfunc(EngFunc_WriteCoord, vecVelocity[1]); - engfunc(EngFunc_WriteCoord, vecVelocity[2]); - write_angle(floatround(vecAngles[1])); - write_short(iModelIndex); - write_byte(iSoundType); - write_byte(25); - message_end(); - - return true; + if (!iModelIndex) { + return false; + } + + static Float:vecViewOfs[3]; + pev(pPlayer, pev_view_ofs, vecViewOfs); + + static Float:vecAngles[3]; + pev(pPlayer, pev_angles, vecAngles); + + static Float:vecUp[3]; + angle_vector(vecAngles, ANGLEVECTOR_UP, vecUp); + + static Float:vecForward[3]; + angle_vector(vecAngles, ANGLEVECTOR_FORWARD, vecForward); + + static Float:vecRight[3]; + angle_vector(vecAngles, ANGLEVECTOR_RIGHT, vecRight); + + static Float:vecOrigin[3]; + pev(pPlayer, pev_origin, vecOrigin); + + for (new i = 0; i < 3; ++i) { + vecOrigin[i] = vecOrigin[i] + vecViewOfs[i] + (vecUp[i] * -9.0) + (vecForward[i] * 16.0); + } + + static Float:vecVelocity[3]; + pev(pPlayer, pev_velocity, vecVelocity); + + for (new i = 0; i < 3; ++i) { + vecVelocity[i] = vecVelocity[i] + (vecRight[i] * random_float(50.0, 70.0)) + (vecUp[i] * random_float(100.0, 150.0)) + (vecForward[i] * 25.0); + } + + engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, vecOrigin, 0); + write_byte(TE_MODEL); + engfunc(EngFunc_WriteCoord, vecOrigin[0]); + engfunc(EngFunc_WriteCoord, vecOrigin[1]); + engfunc(EngFunc_WriteCoord, vecOrigin[2]); + engfunc(EngFunc_WriteCoord, vecVelocity[0]); + engfunc(EngFunc_WriteCoord, vecVelocity[1]); + engfunc(EngFunc_WriteCoord, vecVelocity[2]); + write_angle(floatround(vecAngles[1])); + write_short(iModelIndex); + write_byte(iSoundType); + write_byte(25); + message_end(); + + return true; } // ANCHOR: Random @@ -2152,94 +2239,67 @@ new const seed_table[256] = { }; Float:SharedRandomFloat(seed, Float:low, Float:high) { - new Float:range = high - low; - if (!range) { - return low; - } + new Float:range = high - low; + if (!range) { + return low; + } - new glSeed = U_Srand(seed + floatround(low) + floatround(high)); - U_Random(glSeed); - U_Random(glSeed); + new glSeed = U_Srand(seed + floatround(low) + floatround(high)); + U_Random(glSeed); + U_Random(glSeed); - new tensixrand = U_Random(glSeed) & 65535; - new Float:offset = float(tensixrand) / 65536.0; + new tensixrand = U_Random(glSeed) & 65535; + new Float:offset = float(tensixrand) / 65536.0; - return (low + offset * range ); + return (low + offset * range ); } -U_Random(&glSeed) { - glSeed *= 69069; - glSeed += seed_table[glSeed & 0xff]; +U_Random(&glSeed) { + glSeed *= 69069; + glSeed += seed_table[glSeed & 0xff]; - return (++glSeed & 0x0fffffff); + return (++glSeed & 0x0fffffff); } U_Srand(seed) { - return seed_table[seed & 0xff]; + return seed_table[seed & 0xff]; } // FireEvent(tr, const szSnd[], const szShellModel[]) { -// static Float:flFraction; -// get_tr2(tr, TR_flFraction, flFraction); +// static Float:flFraction; +// get_tr2(tr, TR_flFraction, flFraction); -// new pHit = get_tr2(tr, TR_pHit); +// new pHit = get_tr2(tr, TR_pHit); -// if (flFraction != 1.0) { -// // Native_PlaySoundAtPosition( $origin = $trace_endpos, $sound = weapons/bullet_hit1.wav ); +// if (flFraction != 1.0) { +// // Native_PlaySoundAtPosition( $origin = $trace_endpos, $sound = weapons/bullet_hit1.wav ); // // Native_ImpactParticles( $origin = $trace_endpos ); // // Native_PlaceDecal( $origin = $trace_endpos, $decal = "{shot2", $trace_entity ); -// new iDecalIndex = random_num(get_decal_index("{shot1"), get_decal_index("{shot5") + 1); -// MakeDecal(tr, pHit, iDecalIndex); -// } +// new iDecalIndex = random_num(get_decal_index("{shot1"), get_decal_index("{shot5") + 1); +// MakeDecal(tr, pHit, iDecalIndex); +// } // } // BeamPoints(const Float:vecStart[3], const Float:vecEnd[3], const color[3]) { -// message_begin(MSG_BROADCAST ,SVC_TEMPENTITY); -// write_byte(TE_BEAMPOINTS); -// write_coord(floatround(vecStart[0])); // start position -// write_coord(floatround(vecStart[1])); -// write_coord(floatround(vecStart[2])); -// write_coord(floatround(vecEnd[0])); // end position -// write_coord(floatround(vecEnd[1])); -// write_coord(floatround(vecEnd[2])); -// write_short(engfunc(EngFunc_ModelIndex, "sprites/laserbeam.spr")); // sprite index -// write_byte(0); // starting frame -// write_byte(10); // frame rate in 0.1's -// write_byte(30); // life in 0.1's -// write_byte(2); // line width in 0.1's -// write_byte(1); // noise amplitude in 0.01's -// write_byte(color[0]); // Red -// write_byte(color[1]); // Green -// write_byte(color[2]); // Blue -// write_byte(127); // brightness -// write_byte(10); // scroll speed in 0.1's -// message_end(); -// } - -// GunshotDecalTrace(pTrace, iDecalIndex) { -// if (iDecalIndex < 0) { -// return; -// } - -// static Float:vecEndPos[3]; -// get_tr2(pTrace, TR_vecEndPos, vecEndPos); - -// new Float:flFraction; -// get_tr2(pTrace, TR_flFraction, flFraction); - -// if (flFraction == 1.0) { -// return; -// } - -// new pHit = get_tr2(pTrace, TR_pHit); - -// engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecEndPos, 0); -// write_byte(TE_GUNSHOTDECAL); -// engfunc(EngFunc_WriteCoord, vecEndPos[0]); -// engfunc(EngFunc_WriteCoord, vecEndPos[1]); -// engfunc(EngFunc_WriteCoord, vecEndPos[2]); -// write_short(pHit); -// write_byte(iDecalIndex); -// message_end(); +// message_begin(MSG_BROADCAST ,SVC_TEMPENTITY); +// write_byte(TE_BEAMPOINTS); +// write_coord(floatround(vecStart[0])); // start position +// write_coord(floatround(vecStart[1])); +// write_coord(floatround(vecStart[2])); +// write_coord(floatround(vecEnd[0])); // end position +// write_coord(floatround(vecEnd[1])); +// write_coord(floatround(vecEnd[2])); +// write_short(engfunc(EngFunc_ModelIndex, "sprites/laserbeam.spr")); // sprite index +// write_byte(0); // starting frame +// write_byte(10); // frame rate in 0.1's +// write_byte(30); // life in 0.1's +// write_byte(2); // line width in 0.1's +// write_byte(1); // noise amplitude in 0.01's +// write_byte(color[0]); // Red +// write_byte(color[1]); // Green +// write_byte(color[2]); // Blue +// write_byte(127); // brightness +// write_byte(10); // scroll speed in 0.1's +// message_end(); // } diff --git a/src/scripts/core/zombiepanic.sma b/src/scripts/core/zombiepanic.sma index dd133fb..e866279 100644 --- a/src/scripts/core/zombiepanic.sma +++ b/src/scripts/core/zombiepanic.sma @@ -2,16 +2,22 @@ #include #include +#include #include #define PLUGIN "Zombie Panic" #define AUTHOR "Hedgehog Fog" -new g_fwConfigLoaded; -new g_fwResult; +new g_pFwConfigLoaded; +new g_pFwResult; + +new g_pCvarVersion; public plugin_precache() { + g_pCvarVersion = register_cvar("zombiepanic_version", ZP_VERSION); + hook_cvar_change(g_pCvarVersion, "OnVersionCvarChange"); + for (new i = 0; i < sizeof(ZP_HUD_SPRITES); ++i) { precache_generic(ZP_HUD_SPRITES[i]); } @@ -19,13 +25,18 @@ public plugin_precache() { public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + register_forward(FM_GetGameDescription, "OnGetGameDescription"); + register_cvar("mp_flashlight", "1"); register_cvar("mp_freezetime", "10"); register_cvar("mp_scoreboard_showmoney", "0"); register_cvar("mp_scoreboard_showhealth", "0"); register_cvar("mp_scoreboard_showdefkit", "0"); + register_cvar("mp_autoteambalance", "0"); + register_cvar("mp_forcecamera", "1"); - g_fwConfigLoaded = CreateMultiForward("Zp_Fw_ConfigLoaded", ET_IGNORE); + g_pFwConfigLoaded = CreateMultiForward("Zp_Fw_ConfigLoaded", ET_IGNORE); } public plugin_natives() { @@ -33,15 +44,23 @@ public plugin_natives() { } public plugin_cfg() { - LoadConfig(); -} - -LoadConfig() { new szConfigDir[32]; get_configsdir(szConfigDir, charsmax(szConfigDir)); server_cmd("exec %s/zombiepanic.cfg", szConfigDir); server_exec(); - ExecuteForward(g_fwConfigLoaded, g_fwResult); + ExecuteForward(g_pFwConfigLoaded, g_pFwResult); +} + +public OnVersionCvarChange() { + set_pcvar_string(g_pCvarVersion, ZP_VERSION); +} + +public OnGetGameDescription() { + static szGameName[32]; + format(szGameName, charsmax(szGameName), "%s %s", ZP_TITLE, ZP_VERSION); + forward_return(FMV_STRING, szGameName); + + return FMRES_SUPERCEDE; } diff --git a/src/scripts/core/zp_ammo.sma b/src/scripts/core/zp_ammo.sma index 7ed5247..95c25fb 100644 --- a/src/scripts/core/zp_ammo.sma +++ b/src/scripts/core/zp_ammo.sma @@ -13,7 +13,8 @@ enum AmmoData { Ammo_Id, Ammo_PackSize, Ammo_PackModel, - Ammo_MaxAmount + Ammo_MaxAmount, + Ammo_Weight } new Array:g_rgAmmo[AmmoData]; @@ -22,13 +23,14 @@ new g_rgAmmoMap[15] = { -1, ... }; new g_iAmmoCount = 0; public plugin_precache() { - InitStorage(); - RegisterAmmo(ZP_AMMO_PISTOL, 10, 7, ZP_AMMO_PISTOL_MODEL, 70); - RegisterAmmo(ZP_AMMO_RIFLE, 4, 30, ZP_AMMO_RIFLE_MODEL, 240); - RegisterAmmo(ZP_AMMO_SHOTGUN, 5, 6, ZP_AMMO_SHOTGUN_MODEL, 60); - RegisterAmmo(ZP_AMMO_MAGNUM, 1, 6, ZP_AMMO_MAGNUM_MODEL, 36); - RegisterAmmo(ZP_AMMO_SATCHEL, 14, -1, "", 3); - RegisterAmmo(ZP_AMMO_GRENADE, 12, -1, "", 3); + InitStorages(); + + RegisterAmmo(ZP_AMMO_PISTOL, 10, 7, ZP_AMMO_PISTOL_MODEL, 70, ZP_WEIGHT_PISTOL_AMMO); + RegisterAmmo(ZP_AMMO_RIFLE, 4, 30, ZP_AMMO_RIFLE_MODEL, 240, ZP_WEIGHT_RIFLE_AMMO); + RegisterAmmo(ZP_AMMO_SHOTGUN, 5, 6, ZP_AMMO_SHOTGUN_MODEL, 60, ZP_WEIGHT_SHOTGUN_AMMO); + RegisterAmmo(ZP_AMMO_MAGNUM, 1, 6, ZP_AMMO_MAGNUM_MODEL, 36, ZP_WEIGHT_MAGNUM_AMMO); + RegisterAmmo(ZP_AMMO_SATCHEL, 14, -1, NULL_STRING, 1, ZP_WEIGHT_SATCHEL); + RegisterAmmo(ZP_AMMO_GRENADE, 12, -1, NULL_STRING, 1, ZP_WEIGHT_GRENADE); } public plugin_init() { @@ -44,18 +46,11 @@ public plugin_natives() { register_native("ZP_Ammo_GetPackModel", "Native_GetPackModel"); register_native("ZP_Ammo_GetCount", "Native_GetCount"); register_native("ZP_Ammo_GetMaxAmount", "Native_GetMaxAmount"); + register_native("ZP_Ammo_GetWeight", "Native_GetWeight"); } public plugin_end() { - for (new i = 0; i < _:AmmoData; ++i) { - new Array:irgData = Array:g_rgAmmo[AmmoData:i]; - - if (irgData != Invalid_Array) { - ArrayDestroy(irgData); - } - } - - TrieDestroy(g_iAmmoMap); + DestroyStorages(); } public Native_GetHandler(iPluginId, iArgc) { @@ -118,25 +113,28 @@ public Native_GetMaxAmount(iPluginId, iArgc) { return ArrayGetCell(Array:g_rgAmmo[Ammo_MaxAmount], iHandler); } -InitStorage() { - g_rgAmmo[Ammo_Name] = ArrayCreate(32, 1); - g_rgAmmo[Ammo_Id] = ArrayCreate(1, 1); - g_rgAmmo[Ammo_PackSize] = ArrayCreate(1, 1); - g_rgAmmo[Ammo_PackModel] = ArrayCreate(64, 1); - g_rgAmmo[Ammo_MaxAmount] = ArrayCreate(1, 1); - g_iAmmoMap = TrieCreate(); +public Float:Native_GetWeight(iPluginId, iArgc) { + new iHandler = get_param(1); + + return ArrayGetCell(Array:g_rgAmmo[Ammo_Weight], iHandler); } -RegisterAmmo(const szName[], iAmmoId, iPackSize, const szModel[], iMaxAmount) { +RegisterAmmo(const szName[], iAmmoId, iPackSize, const szModel[], iMaxAmount, Float:flWeight) { if (szModel[0] != '^0') { precache_model(szModel); } + if (TrieKeyExists(g_iAmmoMap, szName)) { + log_amx("Cannot register ^"%s^" ammo. Ammo ^"%s^" is already registered!", szName, szName); + return; + } + ArrayPushCell(Array:g_rgAmmo[Ammo_Id], iAmmoId); ArrayPushString(Array:g_rgAmmo[Ammo_Name], szName); ArrayPushCell(Array:g_rgAmmo[Ammo_PackSize], iPackSize); ArrayPushString(Array:g_rgAmmo[Ammo_PackModel], szModel); ArrayPushCell(Array:g_rgAmmo[Ammo_MaxAmount], iMaxAmount); + ArrayPushCell(Array:g_rgAmmo[Ammo_Weight], flWeight); TrieSetCell(g_iAmmoMap, szName, g_iAmmoCount); g_rgAmmoMap[iAmmoId] = g_iAmmoCount; @@ -146,3 +144,25 @@ RegisterAmmo(const szName[], iAmmoId, iPackSize, const szModel[], iMaxAmount) { GetHandlerById(iAmmoId) { return g_rgAmmoMap[iAmmoId]; } + +InitStorages() { + g_rgAmmo[Ammo_Name] = ArrayCreate(32, 1); + g_rgAmmo[Ammo_Id] = ArrayCreate(1, 1); + g_rgAmmo[Ammo_PackSize] = ArrayCreate(1, 1); + g_rgAmmo[Ammo_PackModel] = ArrayCreate(64, 1); + g_rgAmmo[Ammo_MaxAmount] = ArrayCreate(1, 1); + g_rgAmmo[Ammo_Weight] = ArrayCreate(1, 1); + g_iAmmoMap = TrieCreate(); +} + +DestroyStorages() { + for (new i = 0; i < _:AmmoData; ++i) { + new Array:irgData = Array:g_rgAmmo[AmmoData:i]; + + if (irgData != Invalid_Array) { + ArrayDestroy(irgData); + } + } + + TrieDestroy(g_iAmmoMap); +} diff --git a/src/scripts/core/zp_bot_fixes.sma b/src/scripts/core/zp_bot_fixes.sma deleted file mode 100644 index 3d44a2b..0000000 --- a/src/scripts/core/zp_bot_fixes.sma +++ /dev/null @@ -1,60 +0,0 @@ -#pragma semicolon 1 - -#include -#include - -#include -#include - -#define PLUGIN "[Zombie Panic] Bot Fixes" -#define AUTHOR "Hedgehog Fog" - -public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - - register_forward(FM_AddToFullPack, "OnAddToFullPack_Post", 1); -} - -public OnAddToFullPack_Post(es, e, pEntity, pHost, pHostFlags, pPlayer, pSet) { - if (pEntity == pHost) { - return FMRES_IGNORED; - } - - if (!UTIL_IsPlayer(pHost)) { - return FMRES_IGNORED; - } - - if (!is_user_bot(pHost)) { - return FMRES_IGNORED; - } - - static szClassname[32]; - pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); - - if (ZP_Player_IsZombie(pHost)) { - if (equal(szClassname, "weaponbox") || equali(szClassname, "item_", 5)) { - return FMRES_SUPERCEDE; - } - } else { - if (equal(szClassname, "item_healthkit")) { - static Float:flMaxHealth; - pev(pHost, pev_max_health, flMaxHealth); - - static Float:flHealth; - pev(pHost, pev_health, flHealth); - - if (flHealth >= flMaxHealth) { - return FMRES_SUPERCEDE; - } - } else if (equal(szClassname, "item_healthkit")) { - static Float:flArmorValue; - pev(pHost, pev_armorvalue, flArmorValue); - - if (flArmorValue >= 100.0) { - return FMRES_SUPERCEDE; - } - } - } - - return FMRES_IGNORED; -} diff --git a/src/scripts/core/zp_characters.sma b/src/scripts/core/zp_characters.sma index bfc4422..087271e 100644 --- a/src/scripts/core/zp_characters.sma +++ b/src/scripts/core/zp_characters.sma @@ -1,157 +1,342 @@ #pragma semicolon 1 #include +#include #include #include #include +#include #include -#include +#include #define PLUGIN "[Zombie Panic] Characters" #define AUTHOR "Hedgehog Fog" +#define TASKID_AMBIENT 100 + +#define RESERVED_CHARACTER_COUNT 4 +#define RESERVED_SOUND_COUNT 3 #define CHARACTER_KEY "zp_character" +#define DEFAULT_PLAYER_MODEL "models/player/vip/vip.mdl" + +enum CharacterData { + Character_HumanModel, + Character_ZombieModel, + Character_SwipeModel, + Character_HumanDeathSounds, + Character_PanicSounds, + Character_ZombieAmbientSounds, + Character_ZombieDeathSounds +} + +new gmsgClCorpse; -new g_rgszCharacterModels[ZP_CharacterModels][32] = { - "human.mdl", - "zombie.mdl", - "swipe.mdl" -}; +new g_szCharacterDir[MAX_RESOURCE_PATH_LENGTH]; -new g_iPlayerCharacter[MAX_PLAYERS + 1]; +new Array:g_rgCharactersData[CharacterData]; +new Trie:g_iCharactersMap; +new g_iCharacterCount = 0; + +new g_iPlayerCharacter[MAX_PLAYERS + 1] = { -1, ... }; + +new CW:g_iCwSwipeHandler; + +public plugin_precache() { + precache_model(DEFAULT_PLAYER_MODEL); + + get_configsdir(g_szCharacterDir, charsmax(g_szCharacterDir)); + format(g_szCharacterDir, charsmax(g_szCharacterDir), "%s/zombiepanic/characters", g_szCharacterDir); + + InitializeCharactersStore(); + LoadCharacters(); +} public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + gmsgClCorpse = get_user_msgid("ClCorpse"); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); + RegisterHam(Ham_Item_Deploy, "weapon_knife", "OnKnifeDeploy_Post", .Post = 1); + register_forward(FM_SetClientKeyValue, "OnSetClientKeyValue"); + + register_message(gmsgClCorpse, "OnMessage_ClCorpse"); + + g_iCwSwipeHandler = CW_GetHandler(ZP_WEAPON_SWIPE); } -public plugin_natives() { - register_native("ZP_Player_GetCharacter", "Native_GetPlayerCharacter"); - register_native("ZP_GetCharacterModelPath", "Native_GetCharacterModelPath"); - register_native("ZP_GetCharacterModel", "Native_GetCharacterModel"); - register_native("ZP_GetCharacterCount", "Native_GetCharacterCount"); +public plugin_end() { + DestroyCharactersStore(); } -public Native_GetPlayerCharacter(iPluginId, iArgc) { - new pPlayer = get_param(1); +/*--------------------------------[ Forwards ]--------------------------------*/ - return g_iPlayerCharacter[pPlayer]; +public client_connect(pPlayer) { + UpdatePlayerCharacter(pPlayer, true); } -public Native_GetCharacterModelPath(iPluginId, iArgc) { - new iCharacter = get_param(1); - new iLen = get_param(3); - - static szPath[64]; - GetCharacterModelPath(iCharacter, szPath, charsmax(szPath)); +public ZP_Fw_PlayerPanic(pPlayer) { + PlayVoiceFromCharacterData(pPlayer, Character_PanicSounds); +} - set_string(2, szPath, iLen); +public ZP_Fw_PlayerZombieVision(pPlayer) { + PlayAmbient(pPlayer); } -public Native_GetCharacterModel(iPluginId, iArgc) { - new iCharacter = get_param(1); - new ZP_CharacterModels:iModel = ZP_CharacterModels:get_param(2); - new iLen = get_param(4); +/*--------------------------------[ Hooks ]--------------------------------*/ - static szPath[64]; - GetCharacterModel(iCharacter, iModel, szPath, charsmax(szPath)); +public OnPlayerSpawn_Post(pPlayer) { + UpdatePlayerCharacter(pPlayer); + UpdatePlayerModel(pPlayer); + + remove_task(TASKID_AMBIENT + pPlayer); + set_task(0.1, "Task_Ambient", TASKID_AMBIENT + pPlayer); - set_string(3, szPath, iLen); + return HAM_HANDLED; } -public Native_GetCharacterCount(iPluginId, iArgc) { - return sizeof(ZP_CHARACTERS); +public OnPlayerKilled_Post(pPlayer) { + PlayVoiceFromCharacterData(pPlayer, ZP_Player_IsZombie(pPlayer) ? Character_ZombieDeathSounds : Character_HumanDeathSounds); + return HAM_HANDLED; } -public plugin_precache() { - new szBuffer[64]; - for (new iCharacter = 0; iCharacter < sizeof(ZP_CHARACTERS); ++iCharacter) { - for (new ZP_CharacterModels:iModel = ZP_CharacterModels:0; _:iModel < sizeof(g_rgszCharacterModels); ++iModel) { - GetCharacterModel(iCharacter, iModel, szBuffer, charsmax(szBuffer)); - precache_model(szBuffer); +public OnKnifeDeploy_Post(pKnife) { + if (CW_GetHandlerByEntity(pKnife) == g_iCwSwipeHandler) { + new pPlayer = CW_GetPlayer(pKnife); + if (g_iPlayerCharacter[pPlayer] == -1) { + return HAM_IGNORED; + } + + static szModel[64]; + ArrayGetString(Array:g_rgCharactersData[Character_SwipeModel], g_iPlayerCharacter[pPlayer], szModel, charsmax(szModel)); + set_pev(pPlayer, pev_viewmodel2, szModel); } - } + + return HAM_HANDLED; } -public client_connect(pPlayer) { - UpdatePlayerCharacter(pPlayer, true); +public OnSetClientKeyValue(pPlayer, const szInfoBuffer[], const szKey[], const szValue[]) { + if (equal(szKey, "model")) { + UpdatePlayerModel(pPlayer); + return FMRES_SUPERCEDE; + } + + return FMRES_IGNORED; } -public OnPlayerSpawn_Post(pPlayer) { - UpdatePlayerCharacter(pPlayer); - UpdatePlayerModel(pPlayer); +public OnMessage_ClCorpse(iMsgId, iMsgDest, pPlayer) { + new pTargetPlayer = get_msg_arg_int(12); + new iCharacter = g_iPlayerCharacter[pTargetPlayer]; + + static szPlayerModel[MAX_RESOURCE_PATH_LENGTH]; + ArrayGetString(Array:g_rgCharactersData[ZP_Player_IsZombie(pTargetPlayer) ? Character_ZombieModel : Character_HumanModel], iCharacter, szPlayerModel, charsmax(szPlayerModel)); + + set_msg_arg_string(1, szPlayerModel); } -public OnSetClientKeyValue(pPlayer, const szInfoBuffer[], const szKey[], const szValue[]) { - if(equal(szKey, "model")) { - UpdatePlayerModel(pPlayer); - return FMRES_SUPERCEDE; - } +/*--------------------------------[ Tasks ]--------------------------------*/ + +public Task_Ambient(iTaskId) { + new pPlayer = iTaskId - TASKID_AMBIENT; - return FMRES_IGNORED; + PlayAmbient(pPlayer); + set_task(random_float(10.0, 30.0), "Task_Ambient", TASKID_AMBIENT + pPlayer); } +/*--------------------------------[ Methods ]--------------------------------*/ + UpdatePlayerModel(pPlayer) { - new iCharacter = g_iPlayerCharacter[pPlayer]; + new iCharacter = g_iPlayerCharacter[pPlayer]; - static szPlayerModel[64]; - format( - szPlayerModel, - charsmax(szPlayerModel), - "%s/%s/%s", - ZP_CHARACTER_FOLDER, - ZP_CHARACTERS[iCharacter], - g_rgszCharacterModels[ZP_Player_IsZombie(pPlayer) ? CharacterModel_Zombie : CharacterModel_Human] - ); + static szPlayerModel[MAX_RESOURCE_PATH_LENGTH]; + if (g_iPlayerCharacter[pPlayer] != -1) { + ArrayGetString(Array:g_rgCharactersData[ZP_Player_IsZombie(pPlayer) ? Character_ZombieModel : Character_HumanModel], iCharacter, szPlayerModel, charsmax(szPlayerModel)); + } else { + copy(szPlayerModel, charsmax(szPlayerModel), DEFAULT_PLAYER_MODEL); + } - new iModelIndex = engfunc(EngFunc_ModelIndex, szPlayerModel); + new iModelIndex = engfunc(EngFunc_ModelIndex, szPlayerModel); - set_user_info(pPlayer, "model", ""); - set_pev(pPlayer, pev_modelindex, iModelIndex); - set_member(pPlayer, m_modelIndexPlayer, iModelIndex); + set_user_info(pPlayer, "model", NULL_STRING); + set_pev(pPlayer, pev_modelindex, iModelIndex); + set_member(pPlayer, m_modelIndexPlayer, iModelIndex); } -GetCharacterModelPath(iCharacter, szOut[], iLen) { - format(szOut, iLen, "%s/%s", ZP_CHARACTER_FOLDER, ZP_CHARACTERS[iCharacter]); +UpdatePlayerCharacter(pPlayer, bool:bOverride = false) { + if (!g_iCharacterCount) { + return; + } + + static szCharacter[16]; + get_user_info(pPlayer, CHARACTER_KEY, szCharacter, charsmax(szCharacter)); + + new iCharacter; + if (!TrieGetCell(g_iCharactersMap, szCharacter, iCharacter)) { + if (!bOverride) { + return; + } + + iCharacter = random(g_iCharacterCount); + } + + g_iPlayerCharacter[pPlayer] = iCharacter; } -GetCharacterModel(iCharacter, ZP_CharacterModels:iModel, szOut[], iLen) { - format(szOut, iLen, "%s/%s/%s", ZP_CHARACTER_FOLDER, ZP_CHARACTERS[iCharacter], g_rgszCharacterModels[iModel]); +PlayAmbient(pPlayer) { + if (!is_user_alive(pPlayer)) { + return; + } + + if (ZP_Player_IsZombie(pPlayer)) { + PlayVoiceFromCharacterData(pPlayer, Character_ZombieAmbientSounds); + } } -GetPlayerCharacter(pPlayer) { - static szCharacter[32]; - get_user_info(pPlayer, CHARACTER_KEY, szCharacter, charsmax(szCharacter)); +PlayVoiceFromCharacterData(pPlayer, CharacterData:iCharacterData) { + if (g_iPlayerCharacter[pPlayer] == -1) { + return; + } + + new Array:irgSounds = ArrayGetCell(Array:g_rgCharactersData[iCharacterData], g_iPlayerCharacter[pPlayer]); - return FindCharacterIndex(szCharacter); + static szSound[MAX_RESOURCE_PATH_LENGTH]; + ArrayGetString(irgSounds, random(ArraySize(irgSounds)), szSound, charsmax(szSound)); + emit_sound(pPlayer, CHAN_VOICE, szSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } -UpdatePlayerCharacter(pPlayer, bool:bOverride = false) { - new iCharacter = GetPlayerCharacter(pPlayer); - if (iCharacter == -1) { - if (bOverride) { - iCharacter = random(sizeof(ZP_CHARACTERS)); - } else { - return; +CreateCharacter() { + new iCharacter = g_iCharacterCount; + + for (new i = 0; i < sizeof(g_rgCharactersData); ++i) { + ArrayPushCell(g_rgCharactersData[CharacterData:i], 0); + } + + CrateCharacterSoundsData(iCharacter, Character_HumanDeathSounds); + CrateCharacterSoundsData(iCharacter, Character_PanicSounds); + CrateCharacterSoundsData(iCharacter, Character_ZombieAmbientSounds); + CrateCharacterSoundsData(iCharacter, Character_ZombieDeathSounds); + + g_iCharacterCount++; + + return iCharacter; +} + +DestroyCharacter(iCharacter) { + DestroyCharacterSoundData(iCharacter, Character_HumanDeathSounds); + DestroyCharacterSoundData(iCharacter, Character_PanicSounds); + DestroyCharacterSoundData(iCharacter, Character_ZombieAmbientSounds); + DestroyCharacterSoundData(iCharacter, Character_ZombieDeathSounds); +} + +CrateCharacterSoundsData(iCharacter, CharacterData:iCharacterData) { + new Array:irgSounds = ArrayCreate(MAX_RESOURCE_PATH_LENGTH, RESERVED_SOUND_COUNT); + ArraySetCell(Array:g_rgCharactersData[iCharacterData], iCharacter, irgSounds); +} + +DestroyCharacterSoundData(iCharacter, CharacterData:iCharacterData) { + new Array:irgSounds = ArrayGetCell(Array:g_rgCharactersData[iCharacterData], iCharacter); + ArrayDestroy(irgSounds); +} + +LoadCharacters() { + new szFileName[32]; + + new FileType:iFileType; + new iDir = open_dir(g_szCharacterDir, szFileName, charsmax(szFileName), iFileType); + + if (!iDir) { + return; } - } - g_iPlayerCharacter[pPlayer] = iCharacter; + do { + if (iFileType != FileType_File) { + continue; + } + + new iLen = strlen(szFileName); + if (iLen > 5 && equal(szFileName[iLen - 5], ".json")) { + new szName[16]; + copy(szName, iLen - 5, szFileName); + LoadCharacter(szName); + log_amx("Character %s loaded.", szName); + } + + } while (next_file(iDir, szFileName, charsmax(szFileName), iFileType)); + + close_dir(iDir); +} + +LoadCharacter(const szName[]) { + new szFilePath[MAX_RESOURCE_PATH_LENGTH]; + format(szFilePath, charsmax(szFilePath), "%s/%s.json", g_szCharacterDir, szName); + + new iCharacter = CreateCharacter(); + TrieSetCell(g_iCharactersMap, szName, iCharacter); + + new JSON:iDoc = json_parse(szFilePath, true); + + new JSON:iModelsDoc = json_object_get_value(iDoc, "models"); + LoadCharacterModelData(iCharacter, iModelsDoc, "human", Character_HumanModel); + LoadCharacterModelData(iCharacter, iModelsDoc, "zombie", Character_ZombieModel); + LoadCharacterModelData(iCharacter, iModelsDoc, "swipe", Character_SwipeModel); + + new JSON:iSoundsDoc = json_object_get_value(iDoc, "sounds"); + LoadCharacterSoundsData(iCharacter, iSoundsDoc, "human.death", Character_HumanDeathSounds); + LoadCharacterSoundsData(iCharacter, iSoundsDoc, "human.panic", Character_PanicSounds); + LoadCharacterSoundsData(iCharacter, iSoundsDoc, "zombie.ambient", Character_ZombieAmbientSounds); + LoadCharacterSoundsData(iCharacter, iSoundsDoc, "zombie.death", Character_ZombieDeathSounds); + + return iCharacter; } -FindCharacterIndex(const szCharacter[]) { - if (szCharacter[0] == '^0') { - return -1; - } +LoadCharacterModelData(iCharacter, JSON:iModelsDoc, const szKey[], CharacterData:iCharacterData) { + new szBuffer[MAX_RESOURCE_PATH_LENGTH]; - for (new i = 0; i < sizeof(ZP_CHARACTERS); ++i) { - if (equal(ZP_CHARACTERS[i], szCharacter)) { - return i; + json_object_get_string(iModelsDoc, szKey, szBuffer, charsmax(szBuffer)); + ArraySetString(Array:g_rgCharactersData[iCharacterData], iCharacter, szBuffer); + precache_model(szBuffer); +} + +LoadCharacterSoundsData(iCharacter, JSON:iSoundDoc, const szKey[], CharacterData:iCharacterData) { + new szBuffer[MAX_RESOURCE_PATH_LENGTH]; + + new JSON:iSoundsDoc = json_object_get_value(iSoundDoc, szKey, true); + new Array:irgSounds = ArrayGetCell(Array:g_rgCharactersData[iCharacterData], iCharacter); + new iSize = json_array_get_count(iSoundsDoc); + for (new i = 0; i < iSize; ++i) { + json_array_get_string(iSoundsDoc, i, szBuffer, charsmax(szBuffer)); + ArrayPushString(irgSounds, szBuffer); + precache_sound(szBuffer); + } +} + +InitializeCharactersStore() { + g_iCharactersMap = TrieCreate(); + + g_rgCharactersData[Character_HumanModel] = ArrayCreate(MAX_RESOURCE_PATH_LENGTH, RESERVED_CHARACTER_COUNT); + g_rgCharactersData[Character_ZombieModel] = ArrayCreate(MAX_RESOURCE_PATH_LENGTH, RESERVED_CHARACTER_COUNT); + g_rgCharactersData[Character_SwipeModel] = ArrayCreate(MAX_RESOURCE_PATH_LENGTH, RESERVED_CHARACTER_COUNT); + g_rgCharactersData[Character_HumanDeathSounds] = ArrayCreate(_, RESERVED_CHARACTER_COUNT); + g_rgCharactersData[Character_PanicSounds] = ArrayCreate(_, RESERVED_CHARACTER_COUNT); + g_rgCharactersData[Character_ZombieAmbientSounds] = ArrayCreate(_, RESERVED_CHARACTER_COUNT); + g_rgCharactersData[Character_ZombieDeathSounds] = ArrayCreate(_, RESERVED_CHARACTER_COUNT); +} + +DestroyCharactersStore() { + for (new iCharacter; iCharacter < g_iCharacterCount; ++iCharacter) { + DestroyCharacter(iCharacter); } - } - return -1; + TrieDestroy(g_iCharactersMap); + + ArrayDestroy(Array:g_rgCharactersData[Character_HumanModel]); + ArrayDestroy(Array:g_rgCharactersData[Character_ZombieModel]); + ArrayDestroy(Array:g_rgCharactersData[Character_SwipeModel]); + ArrayDestroy(Array:g_rgCharactersData[Character_HumanDeathSounds]); + ArrayDestroy(Array:g_rgCharactersData[Character_PanicSounds]); + ArrayDestroy(Array:g_rgCharactersData[Character_ZombieAmbientSounds]); + ArrayDestroy(Array:g_rgCharactersData[Character_ZombieDeathSounds]); } diff --git a/src/scripts/core/zp_controls.sma b/src/scripts/core/zp_controls.sma index 32140fc..0a10ad4 100644 --- a/src/scripts/core/zp_controls.sma +++ b/src/scripts/core/zp_controls.sma @@ -9,56 +9,83 @@ #define AUTHOR "Hedgehog Fog" public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - register_clcmd("changeammotype", "OnClCmd_NextAmmo"); - register_clcmd("dropammo", "OnClCmd_DropAmmo"); - register_clcmd("panic", "OnClCmd_Panic"); + register_clcmd("changeammotype", "OnClCmd_NextAmmo"); + register_clcmd("dropammo", "OnClCmd_DropAmmo"); + register_clcmd("dua", "OnClCmd_DropUnactiveAmmo"); + register_clcmd("panic", "OnClCmd_Panic"); - register_clcmd("radio1", "OnClCmd_NextAmmo"); - register_clcmd("radio2", "OnClCmd_DropAmmo"); - register_clcmd("buyequip", "OnClCmd_Panic"); + register_clcmd("radio1", "OnClCmd_NextAmmo"); + register_clcmd("radio2", "OnClCmd_DropAmmo"); + register_clcmd("radio3", "OnClCmd_DropUnactiveAmmo"); + register_clcmd("buyequip", "OnClCmd_Panic"); - register_impulse(100, "OnImpulse_100"); + register_impulse(100, "OnImpulse_100"); } public OnImpulse_100(pPlayer) { - if (!is_user_alive(pPlayer)) { - return PLUGIN_HANDLED; - } + if (!is_user_alive(pPlayer)) { + return PLUGIN_HANDLED; + } - if (ZP_Player_IsZombie(pPlayer)) { - ZP_Player_ToggleZombieVision(pPlayer); - } else { - ZP_Player_ToggleFlashlight(pPlayer); - } + if (ZP_Player_IsZombie(pPlayer)) { + ZP_Player_ToggleZombieVision(pPlayer); + } else { + ZP_Player_ToggleFlashlight(pPlayer); + } - return PLUGIN_HANDLED; + return PLUGIN_HANDLED; } public OnClCmd_NextAmmo(pPlayer) { - if (ZP_Player_IsZombie(pPlayer)) { - return PLUGIN_HANDLED; - } + if (!is_user_alive(pPlayer)) { + return PLUGIN_HANDLED; + } + + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_HANDLED; + } - ZP_Player_NextAmmo(pPlayer); - return PLUGIN_HANDLED; + ZP_Player_NextAmmo(pPlayer); + return PLUGIN_HANDLED; } public OnClCmd_DropAmmo(pPlayer) { - if (ZP_Player_IsZombie(pPlayer)) { + if (!is_user_alive(pPlayer)) { + return PLUGIN_HANDLED; + } + + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_HANDLED; + } + + ZP_Player_DropAmmo(pPlayer); return PLUGIN_HANDLED; - } +} + +public OnClCmd_DropUnactiveAmmo(pPlayer) { + if (!is_user_alive(pPlayer)) { + return PLUGIN_HANDLED; + } - ZP_Player_DropAmmo(pPlayer); - return PLUGIN_HANDLED; + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_HANDLED; + } + + ZP_Player_DropUnactiveAmmo(pPlayer); + return PLUGIN_HANDLED; } public OnClCmd_Panic(pPlayer) { - if (ZP_Player_IsZombie(pPlayer)) { - return PLUGIN_HANDLED; - } + if (!is_user_alive(pPlayer)) { + return PLUGIN_HANDLED; + } + + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_HANDLED; + } - ZP_Player_Panic(pPlayer); - return PLUGIN_HANDLED; + ZP_Player_Panic(pPlayer); + return PLUGIN_HANDLED; } diff --git a/src/scripts/core/zp_flashlight.sma b/src/scripts/core/zp_flashlight.sma index 0dbb6dc..78ad4d0 100644 --- a/src/scripts/core/zp_flashlight.sma +++ b/src/scripts/core/zp_flashlight.sma @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -12,128 +13,170 @@ #define PLUGIN "[Zombie Panic] Flashlight" #define AUTHOR "Hedgehog Fog" +#define TASKID_FLASHLIGHT_HUD 100 + #define FLASHLIGHT_CHARGE_MAX 100.0 #define FLASHLIGHT_CHARGE_DEF FLASHLIGHT_CHARGE_MAX #define FLASHLIGHT_RATE 0.025 -#define FLASHLIGHT_CONSUMPTION_RATE 0.5 -#define FLASHLIGHT_RECOVERY_RATE 0.5 #define FLASHLIGHT_MAX_DISTANCE 1024.0 #define FLASHLIGHT_MAX_CHARGE 100.0 #define FLASHLIGHT_MIN_CHARGE 0.0 - -#define TASKID_FLASHLIGHT 100 -#define TASKID_FLASHLIGHT_HUD 200 +#define FLASHLIGHT_MIN_CHARGE_TO_ACTIVATE 10.0 enum PlayerFlashlight { - bool:PlayerFlashlight_On, - Float:PlayerFlashlight_Charge, - PlayerFlashlight_ConeEntity, - Float:PlayerFlashlight_LastThink + bool:PlayerFlashlight_On, + Float:PlayerFlashlight_Charge, + PlayerFlashlight_ConeEntity, + Float:PlayerFlashlight_LastThink } new gmsgFlashlight; -new g_playerFlashlight[MAX_PLAYERS + 1][PlayerFlashlight]; +new g_rgPlayerFlashlight[MAX_PLAYERS + 1][PlayerFlashlight]; + +new g_pCvarConsumptionRate; +new g_pCvarRecoveryRate; public plugin_precache() { - precache_sound(ZP_FLASHLIGHT_SOUND); - precache_model(ZP_FLASHLIGHT_LIGHTCONE_MODEL); + precache_sound(ZP_FLASHLIGHT_SOUND); + precache_model(ZP_FLASHLIGHT_LIGHTCONE_MODEL); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); - RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); - RegisterHam(Ham_Player_PreThink, "player", "OnPlayerPreThink_Post", .Post = 1); + gmsgFlashlight = get_user_msgid("Flashlight"); - gmsgFlashlight = get_user_msgid("Flashlight"); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); + RegisterHam(Ham_Player_PreThink, "player", "OnPlayerPreThink_Post", .Post = 1); + + g_pCvarConsumptionRate = register_cvar("zp_flashlight_consumption_rate", "0.5"); + g_pCvarRecoveryRate = register_cvar("zp_flashlight_recovery_rate", "0.5"); } public plugin_natives() { - register_native("ZP_Player_ToggleFlashlight", "Native_Toggle"); + register_native("ZP_Player_ToggleFlashlight", "Native_Toggle"); } public bool:Native_Toggle(iPluginId, iArgc) { - new pPlayer = get_param(1); - return SetPlayerFlashlight(pPlayer, !g_playerFlashlight[pPlayer][PlayerFlashlight_On]); + new pPlayer = get_param(1); + return SetPlayerFlashlight(pPlayer, !g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_On]); +} + +public client_disconnected(pPlayer) { + SetPlayerFlashlight(pPlayer, false); } public OnPlayerSpawn_Post(pPlayer) { - if(!is_user_alive(pPlayer)) { - return HAM_IGNORED; - } + if(!is_user_alive(pPlayer)) { + return HAM_IGNORED; + } - if (ZP_Player_IsZombie(pPlayer)) { SetPlayerFlashlight(pPlayer, false); - } - - g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] = FLASHLIGHT_CHARGE_DEF; - set_pev(pPlayer, pev_framerate, 1.0); - - return HAM_HANDLED; + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] = FLASHLIGHT_CHARGE_DEF; + set_pev(pPlayer, pev_framerate, 1.0); + + return HAM_HANDLED; } public OnPlayerKilled_Post(pPlayer) { - SetPlayerFlashlight(pPlayer, false); - return HAM_HANDLED; + SetPlayerFlashlight(pPlayer, false); + + return HAM_HANDLED; } public OnPlayerPreThink_Post(pPlayer) { - FlashlightThink(pPlayer); + FlashlightThink(pPlayer); + + return HAM_HANDLED; } -bool:SetPlayerFlashlight(pPlayer, bool:bValue) { - if (bValue == g_playerFlashlight[pPlayer][PlayerFlashlight_On]) { - return true; - } +public FlashlightThink(pPlayer) { + new Float:flDelta = get_gametime() - g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_LastThink]; + if (flDelta < FLASHLIGHT_RATE) { + return; + } - if (bValue && (ZP_Player_IsZombie(pPlayer) || !is_user_alive(pPlayer))) { - return false; - } + if (g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_On]) { + if (g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] > FLASHLIGHT_MIN_CHARGE) { + CreatePlayerFlashlightLight(pPlayer); + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] -= (get_pcvar_float(g_pCvarConsumptionRate) * flDelta); + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] = floatmax(g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge], FLASHLIGHT_MIN_CHARGE); + set_pev(pPlayer, pev_framerate, 0.5); + } else { + SetPlayerFlashlight(pPlayer, false); + } + } else if (g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] < FLASHLIGHT_MAX_CHARGE) { + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] += (get_pcvar_float(g_pCvarRecoveryRate) * flDelta); + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] = floatmin(g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge], FLASHLIGHT_MAX_CHARGE); + } - g_playerFlashlight[pPlayer][PlayerFlashlight_On] = bValue; + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_LastThink] = get_gametime(); +} - remove_task(pPlayer + TASKID_FLASHLIGHT); - remove_task(pPlayer + TASKID_FLASHLIGHT_HUD); +bool:SetPlayerFlashlight(pPlayer, bool:bValue) { + if (bValue == g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_On]) { + return true; + } - if (bValue) { - ShowLightConeEntity(pPlayer); - set_task(1.0, "TaskFlashlightHud", pPlayer + TASKID_FLASHLIGHT_HUD, _, _, "b"); - } else { - HideLightConeEntity(pPlayer); - } + if (bValue) { + if (get_member_game(m_bFreezePeriod)) { + return false; + } - UpdateFlashlightHud(pPlayer); - emit_sound(pPlayer, CHAN_ITEM, ZP_FLASHLIGHT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + if (ZP_Player_IsZombie(pPlayer) || !is_user_alive(pPlayer)) { + return false; + } + + if (g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge] < FLASHLIGHT_MIN_CHARGE_TO_ACTIVATE) { + return false; + } + } - return true; + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_On] = bValue; + + remove_task(TASKID_FLASHLIGHT_HUD + pPlayer); + + if (bValue) { + ShowLightConeEntity(pPlayer); + set_task(1.0, "Task_FlashlightHud", TASKID_FLASHLIGHT_HUD + pPlayer, _, _, "b"); + } else { + HideLightConeEntity(pPlayer); + } + + if (is_user_connected(pPlayer)) { + UpdateFlashlightHud(pPlayer); + emit_sound(pPlayer, CHAN_ITEM, ZP_FLASHLIGHT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } + + return true; } CreateLightConeEntity(pPlayer) { - static iszClassname; - if (!iszClassname) { - iszClassname = engfunc(EngFunc_AllocString, "info_target"); - } + static iszClassname; + if (!iszClassname) { + iszClassname = engfunc(EngFunc_AllocString, "info_target"); + } - new pEntity = engfunc(EngFunc_CreateNamedEntity, iszClassname); + new pEntity = engfunc(EngFunc_CreateNamedEntity, iszClassname); - set_pev(pEntity, pev_classname, "lightcone"); - set_pev(pEntity, pev_movetype, MOVETYPE_FOLLOW); - set_pev(pEntity, pev_aiment, pPlayer); - set_pev(pEntity, pev_owner, pPlayer); + set_pev(pEntity, pev_classname, "lightcone"); + set_pev(pEntity, pev_movetype, MOVETYPE_FOLLOW); + set_pev(pEntity, pev_aiment, pPlayer); + set_pev(pEntity, pev_owner, pPlayer); - engfunc(EngFunc_SetModel, pEntity, ZP_FLASHLIGHT_LIGHTCONE_MODEL); + engfunc(EngFunc_SetModel, pEntity, ZP_FLASHLIGHT_LIGHTCONE_MODEL); - g_playerFlashlight[pPlayer][PlayerFlashlight_ConeEntity] = pEntity; + g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_ConeEntity] = pEntity; - return pEntity; + return pEntity; } ShowLightConeEntity(pPlayer) { - new iLightconeEntity = g_playerFlashlight[pPlayer][PlayerFlashlight_ConeEntity]; + new iLightconeEntity = g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_ConeEntity]; if (!iLightconeEntity) { - iLightconeEntity = CreateLightConeEntity(pPlayer); + iLightconeEntity = CreateLightConeEntity(pPlayer); } set_pev(iLightconeEntity, pev_effects, pev(iLightconeEntity, pev_effects) & ~EF_NODRAW); @@ -141,83 +184,61 @@ ShowLightConeEntity(pPlayer) { } HideLightConeEntity(pPlayer) { - new iLightconeEntity = g_playerFlashlight[pPlayer][PlayerFlashlight_ConeEntity]; - - if (iLightconeEntity) { - set_pev(iLightconeEntity, pev_effects, pev(iLightconeEntity, pev_effects) | EF_NODRAW); - set_pev(pPlayer, pev_framerate, 1.0); - } + new iLightconeEntity = g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_ConeEntity]; + if (iLightconeEntity) { + set_pev(iLightconeEntity, pev_effects, pev(iLightconeEntity, pev_effects) | EF_NODRAW); + set_pev(pPlayer, pev_framerate, 1.0); + } } UpdateFlashlightHud(pPlayer) { - message_begin(MSG_ONE, gmsgFlashlight, _, pPlayer); - write_byte(g_playerFlashlight[pPlayer][PlayerFlashlight_On]); - write_byte(floatround(g_playerFlashlight[pPlayer][PlayerFlashlight_Charge])); - message_end(); + message_begin(MSG_ONE, gmsgFlashlight, _, pPlayer); + write_byte(g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_On]); + write_byte(floatround(g_rgPlayerFlashlight[pPlayer][PlayerFlashlight_Charge])); + message_end(); } -public FlashlightThink(pPlayer) { - new Float:flDelta = get_gametime() - g_playerFlashlight[pPlayer][PlayerFlashlight_LastThink]; - if (flDelta < FLASHLIGHT_RATE) { - return; - } - - if (g_playerFlashlight[pPlayer][PlayerFlashlight_On]) { - if (g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] > FLASHLIGHT_MIN_CHARGE) { - CreatePlayerFlashlightLight(pPlayer); - g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] -= (FLASHLIGHT_CONSUMPTION_RATE * flDelta); - g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] = floatmax(g_playerFlashlight[pPlayer][PlayerFlashlight_Charge], FLASHLIGHT_MIN_CHARGE); - set_pev(pPlayer, pev_framerate, 0.5); - } else { - SetPlayerFlashlight(pPlayer, false); - } - } else if (g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] < FLASHLIGHT_MAX_CHARGE) { - g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] += (FLASHLIGHT_RECOVERY_RATE * flDelta); - g_playerFlashlight[pPlayer][PlayerFlashlight_Charge] = floatmin(g_playerFlashlight[pPlayer][PlayerFlashlight_Charge], FLASHLIGHT_MAX_CHARGE); - } +CreatePlayerFlashlightLight(pPlayer) { + static Float:vecViewOfs[3]; + pev(pPlayer, pev_view_ofs, vecViewOfs); - g_playerFlashlight[pPlayer][PlayerFlashlight_LastThink] = get_gametime(); -} + static Float:vecStart[3]; + pev(pPlayer, pev_origin, vecStart); + vecStart[2] += vecViewOfs[2]; + + static Float:vecEnd[3]; + pev(pPlayer, pev_v_angle, vecEnd); + engfunc(EngFunc_MakeVectors, vecEnd); + get_global_vector(GL_v_forward, vecEnd); -CreatePlayerFlashlightLight(pPlayer) { - static Float:vecViewOfs[3]; - pev(pPlayer, pev_view_ofs, vecViewOfs); - - static Float:vecStart[3]; - pev(pPlayer, pev_origin, vecStart); - vecStart[2] += vecViewOfs[2]; - - static Float:vecEnd[3]; - pev(pPlayer, pev_v_angle, vecEnd); - engfunc(EngFunc_MakeVectors, vecEnd); - get_global_vector(GL_v_forward, vecEnd); - xs_vec_mul_scalar(vecEnd, 8192.0, vecEnd); - xs_vec_add(vecEnd, vecStart, vecEnd); - - new pTr = create_tr2(); - engfunc(EngFunc_TraceLine, vecStart, vecEnd, DONT_IGNORE_MONSTERS, pPlayer, pTr); - get_tr2(pTr, TR_vecEndPos, vecEnd); - free_tr2(pTr); - - new Float:flDistance = get_distance_f(vecStart, vecEnd); - if (flDistance <= FLASHLIGHT_MAX_DISTANCE) { - // TODO: Remove this hardcoded shit - new Float:flRadius = 4.0 + (flDistance / 64.0); - new Float:flBrightness = floatmax(255.0 - flDistance / 4.0, 0.0); - - new iColor[3]; for (new i = 0; i < 3; ++i) { - iColor[i] = floatround(flBrightness); + vecEnd[i] = vecStart[i] + (vecEnd[i] * 8192.0); } - new iLifeTime = max(1, floatround(FLASHLIGHT_RATE * 10)); - new iDecayRate = 10 / iLifeTime; - UTIL_Message_Dlight(vecEnd, floatround(flRadius), iColor, iLifeTime, iDecayRate); - } + new pTr = create_tr2(); + engfunc(EngFunc_TraceLine, vecStart, vecEnd, DONT_IGNORE_MONSTERS, pPlayer, pTr); + get_tr2(pTr, TR_vecEndPos, vecEnd); + free_tr2(pTr); + + new Float:flDistance = get_distance_f(vecStart, vecEnd); + if (flDistance <= FLASHLIGHT_MAX_DISTANCE) { + // TODO: Remove this hardcoded shit + new Float:flRadius = 4.0 + (flDistance / 64.0); + new Float:flBrightness = floatmax(255.0 - flDistance / 4.0, 0.0); + + new iColor[3]; + for (new i = 0; i < 3; ++i) { + iColor[i] = floatround(flBrightness); + } + + new iLifeTime = max(1, floatround(FLASHLIGHT_RATE * 10)); + new iDecayRate = 10 / iLifeTime; + UTIL_Message_Dlight(vecEnd, floatround(flRadius), iColor, iLifeTime, iDecayRate); + } } -public TaskFlashlightHud(iTaskId) { - new pPlayer = iTaskId - TASKID_FLASHLIGHT_HUD; +public Task_FlashlightHud(iTaskId) { + new pPlayer = iTaskId - TASKID_FLASHLIGHT_HUD; - UpdateFlashlightHud(pPlayer); + UpdateFlashlightHud(pPlayer); } diff --git a/src/scripts/core/zp_gamename.sma b/src/scripts/core/zp_gamename.sma deleted file mode 100644 index 641670f..0000000 --- a/src/scripts/core/zp_gamename.sma +++ /dev/null @@ -1,21 +0,0 @@ -#pragma semicolon 1 - -#include -#include - -#include - -#define PLUGIN "[Zombie Panic] Game Name" -#define AUTHOR "Hedgehog Fog" - -public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - register_forward(FM_GetGameDescription, "OnGetGameDescription"); -} - -public OnGetGameDescription() { - static szGameName[32]; - format(szGameName, charsmax(szGameName), "%s %s", ZP_TITLE, ZP_VERSION); - forward_return(FMV_STRING, szGameName); - return FMRES_SUPERCEDE; -} diff --git a/src/scripts/core/zp_gameplay_fixes.sma b/src/scripts/core/zp_gameplay_fixes.sma index 874586f..6ed062b 100644 --- a/src/scripts/core/zp_gameplay_fixes.sma +++ b/src/scripts/core/zp_gameplay_fixes.sma @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -14,7 +15,7 @@ new const g_rgszObjectiveEntities[][] = { "func_bomb_target", "func_escapezone", "func_hostage_rescue", - "func_vip_safetyzone", + // "func_vip_safetyzone", // trigger_endround alias "func_buyzone", "hostage_entity", "info_bomb_target", @@ -24,51 +25,18 @@ new const g_rgszObjectiveEntities[][] = { "weapon_c4" }; -new const g_rgszDelayEntities[][] = { - "trigger_auto", - "trigger_changetarget", - "trigger_relay", - "button_target", - "func_door", - "func_door_rotating", - "func_button", - "func_rotating", - "func_rot_button", - "func_tracktrain", - "func_train", - "momentary_door", - "momentary_rot_button", - "trigger_multiple", - "trigger_once", - "trigger_push" -}; - -new g_iFwEntitySpawn; -new g_iCvarRoundTime; -new Array:g_irgObjectiveEntities; +new g_pFwEntitySpawn; public plugin_precache() { - g_irgObjectiveEntities = ArrayCreate(); - CreateHiddenBuyZone(); - g_iFwEntitySpawn = register_forward(FM_Spawn, "OnSpawn"); - - RegisterHam(Ham_Spawn, "game_score", "OnGameScoreSpawn", .Post = 1); - - g_iCvarRoundTime = get_cvar_pointer("mp_roundtime"); + g_pFwEntitySpawn = register_forward(FM_Spawn, "OnSpawn"); } public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - unregister_forward(FM_Spawn, g_iFwEntitySpawn); - - RemoveObjectiveEntities(); -} - -public plugin_end() { - ArrayDestroy(g_irgObjectiveEntities); + unregister_forward(FM_Spawn, g_pFwEntitySpawn); } public OnGameScoreSpawn(pEntity) { @@ -81,11 +49,7 @@ public OnSpawn(pEntity) { } if (IsObjectiveEntity(pEntity)) { - ArrayPushCell(g_irgObjectiveEntities, pEntity); - } else if (IsDelayEntity(pEntity)) { - if (get_ent_data_float(pEntity, "CBaseToggle", "m_flWait") < 0.0) { - set_ent_data_float(pEntity, "CBaseToggle", "m_flWait", get_pcvar_num(g_iCvarRoundTime) * 60.0 + 1.0); - } + engfunc(EngFunc_RemoveEntity, pEntity); } return FMRES_IGNORED; @@ -158,33 +122,8 @@ bool:IsObjectiveEntity(pEntity) { return false; } -bool:IsDelayEntity(pEntity) { - new szClassname[32]; - pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); - - new iSize = sizeof(g_rgszDelayEntities); - for (new i = 0; i < iSize; ++i) { - if (equal(szClassname, g_rgszDelayEntities[i])) { - return true; - } - } - - return false; -} - CreateHiddenBuyZone() { new pEntity = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_buyzone")); dllfunc(DLLFunc_Spawn, pEntity); engfunc(EngFunc_SetSize, pEntity, {-8192.0, -8192.0, -8192.0}, {-8191.0, -8191.0, -8191.0}); } - -RemoveObjectiveEntities() { - for (new i = ArraySize(g_irgObjectiveEntities) - 1; i >= 0; --i) { - new pEntity = ArrayGetCell(g_irgObjectiveEntities, i); - if (pev_valid(pEntity) && IsObjectiveEntity(pEntity)) { - engfunc(EngFunc_RemoveEntity, pEntity); - } - - ArrayDeleteItem(g_irgObjectiveEntities, i); - } -} diff --git a/src/scripts/core/zp_gamerules.sma b/src/scripts/core/zp_gamerules.sma index 1bb3229..512c8de 100644 --- a/src/scripts/core/zp_gamerules.sma +++ b/src/scripts/core/zp_gamerules.sma @@ -1,6 +1,7 @@ #pragma semicolon 1 #include +#include #include #include #include @@ -8,6 +9,7 @@ #include #include +#include #define PLUGIN "[Zombie Panic] Gamerules" #define AUTHOR "Hedgehog Fog" @@ -16,30 +18,46 @@ #define CHOOSE_TEAM1_CLASS_VGUI_MENU_ID 26 #define CHOOSE_TEAM2_CLASS_VGUI_MENU_ID 27 -new g_iMaxPlayers; -new bool:g_bObjectiveMode = false; +enum TeamPreference { + TeamPreference_Human, + TeamPreference_Zombie, + TeamPreference_Spectator +} -new g_bPlayerPreferZombies[MAX_PLAYERS + 1]; +new g_pCvarLives; -new g_fwPlayerJoined; -new g_fwResult; +new g_pFwPlayerJoined; +new g_pFwResult; + +new g_iTeamMenu; +new bool:g_bObjectiveMode = false; +new TeamPreference:g_iPlayerTeamPreference[MAX_PLAYERS + 1]; public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); Round_HookCheckWinConditions("OnCheckWinConditions"); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", .Post = 0); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); + RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage", .Post = 0); + + register_forward(FM_ClientKill, "OnClientKill"); + + register_message(get_user_msgid("ShowMenu"), "OnMessage_ShowMenu"); + register_message(get_user_msgid("VGUIMenu"), "OnMessage_VGUIMenu"); register_clcmd("chooseteam", "OnPlayerChangeTeam"); register_clcmd("jointeam", "OnPlayerChangeTeam"); register_clcmd("joinclass", "OnPlayerChangeTeam"); + register_clcmd("drop", "OnClCmd_Drop"); - register_message(get_user_msgid("ShowMenu"), "OnMessage_ShowMenu"); - register_message(get_user_msgid("VGUIMenu"), "OnMessage_VGUIMenu"); + g_pCvarLives = register_cvar("zp_zombie_lives", "20"); + + g_pFwPlayerJoined = CreateMultiForward("ZP_Fw_PlayerJoined", ET_IGNORE, FP_CELL); - g_iMaxPlayers = get_maxplayers(); - g_fwPlayerJoined = CreateMultiForward("Zp_Fw_PlayerJoined", ET_IGNORE, FP_CELL); + g_iTeamMenu = CreateTeamMenu(); } public plugin_natives() { @@ -70,23 +88,35 @@ public client_disconnected(pPlayer) { } public Round_Fw_NewRound() { - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { - if (!is_user_connected(pPlayer)) { - continue; - } - - new iTeam = get_member(pPlayer, m_iTeam); - if (iTeam != ZP_HUMAN_TEAM && iTeam != ZP_ZOMBIE_TEAM) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer) || is_user_hltv(pPlayer)) { continue; } - g_bPlayerPreferZombies[pPlayer] = false; - set_member(pPlayer, m_iTeam, ZP_HUMAN_TEAM); + g_iPlayerTeamPreference[pPlayer] = get_member(pPlayer, m_iTeam) == 3 ? TeamPreference_Spectator : TeamPreference_Human; + OpenTeamMenu(pPlayer); } + ShuffleTeams(); + return PLUGIN_CONTINUE; } +public Round_Fw_RoundStart() { + ZP_GameRules_SetZombieLives(ZP_GameRules_GetObjectiveMode() ? 255 : get_pcvar_num(g_pCvarLives)); + DistributeTeams(); + CheckWinConditions(); + log_amx("New round started"); +} + +public Round_Fw_RoundExpired() { + if (!g_bObjectiveMode) { + DispatchWin(ZP_HUMAN_TEAM); + + log_amx("Round expired, survivors win!"); + } +} + /*--------------------------------[ Hooks ]--------------------------------*/ public OnMessage_ShowMenu(iMsgId, iDest, pPlayer) { @@ -94,7 +124,7 @@ public OnMessage_ShowMenu(iMsgId, iDest, pPlayer) { get_msg_arg_string(4, szBuffer, charsmax(szBuffer)); if (equali(szBuffer, "#Team_Select", 12)) { - set_task(0.1, "TaskJoin", pPlayer); + set_task(0.1, "Task_Join", pPlayer); return PLUGIN_HANDLED; } @@ -110,7 +140,7 @@ public OnMessage_VGUIMenu(iMsgId, iDest, pPlayer) { new iMenuId = get_msg_arg_int(1); if (iMenuId == CHOOSE_TEAM_VGUI_MENU_ID) { - set_task(0.1, "TaskJoin", pPlayer); + set_task(0.1, "Task_Join", pPlayer); return PLUGIN_HANDLED; } @@ -130,8 +160,12 @@ public OnPlayerChangeTeam(pPlayer, iKey) { return PLUGIN_HANDLED; } -public OnClCmd_ChooseTeam(pPlayer) { - return PLUGIN_HANDLED; +public OnClCmd_Drop(pPlayer) { + return get_member_game(m_bFreezePeriod) ? PLUGIN_HANDLED : PLUGIN_CONTINUE; +} + +public OnClientKill(pPlayer) { + return get_member_game(m_bFreezePeriod) ? FMRES_SUPERCEDE : FMRES_IGNORED; } public OnPlayerSpawn(pPlayer) { @@ -139,8 +173,15 @@ public OnPlayerSpawn(pPlayer) { return HAM_IGNORED; } + return HAM_HANDLED; +} + +public OnPlayerSpawn_Post(pPlayer) { if (!Round_IsRoundStarted()) { - OpenTeamMenu(pPlayer); + set_member(pPlayer, m_iTeam, ZP_HUMAN_TEAM); + set_pev(pPlayer, pev_takedamage, DAMAGE_NO); + ZP_ShowMapInfo(pPlayer); + // ZP_Player_UpdateSpeed(pPlayer); } else { CheckWinConditions(); } @@ -154,33 +195,27 @@ public OnPlayerKilled_Post(pPlayer) { return HAM_HANDLED; } -public OpenTeamMenu(pPlayer) { - new iMenu = menu_create("What's your plan?", "TeamMenuHandler"); - menu_additem(iMenu, "I wanna shit my pants"); - menu_additem(iMenu, "Join Zombies"); - menu_setprop(iMenu, MPROP_EXIT, MEXIT_NEVER); - menu_display(pPlayer, iMenu, 0); +public OnPlayerTakeDamage(pPlayer) { + return Round_IsRoundEnd() ? HAM_SUPERCEDE : HAM_IGNORED; } public OnCheckWinConditions() { return PLUGIN_HANDLED; } -public Round_Fw_RoundStart() { - DistributeTeams(); +/*--------------------------------[ Methods ]--------------------------------*/ - log_amx("New round started"); -} - -public Round_Fw_RoundExpired() { - if (!g_bObjectiveMode) { - DispatchWin(ZP_HUMAN_TEAM); +DistributeTeams() { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer) || is_user_hltv(pPlayer)) { + continue; + } - log_amx("Round expired, survivors win!"); + if (g_iPlayerTeamPreference[pPlayer] != TeamPreference_Spectator) { + set_member(pPlayer, m_iTeam, ZP_HUMAN_TEAM); + } } -} -DistributeTeams() { new pPlayerCount = CalculatePlayerCount(); new iZombieCount = ProcessZombiePlayers(pPlayerCount / 2); @@ -196,33 +231,43 @@ DistributeTeams() { log_amx("Not enough players to start"); } } + + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer)) { + continue; + } + + if (UTIL_IsPlayerSpectator(pPlayer)) { + continue; + } + + ExecuteHamB(Ham_CS_RoundRespawn, pPlayer); + } } ProcessZombiePlayers(iMaxZombies) { new iZombieCount = 0; - for (new pPlayer = 1; pPlayer <= g_iMaxPlayers; ++pPlayer) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { if (!is_user_connected(pPlayer)) { continue; } - new iTeam = get_member(pPlayer, m_iTeam); - if (iTeam != ZP_ZOMBIE_TEAM && iTeam != ZP_HUMAN_TEAM) { + if (UTIL_IsPlayerSpectator(pPlayer)) { continue; } - if (is_user_alive(pPlayer) && !g_bPlayerPreferZombies[pPlayer]) { + if (g_iPlayerTeamPreference[pPlayer] != TeamPreference_Zombie) { continue; } - if (iZombieCount < iMaxZombies || !is_user_alive(pPlayer)) { - if (g_bPlayerPreferZombies[pPlayer]) { - log_amx("Player ^"%n^" has chosen a zombie team", pPlayer); - } - - RespawnPlayerAsZombie(pPlayer); - iZombieCount++; + if (iMaxZombies && iZombieCount >= iMaxZombies) { + break; } + + log_amx("Player ^"%n^" has chosen a zombie team", pPlayer); + set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); + iZombieCount++; } return iZombieCount; @@ -232,13 +277,12 @@ ChooseRandomZombie() { static rgpPlayers[MAX_PLAYERS + 1]; new pPlayerCount = 0; - for (new pPlayer = 1; pPlayer <= g_iMaxPlayers; ++pPlayer) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { if (!is_user_connected(pPlayer)) { continue; } - new iTeam = get_member(pPlayer, m_iTeam); - if (iTeam != ZP_ZOMBIE_TEAM && iTeam != ZP_HUMAN_TEAM) { + if (UTIL_IsPlayerSpectator(pPlayer)) { continue; } @@ -251,27 +295,19 @@ ChooseRandomZombie() { } new pPlayer = rgpPlayers[random(pPlayerCount)]; - RespawnPlayerAsZombie(pPlayer); -} - -RespawnPlayerAsZombie(pPlayer) { - strip_user_weapons(pPlayer); set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); - ExecuteHamB(Ham_CS_RoundRespawn, pPlayer); - - log_amx("Player ^"%n^" was moved to the zombie team", pPlayer); + log_amx("Player ^"%n^" was randomly moved to the zombie team", pPlayer); } CalculatePlayerCount() { new pPlayerCount = 0; - for (new pPlayer = 1; pPlayer <= g_iMaxPlayers; ++pPlayer) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { if (!is_user_connected(pPlayer)) { continue; } - new iTeam = get_member(pPlayer, m_iTeam); - if (iTeam != ZP_ZOMBIE_TEAM && iTeam != ZP_HUMAN_TEAM) { + if (UTIL_IsPlayerSpectator(pPlayer)) { continue; } @@ -285,8 +321,9 @@ CheckWinConditions(pIgnorePlayer = 0) { new iAliveHumanCount = 0; new iAliveZombieCount = 0; new iZombieCount = 0; + new iPlayerCount = 0; - for (new pPlayer = 1; pPlayer <= g_iMaxPlayers; ++pPlayer) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { if (pPlayer == pIgnorePlayer) { continue; } @@ -306,6 +343,12 @@ CheckWinConditions(pIgnorePlayer = 0) { iAliveHumanCount++; } } + + iPlayerCount++; + } + + if (iPlayerCount <= 1) { + return; } if (Round_IsRoundStarted()) { @@ -317,30 +360,111 @@ CheckWinConditions(pIgnorePlayer = 0) { } } +ShuffleTeams() { + new Array:irgPlayers = ArrayCreate(); + + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer)) { + continue; + } + + if (UTIL_IsPlayerSpectator(pPlayer)) { + continue; + } + + ArrayPushCell(irgPlayers, pPlayer); + } + + new iPlayerCount = ArraySize(irgPlayers); + for (new i = 0; i < iPlayerCount; ++i) { + ArraySwap(irgPlayers, i, random(iPlayerCount)); + } + + for (new i = 0; i < iPlayerCount; ++i) { + new pPlayer = ArrayGetCell(irgPlayers, i); + new iTeam = i % 2 ? ZP_HUMAN_TEAM : ZP_ZOMBIE_TEAM; + set_member(pPlayer, m_iTeam, iTeam); + } + + ArrayDestroy(irgPlayers); +} + DispatchWin(iTeam) { Round_DispatchWin(iTeam, ZP_NEW_ROUND_DELAY); } -public TaskJoin(pPlayer) { +/*--------------------------------[ Tasks ]--------------------------------*/ + +public Task_Join(pPlayer) { + if (!is_user_connected(pPlayer) || is_user_hltv(pPlayer)) { + return; + } + set_member(pPlayer, m_bTeamChanged, get_member(pPlayer, m_bTeamChanged) & ~BIT(8)); set_member(pPlayer, m_iTeam, 2); set_member(pPlayer, m_iJoiningState, 5); - ExecuteForward(g_fwPlayerJoined, g_fwResult, pPlayer); + ExecuteForward(g_pFwPlayerJoined, g_pFwResult, pPlayer); +} + +/*--------------------------------[ Team Menu ]--------------------------------*/ + +CreateTeamMenu() { + new iMenu = menu_create("What's your plan?", "TeamMenuHandler"); + menu_additem(iMenu, "I wanna shit my pants"); + menu_additem(iMenu, "Join Zombies"); + menu_addblank2(iMenu); + menu_addblank2(iMenu); + menu_addblank2(iMenu); + menu_additem(iMenu, "Spectate"); + menu_setprop(iMenu, MPROP_EXIT, MEXIT_NEVER); + + return iMenu; +} + +OpenTeamMenu(pPlayer) { + menu_display(pPlayer, g_iTeamMenu, 0); } public TeamMenuHandler(pPlayer, iMenu, iItem) { - if (iItem == 1) { - if (Round_IsRoundStarted()) { - if (!ZP_Player_IsZombie(pPlayer)) { - ExecuteHamB(Ham_Killed, pPlayer, pPlayer, 0); + switch (iItem) { + case 0: { + g_iPlayerTeamPreference[pPlayer] = TeamPreference_Human; + } + case 1: { + g_iPlayerTeamPreference[pPlayer] = TeamPreference_Zombie; + } + case 5: { + g_iPlayerTeamPreference[pPlayer] = TeamPreference_Spectator; + set_member(pPlayer, m_iTeam, 3); + + if (is_user_alive(pPlayer)) { + ExecuteHam(Ham_Killed, pPlayer, pPlayer, 0); } - } else { - g_bPlayerPreferZombies[pPlayer] = true; } } - menu_destroy(iMenu); + if (Round_IsRoundStarted()) { + switch (iItem) { + case 0: { + if (get_member(pPlayer, m_iTeam) == 3) { + ZP_GameRules_RespawnAsZombie(pPlayer); + } + } + case 1: { + if (!ZP_Player_IsZombie(pPlayer)) { + if (get_member(pPlayer, m_iTeam) == 3) { + ZP_GameRules_RespawnAsZombie(pPlayer); + } else { + ExecuteHamB(Ham_Killed, pPlayer, pPlayer, 0); + } + } + } + case 5: { + CheckWinConditions(); + } + } + } return PLUGIN_HANDLED; } diff --git a/src/scripts/core/zp_human.sma b/src/scripts/core/zp_human.sma deleted file mode 100644 index d1e33cc..0000000 --- a/src/scripts/core/zp_human.sma +++ /dev/null @@ -1,31 +0,0 @@ -#pragma semicolon 1 - -#include -#include -#include - -#include - -#define PLUGIN "[Zombie Panic] Human" -#define AUTHOR "Hedgehog Fog" - -public plugin_precache() { - for (new i = 0; i < sizeof(ZP_HUMAN_DEATH_SOUNDS); ++i) { - precache_sound(ZP_HUMAN_DEATH_SOUNDS[i]); - } -} - -public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); -} - -public OnPlayerKilled_Post(pPlayer) { - if (ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } - - emit_sound(pPlayer, CHAN_VOICE, ZP_HUMAN_DEATH_SOUNDS[random(sizeof(ZP_HUMAN_DEATH_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - - return HAM_HANDLED; -} diff --git a/src/scripts/core/zp_item_spawn_points.sma b/src/scripts/core/zp_item_spawn_points.sma deleted file mode 100644 index 7ecc8de..0000000 --- a/src/scripts/core/zp_item_spawn_points.sma +++ /dev/null @@ -1,167 +0,0 @@ -// #include -// #include -// #include -// #include -// // #include - -// #define PLUGIN "[ZI]Item Spawn Point Manager" -// #define VERSION "0.0.1" -// #define AUTHOR "Zombie Invasion" - -// #define CVAR_ZI_ISPM_ENABLE "zi_ispm" -// #define ZI_ISMP_AUTOSAVE_TIME 5.0 - -// new g_iSprPoint, -// Float:g_rgvecPoints[256][3], -// g_rgvecPoints_count = 0; - -// static map[32], config[32], filepath[64]; - -// public plugin_precache() -// { -// g_iSprPoint = precache_model("sprites/iunknown.spr"); -// } - -public plugin_init() -{ -// register_plugin(PLUGIN, VERSION, AUTHOR); -// log_amx("%s %s by %s Loaded", PLUGIN, VERSION, AUTHOR); - -// register_cvar(CVAR_ZI_ISPM_ENABLE, "1"); - -// register_clcmd("ispw", "clcmd_ispw"); -// register_clcmd("say ispw", "clcmd_ispw"); -// register_clcmd("ispr", "clcmd_ispr"); -// register_clcmd("say ispr", "clcmd_ispr"); - -// RegisterHam(Ham_Player_PreThink, "player", "ham_player_pre_think"); - -// get_mapname(map, charsmax(map)); -// get_configsdir(config, charsmax(config)); -// format(filepath, 63, "%s\items\%s_items.cfg", config, map); -// zi_cfg_load_points(filepath, g_rgvecPoints, g_rgvecPoints_count); - -// set_task(ZI_ISMP_AUTOSAVE_TIME, "timer_isp_autosave", 0, _, _, "b"); -} - -// public clcmd_ispw(id) -// { -// if(!get_cvar_num(CVAR_ZI_ISPM_ENABLE)) -// return 1; - -// if(!is_user_connected(id)) -// return 1; - -// new Float:fOrigin[3]; -// pev(id, pev_origin, fOrigin); - -// fOrigin[2] -= 16.0; - -// for(new i = 0; i < 3; i++) { -// g_rgvecPoints[g_rgvecPoints_count][i] = fOrigin[i]; -// } - -// g_rgvecPoints_count++; - -// client_print(id, print_chat, "Write point %f %f %f", fOrigin[0], fOrigin[1], fOrigin[2]); - -// return 0; -// } - -// public clcmd_ispr(id) -// { -// if(!get_cvar_num(CVAR_ZI_ISPM_ENABLE)) -// return 1; - -// if(!is_user_connected(id)) -// return 1; - -// if(g_rgvecPoints_count < 1) -// return 1; - -// new -// Float:fOrigin[3], -// Float:dif, -// bool:pass; - -// pev(id, pev_origin, fOrigin); -// fOrigin[2] -= 16.0; - -// for(new i = 0; i < g_rgvecPoints_count; i++) -// { -// for(new j = 0; j < 3; j++) -// { -// dif = g_rgvecPoints[i][j] - fOrigin[j]; - -// if(-32.0 <= dif <= 32.0) -// pass = true; -// else -// pass = false; - -// if(!pass) -// break; -// } - -// if(pass) -// { -// for(new j = 0; j < 3; j++) -// { -// if(i < g_rgvecPoints_count) -// g_rgvecPoints[i][j] = g_rgvecPoints[g_rgvecPoints_count-1][j]; -// } - -// g_rgvecPoints_count--; -// client_print(id, print_chat, "Remove point %f %f %f", fOrigin[0], fOrigin[1], fOrigin[2]); - -// pass = false; -// break; -// } -// } - -// return 0; -// } - -// public ham_player_pre_think(id) -// { -// if(!get_cvar_num(CVAR_ZI_ISPM_ENABLE)) -// return HAM_IGNORED; - -// if(!is_user_connected(id)) { -// return HAM_IGNORED; -// } - -// if(g_rgvecPoints_count < 1) { -// return HAM_IGNORED; -// } - -// for(new i = 0; i < g_rgvecPoints_count; i++) { -// engfunc(EngFunc_MessageBegin, MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, g_rgvecPoints[i], id); -// write_byte(TE_SPRITE); -// engfunc(EngFunc_WriteCoord, g_rgvecPoints[i][0]); -// engfunc(EngFunc_WriteCoord, g_rgvecPoints[i][1]); -// engfunc(EngFunc_WriteCoord, g_rgvecPoints[i][2]); -// write_short(g_iSprPoint); -// write_byte(10); -// write_byte(20); -// message_end(); -// } - -// return HAM_HANDLED; -// } - -// // public timer_isp_autosave() -// // { -// // if(!get_cvar_num(CVAR_ZI_ISPM_ENABLE)) -// // return 1; - -// // if(file_exists(filepath)) -// // delete_file(filepath); - -// // if(!g_rgvecPoints_count) -// // return 1; - -// // for(new i = 0; i < g_rgvecPoints_count; i++) -// // zi_cfg_write_point(filepath, g_rgvecPoints[i]); - -// // return 0; -// // } \ No newline at end of file diff --git a/src/scripts/core/zp_knockback.sma b/src/scripts/core/zp_knockback.sma index bb814e2..f8efb97 100644 --- a/src/scripts/core/zp_knockback.sma +++ b/src/scripts/core/zp_knockback.sma @@ -13,14 +13,15 @@ new Float:g_rgflPlayerVelocity[MAX_PLAYERS + 1][3]; public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + RegisterHam(Ham_TakeDamage, "player", "OnPlayerTraceAttack", .Post = 0); RegisterHam(Ham_TakeDamage, "player", "OnPlayerTraceAttack_Post", .Post = 1); } public OnPlayerTraceAttack(pPlayer) { - pev(pPlayer, pev_velocity, g_rgflPlayerVelocity[pPlayer]); + pev(pPlayer, pev_velocity, g_rgflPlayerVelocity[pPlayer]); } public OnPlayerTraceAttack_Post(pPlayer) { - set_pev(pPlayer, pev_velocity, g_rgflPlayerVelocity[pPlayer]); // reset knockback + set_pev(pPlayer, pev_velocity, g_rgflPlayerVelocity[pPlayer]); // reset knockback } diff --git a/src/scripts/core/zp_mapinfo.sma b/src/scripts/core/zp_mapinfo.sma new file mode 100644 index 0000000..a3dc4d6 --- /dev/null +++ b/src/scripts/core/zp_mapinfo.sma @@ -0,0 +1,58 @@ +#pragma semicolon 1 + +#include + +#include + +#define MOTD_STYLES "" + +#define PLUGIN "[Zombie Panic] Map Info" +#define AUTHOR "Hedgehog Fog" + +new g_szMotdTitle[32]; +new g_szMotdData[MAX_MOTD_LENGTH]; + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + BuildMotd(); +} + +public plugin_natives() { + register_native("ZP_ShowMapInfo", "Native_Show"); +} + +public Native_Show(iPluginId, iArgc) { + new pPlayer = get_param(1); + ShowMotd(pPlayer); +} + +ShowMotd(pPlayer) { + if (g_szMotdData[0] == '^0') { + return; + } + + show_motd(pPlayer, g_szMotdData, g_szMotdTitle); +} + +BuildMotd() { + static szMap[32]; + get_mapname(szMap, charsmax(szMap)); + + static szFile[48]; + format(szFile, charsmax(szMap), "maps/%s.txt", szMap); + + if (!file_exists(szFile)) { + return; + } + + copy(g_szMotdData, charsmax(g_szMotdData), MOTD_STYLES); + + new iLine = 0; + static szLine[128]; + while (read_file(szFile, iLine++, szLine, charsmax(szLine)) != 0) { + format(g_szMotdData, charsmax(g_szMotdData), "%s
%s", g_szMotdData, szLine); + } + + copy(g_szMotdTitle, charsmax(g_szMotdTitle), szMap); +} diff --git a/src/scripts/core/zp_music.sma b/src/scripts/core/zp_music.sma index 141e6b3..3027546 100644 --- a/src/scripts/core/zp_music.sma +++ b/src/scripts/core/zp_music.sma @@ -1,22 +1,69 @@ #pragma semicolon 1 -#include "amxmodx" +#include +#include #include #define PLUGIN "[Zombie Panic] Music" #define AUTHOR "Hedgehog Fog" +#define TASKID_PLAY_NEXT_TRACK 100 + +#define MUSIC_DELAY 5.0 + +new bool:g_bPlayerMusic[MAX_PLAYERS + 1]; + +new g_pCvarMusic; +new g_pCvarJoinMusic; + public plugin_precache() { - precache_generic(ZP_STARTUP_SOUND); + precache_generic(ZP_STARTUP_SOUND); + + for (new i = 0; i < sizeof(ZP_MUSIC_LIST); ++i) { + precache_generic(ZP_MUSIC_LIST[i][ZP_Music_Path]); + } } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + + g_pCvarMusic = register_cvar("zp_music", "1"); + g_pCvarJoinMusic = register_cvar("zp_join_music", "1"); } -public client_connect(id) { - static szCommand[64]; - format(szCommand, charsmax(szCommand), "mp3 loop ^"%s^"", ZP_STARTUP_SOUND); - client_cmd(id, szCommand); +public client_connect(pPlayer) { + g_bPlayerMusic[pPlayer] = false; + + if (get_pcvar_num(g_pCvarJoinMusic) > 0) { + PlayMusic(pPlayer, ZP_STARTUP_SOUND, true); + } +} + +public OnPlayerSpawn_Post(pPlayer) { + if (get_pcvar_num(g_pCvarMusic)) { + if (!g_bPlayerMusic[pPlayer]) { + set_task(MUSIC_DELAY, "Task_Play", TASKID_PLAY_NEXT_TRACK + pPlayer); + g_bPlayerMusic[pPlayer] = true; + } + } else { + remove_task(TASKID_PLAY_NEXT_TRACK + pPlayer); + g_bPlayerMusic[pPlayer] = false; + } +} + +PlayMusic(pPlayer, const szPath[], bool:bLoop) { + static szCommand[64]; + format(szCommand, charsmax(szCommand), "mp3 %s ^"%s^"", bLoop ? "loop" : "play", szPath); + client_cmd(pPlayer, szCommand); +} + +public Task_Play(iTaskId) { + new pPlayer = iTaskId - TASKID_PLAY_NEXT_TRACK; + + new iIndex = random(sizeof(ZP_MUSIC_LIST)); + PlayMusic(pPlayer, ZP_MUSIC_LIST[iIndex][ZP_Music_Path], false); + set_task(MUSIC_DELAY + (ZP_MUSIC_LIST[iIndex][ZP_Music_Duration] * 60.0), "Task_Play", TASKID_PLAY_NEXT_TRACK + pPlayer); } diff --git a/src/scripts/core/zp_painshock.sma b/src/scripts/core/zp_painshock.sma index eda85e2..fbcf0df 100644 --- a/src/scripts/core/zp_painshock.sma +++ b/src/scripts/core/zp_painshock.sma @@ -11,10 +11,12 @@ public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage_Post", .Post = 1); } public OnPlayerTakeDamage_Post(pPlayer) { - set_member(pPlayer, m_flVelocityModifier, 1.0); - return HAM_HANDLED; + set_member(pPlayer, m_flVelocityModifier, 1.0); + + return HAM_HANDLED; } diff --git a/src/scripts/core/zp_panic.sma b/src/scripts/core/zp_panic.sma index 9827732..9a7bf87 100644 --- a/src/scripts/core/zp_panic.sma +++ b/src/scripts/core/zp_panic.sma @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -10,76 +11,94 @@ #define AUTHOR "Hedgehog Fog" #define PANIC_DURATION 5.0 -#define PANIC_DELAY 60.0 +#define PANIC_DELAY 55.0 + +new gmsgScreenShake; new bool:g_bPlayerPanic[MAX_PLAYERS + 1]; new Float:g_flPlayerLastPanic[MAX_PLAYERS + 1]; -public plugin_precache() { - for (new i = 0; i < sizeof(ZP_PANIC_SOUNDS); ++i) { - precache_sound(ZP_PANIC_SOUNDS[i]); - } -} +new g_pFwPanic; +new g_pFwResult; public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + gmsgScreenShake = get_user_msgid("ScreenShake"); + + RegisterHam(Ham_Touch, "weaponbox", "OnItemTouch", .Post = 0); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); - RegisterHam(Ham_Touch, "weaponbox", "OnItemTouch", .Post = 0); - RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + g_pFwPanic = CreateMultiForward("ZP_Fw_PlayerPanic", ET_IGNORE, FP_CELL); } public plugin_natives() { - register_native("ZP_Player_Panic", "Native_Panic"); - register_native("ZP_Player_InPanic", "Native_InPanic"); + register_native("ZP_Player_Panic", "Native_Panic"); + register_native("ZP_Player_InPanic", "Native_InPanic"); } public bool:Native_Panic(iPluginId, iArgc) { - new pPlayer = get_param(1); + new pPlayer = get_param(1); - return Panic(pPlayer); + return Panic(pPlayer); } public bool:Native_InPanic(iPluginId, iArgc) { - new pPlayer = get_param(1); + new pPlayer = get_param(1); - return g_bPlayerPanic[pPlayer]; + return g_bPlayerPanic[pPlayer]; } public OnItemTouch(pItem, pToucher) { - if (!UTIL_IsPlayer(pToucher)) { - return HAM_IGNORED; - } + if (!UTIL_IsPlayer(pToucher)) { + return HAM_IGNORED; + } - if (!g_bPlayerPanic[pToucher]) { - return HAM_IGNORED; - } + if (!g_bPlayerPanic[pToucher]) { + return HAM_IGNORED; + } - return HAM_SUPERCEDE; + return HAM_SUPERCEDE; } public OnPlayerSpawn_Post(pPlayer) { - g_flPlayerLastPanic[pPlayer] = -PANIC_DELAY; + g_flPlayerLastPanic[pPlayer] = -PANIC_DELAY; } bool:Panic(pPlayer) { - if (get_gametime() - g_flPlayerLastPanic[pPlayer] < PANIC_DELAY) { - return false; - } - - ZP_Player_DropBackpack(pPlayer); - emit_sound(pPlayer, CHAN_VOICE, ZP_PANIC_SOUNDS[random(sizeof(ZP_PANIC_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - g_bPlayerPanic[pPlayer] = true; - - set_task(PANIC_DURATION, "TaskEndPanic", pPlayer); - ZP_Player_UpdateSpeed(pPlayer); - - return true; + if (g_bPlayerPanic[pPlayer]) { + return false; + } + + if (get_member_game(m_bFreezePeriod)) { + return false; + } + + if (get_gametime() - g_flPlayerLastPanic[pPlayer] < PANIC_DELAY) { + return false; + } + + g_bPlayerPanic[pPlayer] = true; + ZP_Player_DropUnactiveWeapons(pPlayer); + ZP_Player_DropUnactiveAmmo(pPlayer); + // ZP_Player_UpdateSpeed(pPlayer); + + emessage_begin(MSG_ONE, gmsgScreenShake, _, pPlayer); + ewrite_short(floatround(1.5 * (1<<12))); + ewrite_short(floatround(1.0 * (1<<12))); + ewrite_short(floatround(1.0 * (1<<12))); + emessage_end(); + + set_task(PANIC_DURATION, "Task_EndPanic", pPlayer); + + ExecuteForward(g_pFwPanic, g_pFwResult, pPlayer); + + return true; } -public TaskEndPanic(iTaskId) { - new pPlayer = iTaskId; - - g_bPlayerPanic[pPlayer] = false; - g_flPlayerLastPanic[pPlayer] = get_gametime(); - ZP_Player_UpdateSpeed(pPlayer); +public Task_EndPanic(iTaskId) { + new pPlayer = iTaskId; + g_bPlayerPanic[pPlayer] = false; + g_flPlayerLastPanic[pPlayer] = get_gametime(); + ZP_Player_UpdateSpeed(pPlayer); } diff --git a/src/scripts/core/zp_player_equipment.sma b/src/scripts/core/zp_player_equipment.sma index db4e030..f9f7bac 100644 --- a/src/scripts/core/zp_player_equipment.sma +++ b/src/scripts/core/zp_player_equipment.sma @@ -2,14 +2,18 @@ #include #include +#include #include #include +#include #include #define PLUGIN "[Zombie Panic] Player Equipment" #define AUTHOR "Hedgehog Fog" +#define PLAYER_IDLE_ANIMEXT "c4" + public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); @@ -17,23 +21,26 @@ public plugin_init() { } public OnPlayerSpawnEquip(pPlayer) { - rg_remove_all_items(pPlayer); + rg_remove_all_items(pPlayer); + + set_member(pPlayer, m_szAnimExtention, PLAYER_IDLE_ANIMEXT); - if (ZP_Player_IsZombie(pPlayer)) { - set_pev(pPlayer, pev_max_health, ZP_ZOMBIE_HEALTH); - CW_GiveWeapon(pPlayer, ZP_WEAPON_SWIPE); - } else { - set_pev(pPlayer, pev_max_health, 100.0); - CW_GiveWeapon(pPlayer, ZP_WEAPON_CROWBAR); - CW_GiveWeapon(pPlayer, ZP_WEAPON_PISTOL); - } + new Float:flMaxHealth = ZP_Player_IsZombie(pPlayer) ? ZP_ZOMBIE_HEALTH : 100.0; + set_pev(pPlayer, pev_max_health, flMaxHealth); + set_pev(pPlayer, pev_health, flMaxHealth); + set_pev(pPlayer, pev_armorvalue, 0.0); + set_member(pPlayer, m_iKevlar, 0); - new Float:flMaxHealth; - pev(pPlayer, pev_max_health, flMaxHealth); + if (Round_IsRoundStarted()) { + strip_user_weapons(pPlayer); - set_pev(pPlayer, pev_health, flMaxHealth); - set_pev(pPlayer, pev_armorvalue, 0.0); - set_member(pPlayer, m_iKevlar, 0); + if (ZP_Player_IsZombie(pPlayer)) { + CW_GiveWeapon(pPlayer, ZP_WEAPON_SWIPE); + } else { + CW_GiveWeapon(pPlayer, ZP_WEAPON_CROWBAR); + CW_GiveWeapon(pPlayer, ZP_WEAPON_PISTOL); + } + } - return HC_SUPERCEDE; + return HC_SUPERCEDE; } diff --git a/src/scripts/core/zp_player_inventory.sma b/src/scripts/core/zp_player_inventory.sma index 640d1a7..3017be4 100644 --- a/src/scripts/core/zp_player_inventory.sma +++ b/src/scripts/core/zp_player_inventory.sma @@ -13,428 +13,420 @@ #define PLUGIN "[Zombie Panic] Player Inventory" #define AUTHOR "Hedgehog Fog" -#define AMMO_COUNT 15 - -new const g_rgszAmmoName[AMMO_COUNT][] = { - "", - "338Magnum", - "762Nato", - "556NatoBox", - "556Nato", - "buckshot", - "45ACP", - "57mm", - "50AE", - "357SIG", - "9mm", - "Flashbang", - "HEGrenade", - "SmokeGrenade", - "C4" -}; - new g_pPlayerSelectedAmmo[MAX_PLAYERS + 1]; new g_iszWeaponBox; public plugin_precache() { - precache_model(ZP_WEAPONBOX_MODEL); + precache_model(ZP_WEAPONBOX_MODEL); - g_iszWeaponBox = engfunc(EngFunc_AllocString, "weaponbox"); + g_iszWeaponBox = engfunc(EngFunc_AllocString, "weaponbox"); } public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); RegisterHam(Ham_Killed, "player", "OnPlayerKilled", .Post = 0); } public plugin_natives() { - register_native("ZP_Player_DropBackpack", "Native_DropBackpack"); - register_native("ZP_Player_GetAmmo", "Native_GetAmmo"); - register_native("ZP_Player_SetAmmo", "Native_SetAmmo"); - register_native("ZP_Player_AddAmmo", "Native_AddAmmo"); - register_native("ZP_Player_DropAmmo", "Native_DropAmmo"); - register_native("ZP_Player_NextAmmo", "Native_NextAmmo"); + register_native("ZP_Player_DropUnactiveWeapons", "Native_DropUnactiveWeapons"); + register_native("ZP_Player_DropUnactiveAmmo", "Native_DropUnactiveAmmo"); + register_native("ZP_Player_GetAmmo", "Native_GetAmmo"); + register_native("ZP_Player_SetAmmo", "Native_SetAmmo"); + register_native("ZP_Player_AddAmmo", "Native_AddAmmo"); + register_native("ZP_Player_DropAmmo", "Native_DropAmmo"); + register_native("ZP_Player_NextAmmo", "Native_NextAmmo"); } public Native_DropAmmo(iPluginId, iArgc) { - new pPlayer = get_param(1); - DropPlayerSelectedAmmo(pPlayer); + new pPlayer = get_param(1); + DropPlayerSelectedAmmo(pPlayer); } public Native_NextAmmo(iPluginId, iArgc) { - new pPlayer = get_param(1); - SelectNextPlayerAmmo(pPlayer); + new pPlayer = get_param(1); + SelectNextPlayerAmmo(pPlayer); } -public Native_DropBackpack(iPluginId, iArgc) { - new pPlayer = get_param(1); +public Native_DropUnactiveWeapons(iPluginid, iArgc) { + new pPlayer = get_param(1); + + DropPlayerUnactiveWeapons(pPlayer); +} +public Native_DropUnactiveAmmo(iPluginid, iArgc) { + new pPlayer = get_param(1); - DropBackpack(pPlayer); + DropPlayerAmmo(pPlayer, true); } public Native_GetAmmo(iPluginId, iArgc) { - new pPlayer = get_param(1); - static szAmmo[16]; - get_string(2, szAmmo, charsmax(szAmmo)); - - return GetAmmo(pPlayer, szAmmo); + new pPlayer = get_param(1); + static szAmmo[16]; + get_string(2, szAmmo, charsmax(szAmmo)); + + return GetAmmo(pPlayer, szAmmo); } public bool:Native_SetAmmo(iPluginId, iArgc) { - new pPlayer = get_param(1); - static szAmmo[16]; - get_string(2, szAmmo, charsmax(szAmmo)); - new iValue = get_param(3); + new pPlayer = get_param(1); + static szAmmo[16]; + get_string(2, szAmmo, charsmax(szAmmo)); + new iValue = get_param(3); - return SetAmmo(pPlayer, szAmmo, iValue); + return SetAmmo(pPlayer, szAmmo, iValue); } public Native_AddAmmo(iPluginId, iArgc) { - new pPlayer = get_param(1); - static szAmmo[16]; - get_string(2, szAmmo, charsmax(szAmmo)); - new iValue = get_param(3); + new pPlayer = get_param(1); + static szAmmo[16]; + get_string(2, szAmmo, charsmax(szAmmo)); + new iValue = get_param(3); - return AddAmmo(pPlayer, szAmmo, iValue); + return AddAmmo(pPlayer, szAmmo, iValue); } public OnPlayerKilled(pPlayer) { - // for (new iSlot = 0; iSlot < 6; ++iSlot) { - // new pItem = get_pdata_cbase(pPlayer, m_rgpPlayerItems + iSlot, 5); - - // while (pItem != -1) { - // new iId = get_pdata_int(pItem, m_iId, 4); - // log_amx("(%d) Slot %d Weapon %d Id %d", pPlayer, iSlot, pItem, iId); - // pItem = get_pdata_cbase(pItem, m_pNext, 4); - // } - // } - - // for (new iAmmoId = 0; iAmmoId < AMMO_COUNT; ++iAmmoId) { - // new iBpAmmo = get_pdata_int(pPlayer, m_rgAmmo + iAmmoId, 5); - // log_amx("(%d) Ammo %d Count %d", pPlayer, iAmmoId, iBpAmmo); - // } - - DropBackpack(pPlayer); + DropPlayerUnactiveWeapons(pPlayer); + DropPlayerAmmo(pPlayer); } -DropBackpack(pPlayer) { - new pActiveItem = get_member(pPlayer, m_pActiveItem); - new iActiveSlot; - - if (pActiveItem != -1) { - // remove active item from player's inventory - TakePlayerItem(pPlayer, pActiveItem, iActiveSlot); - } - - // drop unactive items - new iWeaponBox = DropPlayerWeaponBox(pPlayer); - // new pItemsCount = PackPlayerItems(pPlayer, iWeaponBox); - DropPlayerItems(pPlayer); - new iAmmoTypesCount = PackPlayerAmmo(pPlayer, iWeaponBox); - - if (iAmmoTypesCount) { - engfunc(EngFunc_SetModel, iWeaponBox, ZP_WEAPONBOX_MODEL); - } else { - engfunc(EngFunc_RemoveEntity, iWeaponBox); - } - - if (pActiveItem != -1) { - // return the active item to player's inventory for the default drop logic - set_member(pActiveItem, m_pPlayer, pPlayer); - set_member(pPlayer, m_pActiveItem, pActiveItem); - set_member(pPlayer, m_rgpPlayerItems, pActiveItem, iActiveSlot); - } - - ZP_Player_UpdateSpeed(pPlayer); +public OnPlayerSpawn_Post(pPlayer) { + g_pPlayerSelectedAmmo[pPlayer] = 0; + SelectNextPlayerAmmo(pPlayer, false); } -DropPlayerWeaponBox(pPlayer) { - new iWeaponBox = engfunc(EngFunc_CreateNamedEntity, g_iszWeaponBox); - dllfunc(DLLFunc_Spawn, iWeaponBox); +DropPlayerAmmo(pPlayer, bool:bUnactiveOnly = false) { + new pWeaponBox = DropPlayerWeaponBox(pPlayer); + new iAmmoTypesCount = PackPlayerAmmo(pPlayer, pWeaponBox, bUnactiveOnly); - ThrowPlayerItem(pPlayer, iWeaponBox); + if (!iAmmoTypesCount) { + engfunc(EngFunc_RemoveEntity, pWeaponBox); + return; + } - return iWeaponBox; -} + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPONBOX_MODEL); -ThrowPlayerItem(pPlayer, pEntity) { - static Float:vecAngles[3]; - pev(pPlayer, pev_angles, vecAngles); - vecAngles[0] = 0.0; - vecAngles[2] = 0.0; - set_pev(pEntity, pev_angles, vecAngles); - - static Float:vecOrigin[3]; - pev(pPlayer, pev_origin, vecOrigin); - engfunc(EngFunc_SetOrigin, pEntity, vecOrigin); + static Float:vecThrowAngle[3]; + pev(pPlayer, pev_v_angle, vecThrowAngle); + engfunc(EngFunc_MakeVectors, vecThrowAngle); + + static Float:vecVelocity[3]; + get_global_vector(GL_v_forward, vecVelocity); + xs_vec_mul_scalar(vecVelocity, -125.0, vecVelocity); + set_pev(pWeaponBox, pev_velocity, vecVelocity); + + static Float:vecAngles[3]; + vector_to_angle(vecVelocity, vecAngles); + vecAngles[0] = 0.0; + vecAngles[1] = vecThrowAngle[1] - 180.0; + vecAngles[2] = 0.0; + + set_pev(pWeaponBox, pev_angles, vecAngles); + + ZP_Player_UpdateSpeed(pPlayer); } -TakePlayerItem(pPlayer, pItemToDrop, &_iSlot = 0) { - new pActiveItem = get_member(pPlayer, m_pActiveItem); +DropPlayerUnactiveWeapons(pPlayer) { + new pActiveItem = get_member(pPlayer, m_pActiveItem); + new iActiveSlot; - if (pItemToDrop == pActiveItem) { - set_member(pPlayer, m_pActiveItem, -1); - } + if (pActiveItem != -1) { + // remove active item from player's inventory + TakePlayerItem(pPlayer, pActiveItem, iActiveSlot); + } - for (new iSlot = 0; iSlot < 6; ++iSlot) { - new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); + DropPlayerItems(pPlayer); - new iPrevItem = -1; - while (pItem != -1) { - new iNextItem = get_member(pItem, m_pNext); + if (pActiveItem != -1) { + // return the active item to player's inventory for the default drop logic + set_member(pActiveItem, m_pPlayer, pPlayer); + set_member(pPlayer, m_pActiveItem, pActiveItem); + set_member(pPlayer, m_rgpPlayerItems, pActiveItem, iActiveSlot); + } - if (pItem == pItemToDrop) { - if (iPrevItem == -1) { - set_member(pPlayer, m_rgpPlayerItems, iNextItem, iSlot); - } else { - set_member(iPrevItem, m_pNext, iNextItem); - } + ZP_Player_UpdateSpeed(pPlayer); +} + +DropPlayerWeaponBox(pPlayer) { + new pWeaponBox = engfunc(EngFunc_CreateNamedEntity, g_iszWeaponBox); + dllfunc(DLLFunc_Spawn, pWeaponBox); + + ThrowPlayerItem(pPlayer, pWeaponBox); - set_member(pItem, m_pNext, -1); - set_member(pItem, m_pPlayer, -1); - _iSlot = iSlot; - return pItem; - } + return pWeaponBox; +} + +ThrowPlayerItem(pPlayer, pEntity) { + static Float:vecAngles[3]; + pev(pPlayer, pev_angles, vecAngles); + vecAngles[0] = 0.0; + vecAngles[2] = 0.0; + set_pev(pEntity, pev_angles, vecAngles); + + static Float:vecOrigin[3]; + pev(pPlayer, pev_origin, vecOrigin); + engfunc(EngFunc_SetOrigin, pEntity, vecOrigin); +} - iPrevItem = pItem; - pItem = iNextItem; +TakePlayerItem(pPlayer, pItemToDrop, &_iSlot = 0) { + new pActiveItem = get_member(pPlayer, m_pActiveItem); + + if (pItemToDrop == pActiveItem) { + set_member(pPlayer, m_pActiveItem, -1); } - } - ZP_Player_UpdateSpeed(pPlayer); + for (new iSlot = 0; iSlot < 6; ++iSlot) { + new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); + + new pPrevItem = -1; + while (pItem != -1) { + new pNextItem = get_member(pItem, m_pNext); + + if (pItem == pItemToDrop) { + if (pPrevItem == -1) { + set_member(pPlayer, m_rgpPlayerItems, pNextItem, iSlot); + } else { + set_member(pPrevItem, m_pNext, pNextItem); + } + + set_member(pItem, m_pNext, -1); + set_member(pItem, m_pPlayer, -1); + _iSlot = iSlot; + ZP_Player_UpdateSpeed(pPlayer); + return pItem; + } + + pPrevItem = pItem; + pItem = pNextItem; + } + } - return -1; + return -1; } DropPlayerItems(pPlayer) { - set_member(pPlayer, m_pActiveItem, -1); + set_member(pPlayer, m_pActiveItem, -1); - for (new iSlot = 0; iSlot < 6; ++iSlot) { - new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); - - set_member(pPlayer, m_rgpPlayerItems, -1, iSlot); - - while (pItem != -1) { - new iNextItem = get_member(pItem, m_pNext); - - if (ExecuteHamB(Ham_CS_Item_CanDrop, pItem)) { - new iClip = get_member(pItem, m_Weapon_iClip); - new iPrimaryAmmoType = get_member(pItem, m_Weapon_iPrimaryAmmoType); - - if (iClip == -1 && iPrimaryAmmoType > 0) { - new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType); - if (iPrimaryAmmoAmount > 0) { - new iWeaponBox = DropPlayerItem(pPlayer, pItem, iSlot); - set_member(iWeaponBox, m_WeaponBox_rgAmmo, iPrimaryAmmoAmount, iPrimaryAmmoType); - set_member(iWeaponBox, m_WeaponBox_rgiszAmmo, g_rgszAmmoName[iPrimaryAmmoType], iPrimaryAmmoType); - set_member(iWeaponBox, m_WeaponBox_cAmmoTypes, 1); - set_member(pPlayer, m_rgAmmo, 0, iPrimaryAmmoType); - } - } else { - DropPlayerItem(pPlayer, pItem, iSlot); - } - } else { - get_member(pPlayer, m_rgpPlayerItems, iSlot); + for (new iSlot = 0; iSlot < 6; ++iSlot) { + new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); - new pPlayerItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); - if (pPlayerItem != -1) { - set_member(pPlayerItem, m_pNext, pItem); - } else { - set_member(pPlayer, m_rgpPlayerItems, pItem, iSlot); + set_member(pPlayer, m_rgpPlayerItems, -1, iSlot); + + while (pItem != -1) { + new iNextItem = get_member(pItem, m_pNext); + + if (ExecuteHamB(Ham_CS_Item_CanDrop, pItem)) { + new iClip = get_member(pItem, m_Weapon_iClip); + new iPrimaryAmmoType = get_member(pItem, m_Weapon_iPrimaryAmmoType); + + if (iClip == -1 && iPrimaryAmmoType > 0) { + new iPrimaryAmmoAmount = get_member(pPlayer, m_rgAmmo, iPrimaryAmmoType); + if (iPrimaryAmmoAmount > 0) { + new pWeaponBox = DropPlayerItem(pPlayer, pItem, iSlot); + set_member(pWeaponBox, m_WeaponBox_rgAmmo, iPrimaryAmmoAmount, iPrimaryAmmoType); + set_member(pWeaponBox, m_WeaponBox_rgiszAmmo, AMMO_LIST[iPrimaryAmmoType], iPrimaryAmmoType); + set_member(pWeaponBox, m_WeaponBox_cAmmoTypes, 1); + set_member(pPlayer, m_rgAmmo, 0, iPrimaryAmmoType); + } + } else { + DropPlayerItem(pPlayer, pItem, iSlot); + } + } else { + get_member(pPlayer, m_rgpPlayerItems, iSlot); + + new pPlayerItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); + if (pPlayerItem != -1) { + set_member(pPlayerItem, m_pNext, pItem); + } else { + set_member(pPlayer, m_rgpPlayerItems, pItem, iSlot); + } + } + + pItem = iNextItem; } - } - - pItem = iNextItem; } - } - ZP_Player_UpdateSpeed(pPlayer); + set_member(pPlayer, m_pLastItem, -1); + + ZP_Player_UpdateSpeed(pPlayer); } DropPlayerItem(pPlayer, pItem, iSlot) { - new iWeaponBox = DropPlayerWeaponBox(pPlayer); + new pWeaponBox = DropPlayerWeaponBox(pPlayer); - set_pev(pItem, pev_spawnflags, pev(pItem, pev_spawnflags) | SF_NORESPAWN); - set_pev(pItem, pev_effects, EF_NODRAW); - set_pev(pItem, pev_movetype, MOVETYPE_NONE); - set_pev(pItem, pev_solid, SOLID_NOT); - set_pev(pItem, pev_model, 0); - set_pev(pItem, pev_modelindex, 0); - set_pev(pItem, pev_owner, iWeaponBox); + set_pev(pItem, pev_spawnflags, pev(pItem, pev_spawnflags) | SF_NORESPAWN); + set_pev(pItem, pev_effects, EF_NODRAW); + set_pev(pItem, pev_movetype, MOVETYPE_NONE); + set_pev(pItem, pev_solid, SOLID_NOT); + set_pev(pItem, pev_model, 0); + set_pev(pItem, pev_modelindex, 0); + set_pev(pItem, pev_owner, pWeaponBox); - new iWeaponId = get_member(pItem, m_iId); - set_pev(pPlayer, pev_weapons, pev(pPlayer, pev_weapons) &~ (1< 0) { -// set_member(iPrevItem, m_pNext, pItem); -// } - -// iPrevItem = pItem; -// set_member(pPlayer, m_rgpPlayerItems, -1, iSlot); -// pItemCount++; -// } - -// set_member(pItem, m_pNext, -1); -// pItem = iNextItem; -// } - -// if (iFirstItem > 0) { -// set_member(iWeaponBox, m_WeaponBox_rgpPlayerItems, iFirstItem, iSlot); -// } -// } +PackPlayerAmmo(pPlayer, pWeaponBox, bool:bUnactiveOnly = false) { + new iWeaponBoxAmmoIndex = 0; -// return pItemCount; -// } + new iSize = sizeof(AMMO_LIST); + for (new iAmmoId = 0; iAmmoId < iSize; ++iAmmoId) { + if (bUnactiveOnly) { + new bool:bSkip = false; -PackPlayerAmmo(pPlayer, iWeaponBox) { - new iWeaponBoxAmmoIndex = 0; - for (new iAmmoId = 0; iAmmoId < AMMO_COUNT; ++iAmmoId) { - new iBpAmmo = get_member(pPlayer, m_rgAmmo, iAmmoId); + for (new iSlot = 0; iSlot < 6; ++iSlot) { + new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); + + while (pItem != -1) { + if (iAmmoId == get_member(pItem, m_Weapon_iPrimaryAmmoType)) { + bSkip = true; + break; + } - if (iBpAmmo > 0) { - set_member(iWeaponBox, m_WeaponBox_rgiszAmmo, g_rgszAmmoName[iAmmoId], iWeaponBoxAmmoIndex); - set_member(iWeaponBox, m_WeaponBox_rgAmmo, iBpAmmo, iWeaponBoxAmmoIndex); - set_member(pPlayer, m_rgAmmo, 0, iAmmoId); - iWeaponBoxAmmoIndex++; + pItem = get_member(pItem, m_pNext); + } + } + + if (bSkip) { + continue; + } + } + + new iBpAmmo = get_member(pPlayer, m_rgAmmo, iAmmoId); + + if (iBpAmmo > 0) { + set_member(pWeaponBox, m_WeaponBox_rgiszAmmo, AMMO_LIST[iAmmoId], iWeaponBoxAmmoIndex); + set_member(pWeaponBox, m_WeaponBox_rgAmmo, iBpAmmo, iWeaponBoxAmmoIndex); + set_member(pPlayer, m_rgAmmo, 0, iAmmoId); + iWeaponBoxAmmoIndex++; + } } - } - return iWeaponBoxAmmoIndex; + return iWeaponBoxAmmoIndex; } -SelectNextPlayerAmmo(pPlayer) { - new iAmmoIndex = g_pPlayerSelectedAmmo[pPlayer]; - do { - iAmmoIndex++; +SelectNextPlayerAmmo(pPlayer, bool:bShowMessage = true) { + new iAmmoId; + new iAmmoIndex = g_pPlayerSelectedAmmo[pPlayer]; - if (iAmmoIndex >= ZP_Ammo_GetCount()) { - iAmmoIndex = 0; + do { + iAmmoIndex++; + + if (iAmmoIndex >= ZP_Ammo_GetCount()) { + iAmmoIndex = 0; + } + + iAmmoId = ZP_Ammo_GetId(iAmmoIndex); + + if (ZP_Ammo_GetPackSize(iAmmoIndex) != -1 && get_member(pPlayer, m_rgAmmo, iAmmoId) > 0) { + break; + } + } while (iAmmoIndex != g_pPlayerSelectedAmmo[pPlayer]); + + new iAmmoAmount = get_member(pPlayer, m_rgAmmo, iAmmoId); + if (g_pPlayerSelectedAmmo[pPlayer] == iAmmoIndex && !iAmmoAmount) { + return; } - } while (ZP_Ammo_GetPackSize(iAmmoIndex) == -1 && iAmmoIndex != g_pPlayerSelectedAmmo[pPlayer]); - g_pPlayerSelectedAmmo[pPlayer] = iAmmoIndex; + g_pPlayerSelectedAmmo[pPlayer] = iAmmoIndex; + + if (bShowMessage) { + static szAmmoName[32]; + ZP_Ammo_GetName(g_pPlayerSelectedAmmo[pPlayer], szAmmoName, charsmax(szAmmoName)); - static szAmmoName[32]; - ZP_Ammo_GetName(g_pPlayerSelectedAmmo[pPlayer], szAmmoName, charsmax(szAmmoName)); - client_print(pPlayer, print_chat, "Selected %s ammo", szAmmoName); + new iMaxAmmo = ZP_Ammo_GetMaxAmount(iAmmoIndex); + + client_print(pPlayer, print_chat, "Selected %s ammo [%d/%d]", szAmmoName, iAmmoAmount, iMaxAmmo); + } } DropPlayerSelectedAmmo(pPlayer) { - new iAmmoIndex = g_pPlayerSelectedAmmo[pPlayer]; - new iAmmoId = ZP_Ammo_GetId(iAmmoIndex); - new iBpAmmo = get_member(pPlayer, m_rgAmmo, iAmmoId); + new iAmmoIndex = g_pPlayerSelectedAmmo[pPlayer]; + new iAmmoId = ZP_Ammo_GetId(iAmmoIndex); + new iBpAmmo = get_member(pPlayer, m_rgAmmo, iAmmoId); - if (iBpAmmo <= 0) { - return; - } + if (iBpAmmo <= 0) { + return; + } - new iPackSize = min(ZP_Ammo_GetPackSize(iAmmoIndex), iBpAmmo); - new iWeaponBox = UTIL_CreateAmmoBox(iAmmoId, iPackSize); - ThrowPlayerItem(pPlayer, iWeaponBox); + new iPackSize = min(ZP_Ammo_GetPackSize(iAmmoIndex), iBpAmmo); + new pWeaponBox = UTIL_CreateAmmoBox(iAmmoId, iPackSize); + ThrowPlayerItem(pPlayer, pWeaponBox); - set_member(pPlayer, m_rgAmmo, iBpAmmo - iPackSize, iAmmoId); + set_member(pPlayer, m_rgAmmo, iBpAmmo - iPackSize, iAmmoId); - static szAmmoModel[64]; - ZP_Ammo_GetPackModel(iAmmoIndex, szAmmoModel, charsmax(szAmmoModel)); - engfunc(EngFunc_SetModel, iWeaponBox, szAmmoModel); + static szAmmoModel[64]; + ZP_Ammo_GetPackModel(iAmmoIndex, szAmmoModel, charsmax(szAmmoModel)); + engfunc(EngFunc_SetModel, pWeaponBox, szAmmoModel); - static Float:vecThrowAngle[3]; - pev(pPlayer, pev_v_angle, vecThrowAngle); - engfunc(EngFunc_MakeVectors, vecThrowAngle); + static Float:vecThrowAngle[3]; + pev(pPlayer, pev_v_angle, vecThrowAngle); + engfunc(EngFunc_MakeVectors, vecThrowAngle); - static Float:vecVelocity[3]; - get_global_vector(GL_v_forward, vecVelocity); - xs_vec_mul_scalar(vecVelocity, random_float(400.0, 450.0), vecVelocity); - set_pev(iWeaponBox, pev_velocity, vecVelocity); + static Float:vecVelocity[3]; + get_global_vector(GL_v_forward, vecVelocity); + xs_vec_mul_scalar(vecVelocity, random_float(400.0, 450.0), vecVelocity); + set_pev(pWeaponBox, pev_velocity, vecVelocity); - ZP_Player_UpdateSpeed(pPlayer); + ZP_Player_UpdateSpeed(pPlayer); } GetAmmo(pPlayer, const szAmmo[]) { - new iHandler = ZP_Ammo_GetHandler(szAmmo); - if (iHandler == -1) { - return 0; - } + new iAmmoHandler = ZP_Ammo_GetHandler(szAmmo); + if (iAmmoHandler == -1) { + return 0; + } - new iId = ZP_Ammo_GetId(iHandler); + new iId = ZP_Ammo_GetId(iAmmoHandler); - return get_member(pPlayer, m_rgAmmo, iId); + return get_member(pPlayer, m_rgAmmo, iId); } bool:SetAmmo(pPlayer, const szAmmo[], iValue) { - new iHandler = ZP_Ammo_GetHandler(szAmmo); - if (iHandler == -1) { - return false; - } + new iAmmoHandler = ZP_Ammo_GetHandler(szAmmo); + if (iAmmoHandler == -1) { + return false; + } - new iId = ZP_Ammo_GetId(iHandler); - set_member(pPlayer, m_rgAmmo, iValue, iId); + new iId = ZP_Ammo_GetId(iAmmoHandler); + set_member(pPlayer, m_rgAmmo, iValue, iId); - ZP_Player_UpdateSpeed(pPlayer); + ZP_Player_UpdateSpeed(pPlayer); - return true; + return true; } AddAmmo(pPlayer, const szAmmo[], iValue) { - new iHandler = ZP_Ammo_GetHandler(szAmmo); - if (iHandler == -1) { - return 0; - } + new iAmmoHandler = ZP_Ammo_GetHandler(szAmmo); + if (iAmmoHandler == -1) { + return 0; + } - new iId = ZP_Ammo_GetId(iHandler); - new iAmount = get_member(pPlayer, m_rgAmmo, iId); - new iNewAmount = min(iAmount + iValue, ZP_Ammo_GetMaxAmount(iHandler)); - set_member(pPlayer, m_rgAmmo, iNewAmount, iId); + new iId = ZP_Ammo_GetId(iAmmoHandler); + new iAmount = get_member(pPlayer, m_rgAmmo, iId); + new iNewAmount = min(iAmount + iValue, ZP_Ammo_GetMaxAmount(iAmmoHandler)); + set_member(pPlayer, m_rgAmmo, iNewAmount, iId); - ZP_Player_UpdateSpeed(pPlayer); + ZP_Player_UpdateSpeed(pPlayer); - return iNewAmount - iAmount; + return iNewAmount - iAmount; } diff --git a/src/scripts/core/zp_player_speed.sma b/src/scripts/core/zp_player_speed.sma index 0a1df49..70455df 100644 --- a/src/scripts/core/zp_player_speed.sma +++ b/src/scripts/core/zp_player_speed.sma @@ -6,72 +6,25 @@ #include #include +#include #include #define PLUGIN "[Zombie Panic] Player Speed" #define AUTHOR "Hedgehog Fog" -#define AMMO_TYPE_COUNT 16 - -new const Float:g_fWeaponWeight[CSW_P90 + 1] = { - 1.0, // weapon_p228 - 0.0, // weapon_shield - 2.2, // weapon_scout - 0.0, // weapon_hegrenade - 2.5, // weapon_xm1014 - 0.0, // weapon_c4 - 2.2, // weapon_mac10 - 2.7, // weapon_aug - 0.0, // weapon_smokegrenade - 1.0, // weapon_elite - 1.0, // weapon_fiveseven - 2.2, // weapon_ump45 - 2.7, // weapon_sg550 - 2.5, // weapon_galil - 2.5, // weapon_famas - 1.0, // weapon_usp - 1.0, // weapon_glock18 - 3.5, // weapon_awp - 2.20, // weapon_mp5navy - 3.5, // weapon_m249 - 1.6, // weapon_m3 - 2.63, // weapon_m4a1 - 2.2, // weapon_tmp - 3.2, // weapon_g3sg1 - 0.0, // weapon_flashbang - 1.3, // weapon_deagle - 2.7, // weapon_sg552 - 2.70, // weapon_ak47 - 0.5, // weapon_knife - 2.2, // weapon_p90 -}; - -new const Float:g_fAmmoWeight[AMMO_TYPE_COUNT] = { - 0.0, // "" - 0.1083, // "338Magnum" - 0.07, // "762Nato" - 0.07, // "556NatoBox" - 0.07, // "556Nato" - 0.20, // "buckshot" - 0.07, // "45ACP" - 0.07, // "57mm" - 0.07, // "50AE" - 0.07, // "357SIG" - 0.07, // "9mm" - 0.8, // "Flashbang" - 0.8, // "HEGrenade" - 0.8, // "SmokeGrenade" - 0.8 // "C4" -}; - -new Float:g_fPlayerMaxSpeed[MAX_PLAYERS + 1]; -new bool:g_bPlayerDuck[MAX_PLAYERS + 1]; +#define SPEED_BUTTONS (IN_DUCK | IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT) + +new Float:g_flPlayerMaxSpeed[MAX_PLAYERS + 1]; +new bool:g_bPlayerDucking[MAX_PLAYERS + 1]; +new bool:g_bPlayerMoveBack[MAX_PLAYERS + 1]; +new bool:g_bPlayerStrafing[MAX_PLAYERS + 1]; public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); RegisterHam(Ham_Item_PreFrame, "player", "OnPlayerItemPreFrame_Post", .Post = 1); RegisterHam(Ham_AddPlayerItem, "player", "OnPlayerAddItem_Post", .Post = 1); + register_forward(FM_CmdStart, "OnCmdStart"); register_message(get_user_msgid("AmmoPickup"), "OnMessage_AmmoPickup"); @@ -80,45 +33,57 @@ public plugin_init() { } public plugin_natives() { - register_native("ZP_Player_UpdateSpeed", "Native_UpdateSpeed"); + register_native("ZP_Player_UpdateSpeed", "Native_UpdateSpeed"); } public Native_UpdateSpeed(iPluginId, iArgc) { - new pPlayer = get_param(1); - UpdatePlayerSpeed(pPlayer); + new pPlayer = get_param(1); + UpdatePlayerSpeed(pPlayer); } public OnClCmd_Drop(pPlayer) { - UpdatePlayerSpeed(pPlayer); - return PLUGIN_CONTINUE; + set_task(0.1, "Task_UpdateSpeed", pPlayer); + + return PLUGIN_CONTINUE; } public OnPlayerAddItem_Post(pPlayer) { UpdatePlayerSpeed(pPlayer); + + return HAM_HANDLED; +} + +public OnCmdStart(pPlayer, pHandle) { + new iFlags = pev(pPlayer, pev_flags); + new iButtons = get_uc(pHandle, UC_Buttons); + new iOldButtons = pev(pPlayer, pev_oldbuttons); + new bool:bPrevDucking = g_bPlayerDucking[pPlayer]; + + g_bPlayerDucking[pPlayer] = iButtons & IN_DUCK && iFlags & FL_DUCKING; + g_bPlayerMoveBack[pPlayer] = !!(iButtons & IN_BACK); + g_bPlayerStrafing[pPlayer] = !!((iButtons & IN_MOVELEFT || iButtons & IN_MOVERIGHT) && ~iButtons & IN_FORWARD); + + if ((iButtons & SPEED_BUTTONS) != (iOldButtons & SPEED_BUTTONS) || g_bPlayerDucking[pPlayer] != bPrevDucking) { + UpdatePlayerSpeed(pPlayer); + } + return HAM_HANDLED; } public OnMessage_AmmoPickup(iMsgId, iMsgDest, pPlayer) { UpdatePlayerSpeed(pPlayer); + return PLUGIN_CONTINUE; } public OnPlayerItemPreFrame_Post(pPlayer) { static Float:flMaxSpeed; pev(pPlayer, pev_maxspeed, flMaxSpeed); - g_fPlayerMaxSpeed[pPlayer] = flMaxSpeed; + g_flPlayerMaxSpeed[pPlayer] = flMaxSpeed; UpdatePlayerSpeed(pPlayer); - return HAM_HANDLED; -} - -public OnCmdStart(pPlayer, pHandle) { - new bool:bDuck = !!(pev(pPlayer, pev_flags) & FL_DUCKING) || !!(get_uc(pHandle, UC_Buttons) & IN_DUCK); - if (bDuck != g_bPlayerDuck[pPlayer]) { - g_bPlayerDuck[pPlayer] = bDuck; - UpdatePlayerSpeed(pPlayer); - } + return HAM_HANDLED; } public TaskUpdatePlayerSpeed(iTaskId) { @@ -127,88 +92,100 @@ public TaskUpdatePlayerSpeed(iTaskId) { } bool:UpdatePlayerSpeed(pPlayer) { - if (!is_user_alive(pPlayer)) { - return false; - } + if (!is_user_alive(pPlayer)) { + return false; + } - if (!Round_IsRoundStarted()) { - return false; - } + if (get_member_game(m_bFreezePeriod)) { + return false; + } - new Float:flMaxSpeed = CalculatePlayerMaxSpeed(pPlayer); - set_pev(pPlayer, pev_maxspeed, flMaxSpeed); + new Float:flMaxSpeed = CalculatePlayerMaxSpeed(pPlayer); + set_pev(pPlayer, pev_maxspeed, flMaxSpeed); - // set_hudmessage(0, 200, 30, -1.0, 0.35, 0, 0.0, 1.0); - // show_hudmessage(pPlayer, "MaxSpeed: %f^nTotal: %f", g_fPlayerMaxSpeed[pPlayer], flMaxSpeed); + return true; +} - // client_print(pPlayer, print_center, "[%f] MaxSpeed: %f^nTotal: %f", get_gametime(), g_fPlayerMaxSpeed[pPlayer], flMaxSpeed); +Float:CalculatePlayerMaxSpeed(pPlayer) { + new Float:flMaxSpeed = floatmin( + ZP_Player_IsZombie(pPlayer) ? ZP_ZOMBIE_SPEED : ZP_HUMAN_SPEED, + g_flPlayerMaxSpeed[pPlayer] + ); - return true; -} + flMaxSpeed -= CalculatePlayerInventoryWeight(pPlayer); -Float:GetPlayerBaseSpeed(pPlayer) { - return ZP_Player_IsZombie(pPlayer) ? ZP_ZOMBIE_SPEED : ZP_HUMAN_SPEED; -} + if (ZP_Player_InPanic(pPlayer)) { + flMaxSpeed *= ZP_PANIC_SPEED_MODIFIER; + } -Float:CalculatePlayerMaxSpeed(pPlayer) { - if (ZP_Player_InPanic(pPlayer)) { - return ZP_HUMAN_SPEED * 1.125; - } + if (g_bPlayerDucking[pPlayer]) { + flMaxSpeed *= ZP_DUCK_SPEED_MODIFIER; + } - new Float:flWeight = CalculatePlayerInventoryWeight(pPlayer); - new Float:flBaseSpeed = GetPlayerBaseSpeed(pPlayer); - new Float:flMaxSpeed = floatmin(flBaseSpeed, g_fPlayerMaxSpeed[pPlayer]); + if (g_bPlayerMoveBack[pPlayer]) { + flMaxSpeed *= ZP_BACKWARD_SPEED_MODIFIER; + } else if (g_bPlayerStrafing[pPlayer]) { + flMaxSpeed *= ZP_STRAFE_SPEED_MODIFIER; + } - return (flMaxSpeed * (g_bPlayerDuck[pPlayer] ? 1.125 : 1.0)) - flWeight; + return flMaxSpeed; } Float:CalculatePlayerInventoryWeight(pPlayer) { - if (ZP_Player_IsZombie(pPlayer)) { - return 0.0; - } + if (ZP_Player_IsZombie(pPlayer)) { + return 0.0; + } - new Float:flWeight = 0.0; - flWeight += CalculatePlayerWeaponsWeight(pPlayer); - flWeight += CalculatePlayerAmmoWeight(pPlayer); + new Float:flWeight = 0.0; + flWeight += CalculatePlayerWeaponsWeight(pPlayer); + flWeight += CalculatePlayerAmmoWeight(pPlayer); - return flWeight; + return flWeight; } Float:CalculatePlayerWeaponsWeight(pPlayer) { - new pActiveItem = get_member(pPlayer, m_pActiveItem); - - new Float:flWeight = 0.0; - - for (new iSlot = 0; iSlot < 6; ++iSlot) { - new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); - - while (pItem != -1) { - if (pItem != pActiveItem) { - new iWeaponId = get_member(pItem, m_iId); - flWeight += g_fWeaponWeight[iWeaponId]; - } - - new iAmmoId = get_member(pItem, m_Weapon_iPrimaryAmmoType); - if (iAmmoId != -1) { - new iClip = get_member(pItem, m_Weapon_iClip); - flWeight += iClip * g_fAmmoWeight[iAmmoId]; - } - - pItem = get_member(pItem, m_pNext); + // new pActiveItem = get_member(pPlayer, m_pActiveItem); + + new Float:flWeight = 0.0; + + for (new iSlot = 0; iSlot < 6; ++iSlot) { + new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); + + while (pItem != -1) { + flWeight += ZP_Weapons_GetWeight(pItem); + + new iAmmoId = get_member(pItem, m_Weapon_iPrimaryAmmoType); + if (iAmmoId != -1) { + new iAmmoHandler = ZP_Ammo_GetHandlerById(iAmmoId); + if (iAmmoHandler != -1) { + new iClip = get_member(pItem, m_Weapon_iClip); + flWeight += iClip * ZP_Ammo_GetWeight(iAmmoHandler); + } + } + + pItem = get_member(pItem, m_pNext); + } } - } - return flWeight; + return flWeight; } Float:CalculatePlayerAmmoWeight(pPlayer) { - new Float:flWeight = 0.0; + new Float:flWeight = 0.0; + + new iSize = sizeof(AMMO_LIST); + for (new iAmmoId = 0; iAmmoId < iSize; ++iAmmoId) { + new iBpAmmo = get_member(pPlayer, m_rgAmmo, iAmmoId); + new iAmmoHandler = ZP_Ammo_GetHandlerById(iAmmoId); + if (iAmmoHandler != -1) { + flWeight += iBpAmmo * ZP_Ammo_GetWeight(iAmmoHandler); + } + } - new iAmmoCount = AMMO_TYPE_COUNT; - for (new iAmmoId = 0; iAmmoId < iAmmoCount; ++iAmmoId) { - new iBpAmmo = get_member(pPlayer, m_rgAmmo, iAmmoId); - flWeight += iBpAmmo * g_fAmmoWeight[iAmmoId]; - } + return flWeight; +} - return flWeight; +public Task_UpdateSpeed(iTaskId) { + new pPlayer = iTaskId; + UpdatePlayerSpeed(pPlayer); } diff --git a/src/scripts/core/zp_radio.sma b/src/scripts/core/zp_radio.sma index 4edbcb8..60df8b2 100644 --- a/src/scripts/core/zp_radio.sma +++ b/src/scripts/core/zp_radio.sma @@ -15,7 +15,7 @@ public plugin_init() { } public OnMessage_SendAudio() { - static szAudio[32]; + static szAudio[8]; get_msg_arg_string(2, szAudio, charsmax(szAudio)); return equali(szAudio, "%!MRAD_", 7) ? PLUGIN_HANDLED : PLUGIN_CONTINUE; diff --git a/src/scripts/core/zp_use_pickup.sma b/src/scripts/core/zp_use_pickup.sma index 0747bc7..6c78928 100644 --- a/src/scripts/core/zp_use_pickup.sma +++ b/src/scripts/core/zp_use_pickup.sma @@ -4,61 +4,162 @@ #include #include #include +#include #include +#include #define PLUGIN "[Zombie Panic] Use Pickup" #define AUTHOR "Hedgehog Fog" +#define HIGHLIGHT_COLOR 96, 64, 16 + +new bool:g_bBlockTouch = true; +new Float:g_flPlayerLastFind[MAX_PLAYERS + 1] = { 0.0, ... }; +new g_pPlayerAimItem[MAX_PLAYERS + 1] = { -1, ... }; +new g_bPlayerPickup[MAX_PLAYERS + 1] = { false, ... }; + +new g_pFwAimItem; +new g_pFwResult; + +new g_pCvarUsePickup; +new g_pCvarUsePickupHighlight; + public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); RegisterHam(Ham_Player_PreThink, "player", "OnPlayerPreThink_Post", .Post = 1); + RegisterHam(Ham_Player_PostThink, "player", "OnPlayerPostThink_Post", .Post = 1); + + for (new i = 0; i < sizeof(ITEMS_LIST); ++i) { + RegisterHam(Ham_Touch, ITEMS_LIST[i], "OnItemTouch", .Post = 0); + } + + register_forward(FM_AddToFullPack, "OnAddToFullPack_Post", 1); + + g_pCvarUsePickup = register_cvar("zp_use_pickup", "1"); + g_pCvarUsePickupHighlight = register_cvar("zp_use_pickup_highlight", "1"); + g_pFwAimItem = CreateMultiForward("ZP_Fw_Player_AimItem", ET_IGNORE, FP_CELL, FP_CELL); +} + +public OnItemTouch(pEntity, pToucher) { + if (!UTIL_IsPlayer(pToucher)) { + return HAM_IGNORED; + } + + return get_pcvar_num(g_pCvarUsePickup) && g_bBlockTouch && !is_user_bot(pToucher) ? HAM_SUPERCEDE : HAM_HANDLED; +} + +public OnAddToFullPack_Post(es, e, pEntity, pHost, pHostFlags, pPlayer, pSet) { + if (!get_pcvar_num(g_pCvarUsePickup)) { + return FMRES_IGNORED; + } + + if (!get_pcvar_num(g_pCvarUsePickupHighlight)) { + return FMRES_IGNORED; + } + + if (!UTIL_IsPlayer(pHost)) { + return FMRES_IGNORED; + } + + if (!is_user_alive(pHost)) { + return FMRES_IGNORED; + } + + if (!pev_valid(pEntity)) { + return FMRES_IGNORED; + } + + if (pEntity == g_pPlayerAimItem[pHost]) { + set_es(es, ES_RenderMode, kRenderNormal); + set_es(es, ES_RenderFx, kRenderFxGlowShell); + set_es(es, ES_RenderAmt, 1); + set_es(es, ES_RenderColor, {HIGHLIGHT_COLOR}); + } + + return FMRES_HANDLED; } public OnPlayerPreThink_Post(pPlayer) { - new iButtons = pev(pPlayer, pev_button); - new iOldButtons = pev(pPlayer, pev_oldbuttons); - - if (~iButtons & IN_USE) { - return HAM_IGNORED; - } - - if (iOldButtons & IN_USE) { - return HAM_IGNORED; - } - - static Float:vecSrc[3]; - ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecSrc); - - static Float:vecEnd[3]; - pev(pPlayer, pev_v_angle, vecEnd); - engfunc(EngFunc_MakeVectors, vecEnd); - get_global_vector(GL_v_forward, vecEnd); - - for (new i = 0; i < 3; ++i) { - vecEnd[i] = vecSrc[i] + (vecEnd[i] * 52.0); - } - - new pTr = create_tr2(); - engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, pPlayer, pTr); - get_tr2(pTr, TR_vecEndPos, vecEnd); - free_tr2(pTr); - - new pEntity; - while ((pEntity = engfunc(EngFunc_FindEntityInSphere, pEntity, vecEnd, 1.0)) != 0) { - if (pev(pEntity, pev_solid) == SOLID_NOT) { - continue; + g_bPlayerPickup[pPlayer] = pev(pPlayer, pev_button) & IN_USE && ~pev(pPlayer, pev_oldbuttons) & IN_USE; + + if (get_gametime() - g_flPlayerLastFind[pPlayer] < 0.1) { + return HAM_IGNORED; + } + + new pPrevAimItem = g_pPlayerAimItem[pPlayer]; + g_pPlayerAimItem[pPlayer] = -1; + + if (ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; + } + + if (get_member_game(m_bFreezePeriod)) { + return HAM_IGNORED; + } + + static Float:vecSrc[3]; + ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecSrc); + + static Float:vecEnd[3]; + pev(pPlayer, pev_v_angle, vecEnd); + engfunc(EngFunc_MakeVectors, vecEnd); + get_global_vector(GL_v_forward, vecEnd); + + for (new i = 0; i < 3; ++i) { + vecEnd[i] = vecSrc[i] + (vecEnd[i] * 64.0); + } + + new pTr = create_tr2(); + engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, pPlayer, pTr); + get_tr2(pTr, TR_vecEndPos, vecEnd); + free_tr2(pTr); + + new pEntity; + while ((pEntity = engfunc(EngFunc_FindEntityInSphere, pEntity, vecEnd, 1.0)) != 0) { + if (pev(pEntity, pev_solid) == SOLID_NOT) { + continue; + } + + if (~pev(pEntity, pev_flags) & FL_ONGROUND) { + continue; + } + + static szClassname[32]; + pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); + + if (equal(szClassname, "weaponbox") || equali(szClassname, "item_", 5)) { + g_pPlayerAimItem[pPlayer] = pEntity; + + if (pEntity != pPrevAimItem) { + ExecuteForward(g_pFwAimItem, g_pFwResult, pPlayer, pEntity); + } + + break; + } } - static szClassname[32]; - pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); + g_flPlayerLastFind[pPlayer] = get_gametime(); - if (equal(szClassname, "weaponbox") || equali(szClassname, "item_", 5)) { - ExecuteHamB(Ham_Touch, pEntity, pPlayer); - break; + return HAM_HANDLED; +} + +public OnPlayerPostThink_Post(pPlayer) { + if (!g_bPlayerPickup[pPlayer]) { + return HAM_IGNORED; + } + + if (g_pPlayerAimItem[pPlayer] == -1) { + return HAM_IGNORED; } - } - return HAM_HANDLED; + g_bBlockTouch = false; + ExecuteHamB(Ham_Touch, g_pPlayerAimItem[pPlayer], pPlayer); + g_bBlockTouch = true; + + g_bPlayerPickup[pPlayer] = false; + g_pPlayerAimItem[pPlayer] = -1; + + return HAM_HANDLED; } diff --git a/src/scripts/core/zp_weapons.sma b/src/scripts/core/zp_weapons.sma new file mode 100644 index 0000000..c93c40d --- /dev/null +++ b/src/scripts/core/zp_weapons.sma @@ -0,0 +1,83 @@ + +#include + +#include +#include + +#define PLUGIN "[Zombie Panic] Weapons" +#define AUTHOR "Hedgehog Fog" + +enum WeaponData { + Weapon_Weight +} + +new Array:g_irgWeapons[WeaponData]; +new Trie:g_weaponMap; +new g_iWeaponCount; + +public plugin_precache() { + for (new i = 0; i < _:WeaponData; ++i) { + g_irgWeapons[WeaponData:i] = ArrayCreate(1, 8); + } + + g_weaponMap = TrieCreate(); +} + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); +} + +public plugin_natives() { + register_native("ZP_Weapons_Register", "Native_Register"); + register_native("ZP_Weapons_GetWeight", "Native_GetWeight"); +} + +public plugin_end() { + for (new i = 0; i < _:WeaponData; ++i) { + ArrayDestroy(g_irgWeapons[WeaponData:i]); + } + + TrieDestroy(g_weaponMap); +} + +public Native_Register(iPluginId, iArgc) { + new CW:iCwHandler = CW:get_param(1); + new Float:flWeight = get_param_f(2); + + Register(iCwHandler, flWeight); +} + +public Float:Native_GetWeight(iPluginId, iArgc) { + new pEntity = get_param(1); + + return GetWeight(pEntity); +} + +Register(CW:iCwHandler, Float:flWeight) { + new iIndex = g_iWeaponCount; + ArrayPushCell(Array:g_irgWeapons[Weapon_Weight], flWeight); + + new szKey[4]; + format(szKey, charsmax(szKey), "%d", iCwHandler); + + TrieSetCell(g_weaponMap, szKey, iIndex); + + g_iWeaponCount++; +} + +Float:GetWeight(pEntity) { + new CW:iCwHandler = CW_GetHandlerByEntity(pEntity); + if (iCwHandler == CW_INVALID_HANDLER) { + return 0.0; + } + + static szKey[4]; + format(szKey, charsmax(szKey), "%d", iCwHandler); + + new iIndex; + if (!TrieGetCell(g_weaponMap, szKey, iIndex)) { + return 0.0; + } + + return ArrayGetCell(Array:g_irgWeapons[Weapon_Weight], iIndex); +} diff --git a/src/scripts/core/zp_zombie.sma b/src/scripts/core/zp_zombie.sma index b713d8f..0bafc0c 100644 --- a/src/scripts/core/zp_zombie.sma +++ b/src/scripts/core/zp_zombie.sma @@ -11,170 +11,100 @@ #define PLUGIN "[Zombie Panic] Zombie" #define AUTHOR "Hedgehog Fog" -#define TASKID_AMBIENT 100 - -new const g_rgszPickupEntities[][] = { - "armoury_entity", - "item_battery", - "item_healthkit", - "armoury_entity", - "weaponbox", - "weapon_shield", - "grenade" -}; - -public plugin_precache() { - for (new i = 0; i < sizeof(ZP_ZOMBIE_DEATH_SOUNDS); ++i) { - precache_sound(ZP_ZOMBIE_DEATH_SOUNDS[i]); - } - - for (new i = 0; i < sizeof(ZP_ZOMBIE_AMBIENT_SOUNDS); ++i) { - precache_sound(ZP_ZOMBIE_AMBIENT_SOUNDS[i]); - } -} - public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); RegisterHam(Ham_Item_PreFrame, "player", "OnPlayerItemPreFrame_Post", .Post = 1); RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage", .Post = 0); - RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); - RegisterHam(Ham_Use, "func_button", "OnButtonUse", .Post = 0); - for (new i = 0; i < sizeof(g_rgszPickupEntities); ++i) { - RegisterHam(Ham_Touch, g_rgszPickupEntities[i], "OnItemTouch", .Post = 0); + for (new i = 0; i < sizeof(ITEMS_LIST); ++i) { + RegisterHam(Ham_Touch, ITEMS_LIST[i], "OnItemTouch", .Post = 0); } } public plugin_natives() { - register_native("ZP_Player_IsZombie", "Native_IsPlayerZombie"); - register_native("ZP_Player_PlayZombieAmbient", "Native_PlayAmbient"); + register_native("ZP_Player_IsZombie", "Native_IsPlayerZombie"); } public bool:Native_IsPlayerZombie(iPluginId, iArgc) { - new pPlayer = get_param(1); - - return IsPlayerZombie(pPlayer); -} - -public Native_PlayAmbient(iPluginId, iArgc) { - new pPlayer = get_param(1); + new pPlayer = get_param(1); - if (!ZP_Player_IsZombie(pPlayer)) { - return; - } - - PlayAmbient(pPlayer); + return IsPlayerZombie(pPlayer); } public OnButtonUse(pEntity, pToucher) { - if (!UTIL_IsPlayer(pToucher)) { - return HAM_IGNORED; - } + if (!UTIL_IsPlayer(pToucher)) { + return HAM_IGNORED; + } - if (!ZP_Player_IsZombie(pToucher)) { - return HAM_IGNORED; - } + if (!ZP_Player_IsZombie(pToucher)) { + return HAM_IGNORED; + } - PlayAmbient(pToucher); + if (pev(pEntity, pev_spawnflags) & ZP_BUTTON_FLAG_HUMAN_ONLY) { + return HAM_SUPERCEDE; + } - return HAM_SUPERCEDE; + return HAM_HANDLED; } public OnPlayerSpawn_Post(pPlayer) { - if (!is_user_alive(pPlayer)) { - return HAM_IGNORED; - } - - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } - - SetPlayerZombie(pPlayer); - emit_sound(pPlayer, CHAN_ITEM, "common/null.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - - return HAM_HANDLED; -} + if (!is_user_alive(pPlayer)) { + return HAM_IGNORED; + } -public OnPlayerKilled_Post(pPlayer) { - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } + if (!ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; + } - emit_sound(pPlayer, CHAN_VOICE, ZP_ZOMBIE_DEATH_SOUNDS[random(sizeof(ZP_ZOMBIE_DEATH_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); + emit_sound(pPlayer, CHAN_ITEM, "common/null.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - return HAM_HANDLED; + return HAM_HANDLED; } -public OnPlayerTakeDamage(pPlayer, iInflictor, iAttacker, Float:flDamage, iDamageBits) { - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } +public OnPlayerTakeDamage(pPlayer, iInflictor, pAttacker, Float:flDamage, iDamageBits) { + if (!ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; + } - if (iDamageBits & DMG_FALL) { - return HAM_SUPERCEDE; - } + if (iDamageBits & DMG_FALL) { + return HAM_SUPERCEDE; + } - return HAM_HANDLED; + return HAM_HANDLED; } public OnPlayerItemPreFrame_Post(pPlayer) { - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } - - new pActiveItem = get_member(pPlayer, m_pActiveItem); - if (pActiveItem != -1 && pev_valid(pActiveItem)) { - if (ExecuteHamB(Ham_CS_Item_CanDrop, pActiveItem)) { - client_cmd(pPlayer, "drop"); - client_cmd(pPlayer, ZP_WEAPON_SWIPE); + if (!ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; } - } - return HAM_HANDLED; + new pActiveItem = get_member(pPlayer, m_pActiveItem); + if (pActiveItem != -1 && pev_valid(pActiveItem)) { + if (ExecuteHamB(Ham_CS_Item_CanDrop, pActiveItem)) { + client_cmd(pPlayer, "drop"); + client_cmd(pPlayer, ZP_WEAPON_SWIPE); + } + } + + return HAM_HANDLED; } public OnItemTouch(pEntity, pToucher) { - if (!UTIL_IsPlayer(pToucher)) { - return HAM_IGNORED; - } + if (!UTIL_IsPlayer(pToucher)) { + return HAM_IGNORED; + } - if (!ZP_Player_IsZombie(pToucher)) { - return HAM_IGNORED; - } + if (!ZP_Player_IsZombie(pToucher)) { + return HAM_IGNORED; + } - return HAM_SUPERCEDE; + return HAM_SUPERCEDE; } bool:IsPlayerZombie(pPlayer) { - return get_member(pPlayer, m_iTeam) == ZP_ZOMBIE_TEAM; -} - -SetPlayerZombie(pPlayer) { - set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); - set_task(0.1, "TaskAmbient", TASKID_AMBIENT + pPlayer); -} - -public TaskAmbient(iTaskId) { - new pPlayer = iTaskId - TASKID_AMBIENT; - - if (!is_user_alive(pPlayer)) { - return; - } - - if (!ZP_Player_IsZombie(pPlayer)) { - return; - } - - if (random(100) < 50) { - PlayAmbient(pPlayer); - } - - set_task(random_float(10.0, 20.0), "TaskAmbient", TASKID_AMBIENT + pPlayer); -} - -PlayAmbient(pPlayer) { - emit_sound(pPlayer, CHAN_VOICE, ZP_ZOMBIE_AMBIENT_SOUNDS[random(sizeof(ZP_ZOMBIE_AMBIENT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + return get_member(pPlayer, m_iTeam) == ZP_ZOMBIE_TEAM; } diff --git a/src/scripts/core/zp_zombie_lives.sma b/src/scripts/core/zp_zombie_lives.sma index 188d259..d22a234 100644 --- a/src/scripts/core/zp_zombie_lives.sma +++ b/src/scripts/core/zp_zombie_lives.sma @@ -4,101 +4,102 @@ #include #include -#include - #include +#include #define PLUGIN "[Zombie Panic] Zombie Lives" #define AUTHOR "Hedgehog Fog" #define TASKID_PLAYER_RESPAWN 100 -#define SPAWN_DELAY 5.0 +new g_pCvarRespawnTime; new g_iLives = 0; -new g_pCvarLives; - public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); - - g_pCvarLives = register_cvar("zp_zombie_lives", "20"); + + g_pCvarRespawnTime = register_cvar("zp_zombie_respawn_time", "6.0"); } public plugin_natives() { - register_native("ZP_GameRules_GetZombieLives", "Native_GetZombieLives"); - register_native("ZP_GameRules_SetZombieLives", "Native_SetZombieLives"); + register_native("ZP_GameRules_GetZombieLives", "Native_GetZombieLives"); + register_native("ZP_GameRules_SetZombieLives", "Native_SetZombieLives"); + register_native("ZP_GameRules_RespawnAsZombie", "Native_RespawnAsZombie"); } public Native_GetZombieLives(iPluginId, iArgc) { - return g_iLives; + return g_iLives; } public Native_SetZombieLives(iPluginId, iArgc) { - g_iLives = get_param(1); + g_iLives = get_param(1); } -public Zp_Fw_PlayerJoined(pPlayer) { +public Native_RespawnAsZombie(iPluginId, iArgc) { + new pPlayer = get_param(1); + set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); + SetupRespawnTask(pPlayer); +} + +public ZP_Fw_PlayerJoined(pPlayer) { ExecuteHam(Ham_Player_PreThink, pPlayer); if (!is_user_alive(pPlayer)) { - set_task(SPAWN_DELAY, "TaskRespawnPlayer", TASKID_PLAYER_RESPAWN + pPlayer); + SetupRespawnTask(pPlayer); } return PLUGIN_HANDLED; } -public Round_Fw_RoundStart() { - g_iLives = ZP_GameRules_GetObjectiveMode() ? 255 : get_pcvar_num(g_pCvarLives); -} - public OnPlayerSpawn_Post(pPlayer) { - remove_task(pPlayer); + remove_task(pPlayer); } public OnPlayerKilled_Post(pPlayer) { - if (!ZP_Player_IsZombie(pPlayer) && !ZP_GameRules_GetObjectiveMode()) { - g_iLives++; - } + if (!ZP_Player_IsZombie(pPlayer) && !ZP_GameRules_GetObjectiveMode()) { + g_iLives++; + } - remove_task(pPlayer); - set_task(SPAWN_DELAY, "TaskRespawnPlayer", TASKID_PLAYER_RESPAWN + pPlayer); + if (get_member(pPlayer, m_iTeam) != 3) { + SetupRespawnTask(pPlayer); + } } -public TaskRespawnPlayer(iTaskId) { - new pPlayer = iTaskId - TASKID_PLAYER_RESPAWN; - RespawnPlayer(pPlayer); +SetupRespawnTask(pPlayer) { + remove_task(TASKID_PLAYER_RESPAWN + pPlayer); + set_task(get_pcvar_float(g_pCvarRespawnTime), "Task_RespawnPlayer", TASKID_PLAYER_RESPAWN + pPlayer); } RespawnPlayer(pPlayer) { - if (!g_iLives) { - set_task(SPAWN_DELAY, "TaskRespawnPlayer", TASKID_PLAYER_RESPAWN + pPlayer); - return; - } - - if (!is_user_connected(pPlayer)) { - return; - } - - if (is_user_alive(pPlayer)) { - return; - } - - new iTeam = get_member(pPlayer, m_iTeam); - if (iTeam != ZP_ZOMBIE_TEAM && iTeam != ZP_HUMAN_TEAM) { - return; - } - - if (ZP_Player_IsZombie(pPlayer)) { - if (!ZP_GameRules_GetObjectiveMode()) { - g_iLives--; + if (!g_iLives || get_member_game(m_bFreezePeriod)) { + SetupRespawnTask(pPlayer); + return; } - } else { - set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); - } - ExecuteHamB(Ham_CS_RoundRespawn, pPlayer); + if (!is_user_connected(pPlayer)) { + return; + } + + if (is_user_alive(pPlayer)) { + return; + } + + if (ZP_Player_IsZombie(pPlayer)) { + if (!ZP_GameRules_GetObjectiveMode()) { + g_iLives--; + } + } else { + set_member(pPlayer, m_iTeam, ZP_ZOMBIE_TEAM); + } + + ExecuteHamB(Ham_CS_RoundRespawn, pPlayer); +} + +public Task_RespawnPlayer(iTaskId) { + new pPlayer = iTaskId - TASKID_PLAYER_RESPAWN; + RespawnPlayer(pPlayer); } diff --git a/src/scripts/core/zp_zombie_regeneration.sma b/src/scripts/core/zp_zombie_regeneration.sma index 619b116..f77294b 100644 --- a/src/scripts/core/zp_zombie_regeneration.sma +++ b/src/scripts/core/zp_zombie_regeneration.sma @@ -13,39 +13,42 @@ #define REGENERATION_START_DELAY 10.0 #define REGENERATION_DELAY 0.25 -#define REGENERATION_HPS 5.0 + +new g_pCvarRegenerationRate; public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); RegisterHam(Ham_TakeDamage, "player", "OnPlayerTakeDamage_Post", .Post = 1); + + g_pCvarRegenerationRate = register_cvar("zp_zombie_regeneration_rate", "5.0"); } public OnPlayerTakeDamage_Post(pPlayer) { - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } + if (!ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; + } - remove_task(TASKID_REGENERATE + pPlayer); - remove_task(TASKID_START_REGENERATE + pPlayer); - set_task(REGENERATION_START_DELAY, "TaskStartRegenerate", TASKID_START_REGENERATE + pPlayer); + remove_task(TASKID_REGENERATE + pPlayer); + remove_task(TASKID_START_REGENERATE + pPlayer); + set_task(REGENERATION_START_DELAY, "Task_StartRegenerate", TASKID_START_REGENERATE + pPlayer); - return HAM_HANDLED; + return HAM_HANDLED; } -public TaskStartRegenerate(iTaskId) { - new pPlayer = iTaskId - TASKID_START_REGENERATE; - SetupRegenerateTask(pPlayer); +SetupRegenerateTask(pPlayer) { + set_task(REGENERATION_DELAY, "Task_Regenerate", TASKID_REGENERATE + pPlayer); } -public TaskRegenerate(iTaskId) { - new pPlayer = iTaskId - TASKID_REGENERATE; - - if (ExecuteHamB(Ham_TakeHealth, pPlayer, (REGENERATION_HPS * REGENERATION_DELAY), 0)) { +public Task_StartRegenerate(iTaskId) { + new pPlayer = iTaskId - TASKID_START_REGENERATE; SetupRegenerateTask(pPlayer); - } } -SetupRegenerateTask(pPlayer) { - set_task(REGENERATION_DELAY, "TaskRegenerate", TASKID_REGENERATE + pPlayer); +public Task_Regenerate(iTaskId) { + new pPlayer = iTaskId - TASKID_REGENERATE; + + if (ExecuteHamB(Ham_TakeHealth, pPlayer, (get_pcvar_float(g_pCvarRegenerationRate) * REGENERATION_DELAY), 0)) { + SetupRegenerateTask(pPlayer); + } } diff --git a/src/scripts/core/zp_zombie_vision.sma b/src/scripts/core/zp_zombie_vision.sma index 142ba87..4158bb8 100644 --- a/src/scripts/core/zp_zombie_vision.sma +++ b/src/scripts/core/zp_zombie_vision.sma @@ -11,141 +11,209 @@ #define PLUGIN "[Zombie Panic] Zombie Vision" #define AUTHOR "Hedgehog Fog" +#define TASKID_FIX_FADE 100 + +#define VISION_SCREEN_FADE_COLOR 255, 195, 195 +#define VISION_EFFECT_TIME 0.5 +#define VISION_ALPHA 20 +#define MAX_BRIGHTNESS 150 + new bool:g_bPlayerVision[MAX_PLAYERS + 1]; +new bool:g_bPlayerExternalFade[MAX_PLAYERS + 1]; +new bool:g_bIgnoreFadeMessage; + +new g_pFwZombieVision; +new g_pFwResult; + +new g_pCvarAuto; public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", .Post = 1); + RegisterHam(Ham_Killed, "player", "OnPlayerKilled", .Post = 1); - RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", .Post = 1); - RegisterHam(Ham_Killed, "player", "OnPlayerKilled", .Post = 1); + register_message(get_user_msgid("ScreenFade"), "OnMessage_ScreenFade"); - register_forward(FM_AddToFullPack, "OnAddToFullPack_Post", 1); + register_forward(FM_AddToFullPack, "OnAddToFullPack_Post", 1); + + g_pFwZombieVision = CreateMultiForward("ZP_Fw_PlayerZombieVision", ET_IGNORE, FP_CELL, FP_CELL); + + g_pCvarAuto = register_cvar("zp_zombievision_auto", "1"); } public plugin_natives() { - register_native("ZP_Player_ToggleZombieVision", "Native_Toggle"); + register_native("ZP_Player_ToggleZombieVision", "Native_Toggle"); } public bool:Native_Toggle(iPluginId, iArgc) { - new pPlayer = get_param(1); - return Toggle(pPlayer); + new pPlayer = get_param(1); + return Toggle(pPlayer); +} + +public client_connect(pPlayer) { + g_bPlayerVision[pPlayer] = false; + g_bPlayerExternalFade[pPlayer] = false; +} + +public client_disconnected(pPlayer) { + remove_task(TASKID_FIX_FADE + pPlayer); } public OnClCmd_ZombieVision(pPlayer) { - Toggle(pPlayer); - return HAM_HANDLED; + Toggle(pPlayer); + return HAM_HANDLED; } public OnPlayerSpawn(pPlayer) { - if (!is_user_alive(pPlayer)) { - return HAM_IGNORED; - } + if (!is_user_alive(pPlayer)) { + return HAM_IGNORED; + } - SetZombieVision(pPlayer, false); + SetZombieVision(pPlayer, false); - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } + if (!ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; + } + + if (get_pcvar_num(g_pCvarAuto) > 0) { + SetZombieVision(pPlayer, true); + } - return HAM_HANDLED; + return HAM_HANDLED; } public OnPlayerKilled(pPlayer) { - SetZombieVision(pPlayer, false); + SetZombieVision(pPlayer, false); - if (!ZP_Player_IsZombie(pPlayer)) { - return HAM_IGNORED; - } + if (!ZP_Player_IsZombie(pPlayer)) { + return HAM_IGNORED; + } - return HAM_HANDLED; + return HAM_HANDLED; } public OnAddToFullPack_Post(es, e, pEntity, pHost, pHostFlags, pPlayer, pSet) { - if (pEntity == pHost) { - return FMRES_IGNORED; - } + if (pEntity == pHost) { + return FMRES_IGNORED; + } - if (!UTIL_IsPlayer(pHost)) { - return FMRES_IGNORED; - } + if (!UTIL_IsPlayer(pHost)) { + return FMRES_IGNORED; + } - if (!UTIL_IsPlayer(pEntity)) { - return FMRES_IGNORED; - } + if (!UTIL_IsPlayer(pEntity)) { + return FMRES_IGNORED; + } - if (!is_user_alive(pHost)) { - return FMRES_IGNORED; - } + if (!is_user_alive(pHost)) { + return FMRES_IGNORED; + } + + if (!is_user_alive(pEntity)) { + return FMRES_IGNORED; + } + + if (g_bPlayerVision[pHost]) { + set_es(es, ES_RenderMode, kRenderNormal); + set_es(es, ES_RenderFx, kRenderFxGlowShell); + set_es(es, ES_RenderAmt, 1); + + static iColor[3]; + + if (!ZP_Player_IsZombie(pEntity)) { + static Float:flMaxHealth; + pev(pEntity, pev_max_health, flMaxHealth); - if (!is_user_alive(pEntity)) { - return FMRES_IGNORED; - } - - if (g_bPlayerVision[pHost]) { - set_es(es, ES_RenderMode, kRenderNormal); - set_es(es, ES_RenderFx, kRenderFxGlowShell); - set_es(es, ES_RenderAmt, 1); + static Float:flHealth; + pev(pEntity, pev_health, flHealth); - if (!ZP_Player_IsZombie(pEntity)) { - static Float:flMaxHealth; - pev(pEntity, pev_max_health, flMaxHealth); + iColor[0] = floatround(MAX_BRIGHTNESS * (1.0 - (flHealth / flMaxHealth))); + iColor[1] = 0; + iColor[2] = 0; - static Float:flHealth; - pev(pEntity, pev_health, flHealth); + } else { + iColor[0] = 0; + iColor[1] = MAX_BRIGHTNESS; + iColor[2] = 0; + } + + set_es(es, ES_RenderColor, iColor); + } + + return FMRES_HANDLED; +} - new Float:flBrightness = (1.0 - (flHealth / flMaxHealth)) * 255.0; - new iColor[3] = {0, 0, 0}; - iColor[0] = floatround(flBrightness); +public OnMessage_ScreenFade(iMsgId, iMsgDest, pPlayer) { + if (g_bIgnoreFadeMessage) { + return PLUGIN_CONTINUE; + } - set_es(es, ES_RenderColor, iColor); - } else { - set_es(es, ES_RenderColor, { 0, 255, 0}); + new Float:flHoldTime = float(get_msg_arg_int(2)) / (1<<12); + if (flHoldTime > 0.0) { + if (pPlayer > 0) { + HandleExternalFade(pPlayer, flHoldTime); + } else { + for (new pTargetPlayer = 1; pTargetPlayer <= MaxClients; ++pTargetPlayer) { + if (!is_user_connected(pTargetPlayer)) { + continue; + } + + HandleExternalFade(pTargetPlayer, flHoldTime); + } + } } - } - return FMRES_HANDLED; + return PLUGIN_CONTINUE; } bool:Toggle(pPlayer) { - SetZombieVision(pPlayer, !g_bPlayerVision[pPlayer]); - return g_bPlayerVision[pPlayer]; + SetZombieVision(pPlayer, !g_bPlayerVision[pPlayer]); + return g_bPlayerVision[pPlayer]; } SetZombieVision(pPlayer, bool:bValue) { - if (bValue && !ZP_Player_IsZombie(pPlayer)) { - return; - } - - g_bPlayerVision[pPlayer] = bValue; + if (bValue == g_bPlayerVision[pPlayer]) { + return; + } + + if (bValue) { + if (!ZP_Player_IsZombie(pPlayer)) { + return; + } + + if (g_bPlayerVision[pPlayer]) { + return; + } + } - remove_task(pPlayer); + VisionFadeEffect(pPlayer, bValue); + g_bPlayerVision[pPlayer] = bValue; - if (bValue) { - set_task(0.1, "TaskLight", pPlayer, _, _, "b"); - ZP_Player_PlayZombieAmbient(pPlayer); - } + ExecuteForward(g_pFwZombieVision, g_pFwResult, pPlayer, bValue); } -public TaskLight(iTaskId) { - new pPlayer = iTaskId; +VisionFadeEffect(pPlayer, bool:bValue) { + if (g_bPlayerExternalFade[pPlayer]) { + return; + } - static Float:vecOrigin[3]; - pev(pPlayer, pev_origin, vecOrigin); + g_bIgnoreFadeMessage = true; + UTIL_ScreenFade(pPlayer, {VISION_SCREEN_FADE_COLOR}, VISION_EFFECT_TIME, 0.0, VISION_ALPHA, (bValue ? FFADE_OUT | FFADE_STAYOUT : FFADE_IN), .bExternal = true); + g_bIgnoreFadeMessage = false; +} + +HandleExternalFade(pPlayer, Float:flHoldTime) { + g_bPlayerExternalFade[pPlayer] = true; + set_task(flHoldTime, "Task_FixVisionScreenFade", TASKID_FIX_FADE + pPlayer); +} - // new iBrightness = 1; +public Task_FixVisionScreenFade(iTaskId) { + new pPlayer = iTaskId - TASKID_FIX_FADE; - // engfunc(EngFunc_MessageBegin, MSG_ONE, SVC_TEMPENTITY, vecOrigin, pPlayer); - // write_byte(TE_DLIGHT); - // engfunc(EngFunc_WriteCoord, vecOrigin[0]); - // engfunc(EngFunc_WriteCoord, vecOrigin[1]); - // engfunc(EngFunc_WriteCoord, vecOrigin[2]); - // write_byte(127); - // write_byte(iBrightness); - // write_byte(iBrightness); - // write_byte(iBrightness); - // write_byte(5); - // write_byte(0); - // message_end(); + if (is_user_connected(pPlayer) && g_bPlayerVision[pPlayer]) { + VisionFadeEffect(pPlayer, true); + } - UTIL_ScreenFade(pPlayer, {255, 195, 195}, 1.0, 0.1125, 20, FFADE_IN, .bExternal = true); + g_bPlayerExternalFade[pPlayer] = false; } diff --git a/src/scripts/entities/zp_entity_ammo_357.sma b/src/scripts/entities/zp_entity_ammo_357.sma index bcd1172..540b218 100644 --- a/src/scripts/entities/zp_entity_ammo_357.sma +++ b/src/scripts/entities/zp_entity_ammo_357.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -23,7 +22,7 @@ public plugin_init() { public plugin_precache() { precache_model(AMMO_BOX_MODEL); - CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}); + CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}, _, ZP_AMMO_RESPAWN_TIME); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME, "OnSpawn"); } @@ -35,22 +34,10 @@ public OnSpawn(pEntity) { pev(pEntity, pev_angles, vecAngles); new iAmmoHandler = ZP_Ammo_GetHandler(ZP_AMMO_TYPE); - new iWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); - engfunc(EngFunc_SetModel, iWeaponBox, AMMO_BOX_MODEL); - - if (ZP_AMMO_RESPAWN_TIME > 0.0) { - SetThink(pEntity, "ThinkSpawn"); - set_pev(pEntity, pev_nextthink, get_gametime() + ZP_AMMO_RESPAWN_TIME); - } -} + new pWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); + engfunc(EngFunc_SetModel, pWeaponBox, AMMO_BOX_MODEL); -public ThinkSpawn(pEntity) { - if (pev(pEntity, pev_nextthink) > get_gametime()) { - return; - } - - dllfunc(DLLFunc_Spawn, pEntity); + CE_Kill(pEntity); } - diff --git a/src/scripts/entities/zp_entity_ammo_556AR.sma b/src/scripts/entities/zp_entity_ammo_556AR.sma index 60a9691..85368e1 100644 --- a/src/scripts/entities/zp_entity_ammo_556AR.sma +++ b/src/scripts/entities/zp_entity_ammo_556AR.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -23,7 +22,7 @@ public plugin_init() { public plugin_precache() { precache_model(AMMO_BOX_MODEL); - CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}); + CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}, _, ZP_AMMO_RESPAWN_TIME); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME, "OnSpawn"); } @@ -35,21 +34,10 @@ public OnSpawn(pEntity) { pev(pEntity, pev_angles, vecAngles); new iAmmoHandler = ZP_Ammo_GetHandler(ZP_AMMO_TYPE); - new iWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); - engfunc(EngFunc_SetModel, iWeaponBox, AMMO_BOX_MODEL); - - if (ZP_AMMO_RESPAWN_TIME > 0.0) { - SetThink(pEntity, "ThinkSpawn"); - set_pev(pEntity, pev_nextthink, get_gametime() + ZP_AMMO_RESPAWN_TIME); - } -} - -public ThinkSpawn(pEntity) { - if (pev(pEntity, pev_nextthink) > get_gametime()) { - return; - } + new pWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); + engfunc(EngFunc_SetModel, pWeaponBox, AMMO_BOX_MODEL); - dllfunc(DLLFunc_Spawn, pEntity); + CE_Kill(pEntity); } diff --git a/src/scripts/entities/zp_entity_ammo_556box.sma b/src/scripts/entities/zp_entity_ammo_556box.sma index 6c8265a..cdc1eda 100644 --- a/src/scripts/entities/zp_entity_ammo_556box.sma +++ b/src/scripts/entities/zp_entity_ammo_556box.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -23,7 +22,7 @@ public plugin_init() { public plugin_precache() { precache_model(AMMO_BOX_MODEL); - CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}); + CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}, _, ZP_AMMO_RESPAWN_TIME); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME, "OnSpawn"); } @@ -35,22 +34,12 @@ public OnSpawn(pEntity) { pev(pEntity, pev_angles, vecAngles); new iAmmoHandler = ZP_Ammo_GetHandler(ZP_AMMO_TYPE); - new iWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); - engfunc(EngFunc_SetModel, iWeaponBox, AMMO_BOX_MODEL); - - if (ZP_AMMO_RESPAWN_TIME > 0.0) { - SetThink(pEntity, "ThinkSpawn"); - set_pev(pEntity, pev_nextthink, get_gametime() + ZP_AMMO_RESPAWN_TIME); - } -} + new pWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); + engfunc(EngFunc_SetModel, pWeaponBox, AMMO_BOX_MODEL); -public ThinkSpawn(pEntity) { - if (pev(pEntity, pev_nextthink) > get_gametime()) { - return; - } - - dllfunc(DLLFunc_Spawn, pEntity); + CE_Kill(pEntity); } + diff --git a/src/scripts/entities/zp_entity_ammo_9mmclip.sma b/src/scripts/entities/zp_entity_ammo_9mmclip.sma index ffdecee..740982c 100644 --- a/src/scripts/entities/zp_entity_ammo_9mmclip.sma +++ b/src/scripts/entities/zp_entity_ammo_9mmclip.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -23,7 +22,8 @@ public plugin_init() { public plugin_precache() { precache_model(AMMO_BOX_MODEL); - CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}); + + CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}, _, ZP_AMMO_RESPAWN_TIME); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME, "OnSpawn"); } @@ -35,21 +35,10 @@ public OnSpawn(pEntity) { pev(pEntity, pev_angles, vecAngles); new iAmmoHandler = ZP_Ammo_GetHandler(ZP_AMMO_PISTOL); - new iWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); - engfunc(EngFunc_SetModel, iWeaponBox, AMMO_BOX_MODEL); - - if (ZP_AMMO_RESPAWN_TIME > 0.0) { - SetThink(pEntity, "ThinkSpawn"); - set_pev(pEntity, pev_nextthink, get_gametime() + ZP_AMMO_RESPAWN_TIME); - } -} - -public ThinkSpawn(pEntity) { - if (pev(pEntity, pev_nextthink) > get_gametime()) { - return; - } + new pWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); + engfunc(EngFunc_SetModel, pWeaponBox, AMMO_BOX_MODEL); - dllfunc(DLLFunc_Spawn, pEntity); + CE_Kill(pEntity); } diff --git a/src/scripts/entities/zp_entity_ammo_buckshot.sma b/src/scripts/entities/zp_entity_ammo_buckshot.sma index 79c3cce..8e908de 100644 --- a/src/scripts/entities/zp_entity_ammo_buckshot.sma +++ b/src/scripts/entities/zp_entity_ammo_buckshot.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -23,7 +22,7 @@ public plugin_init() { public plugin_precache() { precache_model(AMMO_BOX_MODEL); - CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}); + CE_Register(ENTITY_NAME, _, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 8.0}, _, ZP_AMMO_RESPAWN_TIME); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME, "OnSpawn"); } @@ -35,22 +34,10 @@ public OnSpawn(pEntity) { pev(pEntity, pev_angles, vecAngles); new iAmmoHandler = ZP_Ammo_GetHandler(ZP_AMMO_TYPE); - new iWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); - engfunc(EngFunc_SetModel, iWeaponBox, AMMO_BOX_MODEL); - - if (ZP_AMMO_RESPAWN_TIME > 0.0) { - SetThink(pEntity, "ThinkSpawn"); - set_pev(pEntity, pev_nextthink, get_gametime() + ZP_AMMO_RESPAWN_TIME); - } -} + new pWeaponBox = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); + engfunc(EngFunc_SetModel, pWeaponBox, AMMO_BOX_MODEL); -public ThinkSpawn(pEntity) { - if (pev(pEntity, pev_nextthink) > get_gametime()) { - return; - } - - dllfunc(DLLFunc_Spawn, pEntity); + CE_Kill(pEntity); } - diff --git a/src/scripts/entities/zp_entity_func_breakable.sma b/src/scripts/entities/zp_entity_func_breakable.sma new file mode 100644 index 0000000..3370ad0 --- /dev/null +++ b/src/scripts/entities/zp_entity_func_breakable.sma @@ -0,0 +1,112 @@ +#pragma semicolon 1 + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define PLUGIN "[Entity] func_breakable" +#define AUTHOR "Hedgehog Fog" + +new Trie:g_iSpawnObjectMap; + +public plugin_precache() { + g_iSpawnObjectMap = TrieCreate(); + + TrieSetCell(g_iSpawnObjectMap, "3", engfunc(EngFunc_AllocString, ZP_WEAPON_PISTOL)); + TrieSetCell(g_iSpawnObjectMap, "4", engfunc(EngFunc_AllocString, ZP_AMMO_PISTOL)); + TrieSetCell(g_iSpawnObjectMap, "5", engfunc(EngFunc_AllocString, ZP_WEAPON_RIFLE)); + TrieSetCell(g_iSpawnObjectMap, "6", engfunc(EngFunc_AllocString, ZP_AMMO_RIFLE)); + TrieSetCell(g_iSpawnObjectMap, "7", engfunc(EngFunc_AllocString, ZP_WEAPON_SHOTGUN)); + TrieSetCell(g_iSpawnObjectMap, "8", engfunc(EngFunc_AllocString, ZP_AMMO_SHOTGUN)); + TrieSetCell(g_iSpawnObjectMap, "9", engfunc(EngFunc_AllocString, ZP_WEAPON_MAGNUM)); + TrieSetCell(g_iSpawnObjectMap, "10", engfunc(EngFunc_AllocString, ZP_AMMO_MAGNUM)); + TrieSetCell(g_iSpawnObjectMap, "11", engfunc(EngFunc_AllocString, ZP_WEAPON_GRENADE)); + TrieSetCell(g_iSpawnObjectMap, "12", engfunc(EngFunc_AllocString, ZP_WEAPON_SATCHEL)); + + RegisterHam(Ham_Keyvalue, "func_breakable", "OnKvd_Post", .Post = 1); +} + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + RegisterHam(Ham_TakeDamage, "func_breakable", "OnTakeDamage_Post", .Post = 1); +} + +public plugin_end() { + TrieDestroy(g_iSpawnObjectMap); +} + +public OnKvd_Post(pEntity, pKvdHandle) { + new szKey[32]; + get_kvd(pKvdHandle, KV_KeyName, szKey, charsmax(szKey)); + + if (!equal(szKey, "spawnobject")) { + return HAM_IGNORED; + } + + new szValue[32]; + get_kvd(pKvdHandle, KV_Value, szValue, charsmax(szValue)); + + if (szValue[0] == '^0') { + return HAM_IGNORED; + } + + new iszSpawnObject; + if (!TrieGetCell(g_iSpawnObjectMap, szValue, iszSpawnObject)) { + return HAM_IGNORED; + } + + set_ent_data(pEntity, "CBreakable", "m_iszSpawnObject", iszSpawnObject); + + return HAM_HANDLED; +} + +public OnTakeDamage_Post(pEntity) { + new Float:flHealth; + pev(pEntity, pev_health, flHealth); + + if (flHealth > 0.0) { + return HAM_IGNORED; + } + + static Float:vecOrigin[3]; + ExecuteHamB(Ham_BodyTarget, pEntity, 0, vecOrigin); + + static Float:vecAngles[3]; + pev(pEntity, pev_angles, vecAngles); + + new iszSpawnObject = get_ent_data(pEntity, "CBreakable", "m_iszSpawnObject"); + + static szSpawnObject[64]; + engfunc(EngFunc_SzFromIndex, iszSpawnObject, szSpawnObject, charsmax(szSpawnObject)); + + new CW:iCwHandler = CW_GetHandler(szSpawnObject); + new iAmmoHandler = ZP_Ammo_GetHandler(szSpawnObject); + + new pSpawnObject = -1; + if (iCwHandler != CW_INVALID_HANDLER) { + pSpawnObject = CW_SpawnWeaponBox(iCwHandler); + } else if (iAmmoHandler != -1) { + pSpawnObject = UTIL_CreateAmmoBox(ZP_Ammo_GetId(iAmmoHandler), ZP_Ammo_GetPackSize(iAmmoHandler)); + + static szModel[64]; + ZP_Ammo_GetPackModel(iAmmoHandler, szModel, charsmax(szModel)); + engfunc(EngFunc_SetModel, pSpawnObject, szModel); + } + + if (pSpawnObject == -1) { + return HAM_IGNORED; + } + + engfunc(EngFunc_SetOrigin, pSpawnObject, vecOrigin); + set_pev(pSpawnObject, pev_angles, vecAngles); + + return HAM_HANDLED; +} diff --git a/src/scripts/entities/zp_entity_func_train.sma b/src/scripts/entities/zp_entity_func_train.sma index 3abbdd5..32fe4ad 100644 --- a/src/scripts/entities/zp_entity_func_train.sma +++ b/src/scripts/entities/zp_entity_func_train.sma @@ -35,9 +35,9 @@ public plugin_init() { } public plugin_destroy() { - ArrayDestroy(g_iTrainEntity); - ArrayDestroy(g_fTrainSpeed); - ArrayDestroy(g_szTrainFirstTarget); + ArrayDestroy(g_iTrainEntity); + ArrayDestroy(g_fTrainSpeed); + ArrayDestroy(g_szTrainFirstTarget); } public OnSpawn(pEntity) { @@ -61,9 +61,9 @@ public OnSpawn(pEntity) { } public Round_Fw_RoundStart() { - for (new i = 0; i < g_iTrainEntityCount; ++i) { - Reset(i); - } + for (new i = 0; i < g_iTrainEntityCount; ++i) { + Reset(i); + } } Reset(iIndex) { @@ -75,8 +75,8 @@ Reset(iIndex) { pev(target, pev_target, szTarget, charsmax(szTarget)); set_pev(pEntity, pev_target, szTarget); - set_pev(pEntity, pev_velocity, Float:{0.0, 0.0, 0.0}); - set_pev(pEntity, pev_avelocity, Float:{0.0, 0.0, 0.0}); + set_pev(pEntity, pev_velocity, NULL_VECTOR); + set_pev(pEntity, pev_avelocity, NULL_VECTOR); set_pev(pEntity, pev_enemy, 0); set_pev(pEntity, pev_message, 0); set_pev(pEntity, pev_spawnflags, pev(pEntity, pev_spawnflags) | SF_TRAIN_WAIT_RETRIGGER); diff --git a/src/scripts/entities/zp_entity_func_vip_safetyzone.sma b/src/scripts/entities/zp_entity_func_vip_safetyzone.sma index a39bcfb..b3952ae 100644 --- a/src/scripts/entities/zp_entity_func_vip_safetyzone.sma +++ b/src/scripts/entities/zp_entity_func_vip_safetyzone.sma @@ -1,13 +1,12 @@ - #pragma semicolon 1 #include #include #include - -#include +#include #include +#include #define PLUGIN "[Entity] func_vip_safetyzone" #define AUTHOR "Hedgehog Fog" @@ -34,7 +33,7 @@ public OnSpawn_Post(pEntity) { new iEndroundTrigger = CE_Create("trigger_endround", vecOrigin, .temp = false); dllfunc(DLLFunc_Spawn, iEndroundTrigger); engfunc(EngFunc_SetModel, iEndroundTrigger, szModel); - set_pev(iEndroundTrigger, pev_spawnflags, (1<<0)); + set_pev(iEndroundTrigger, pev_spawnflags, BIT(0)); return HAM_HANDLED; } diff --git a/src/scripts/entities/zp_entity_info_player_team.sma b/src/scripts/entities/zp_entity_info_player_team.sma index 531bd00..ccac3e0 100644 --- a/src/scripts/entities/zp_entity_info_player_team.sma +++ b/src/scripts/entities/zp_entity_info_player_team.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -25,15 +24,10 @@ public plugin_init() { } public plugin_precache() { - CE_Register( - .szName = ENTITY_NAME_1 - ); - - CE_Register( - .szName = ENTITY_NAME_2 - ); - + CE_Register(ENTITY_NAME_1); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME_1, "OnInfoPlayerTeamSpawn"); + + CE_Register(ENTITY_NAME_2); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME_2, "OnInfoPlayerTeamSpawn"); g_iszInfoPlayerStart = engfunc(EngFunc_AllocString, "info_player_start"); diff --git a/src/scripts/entities/zp_entity_item_battery.sma b/src/scripts/entities/zp_entity_item_battery.sma index 5a3ae57..f4420c0 100644 --- a/src/scripts/entities/zp_entity_item_battery.sma +++ b/src/scripts/entities/zp_entity_item_battery.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -16,7 +15,7 @@ #define ENTITY_NAME "item_battery" -new g_iModel; +new g_iModelIndex; public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); @@ -26,13 +25,13 @@ public plugin_init() { public plugin_precache() { precache_sound("items/tr_kevlar.wav"); - g_iModel = precache_model(ZP_ITEM_BATTERY_MODEL); + g_iModelIndex = precache_model(ZP_ITEM_BATTERY_MODEL); RegisterHam(Ham_Spawn, ENTITY_NAME, "OnSpawn_Post", .Post = 1); } public OnSpawn_Post(pEntity) { - set_pev(pEntity, pev_modelindex, g_iModel); + set_pev(pEntity, pev_modelindex, g_iModelIndex); set_pev(pEntity, pev_solid, SOLID_TRIGGER); set_pev(pEntity, pev_effects, pev(pEntity, pev_effects) & ~EF_NODRAW); @@ -48,21 +47,24 @@ public OnTouch(pEntity, pToucher) { return HAM_SUPERCEDE; } - new Float:flArmorValue; - pev(pToucher, pev_armorvalue, flArmorValue); + if (GetHamReturnStatus() < HAM_SUPERCEDE) { + if (!get_member_game(m_bFreezePeriod)) { + new Float:flArmorValue; + pev(pToucher, pev_armorvalue, flArmorValue); - if (flArmorValue < 100.0) { - flArmorValue = floatmin(100.0, flArmorValue + 20.0); - set_member(pToucher, m_iKevlar, 1); - set_pev(pToucher, pev_armorvalue, flArmorValue); + if (flArmorValue < 100.0) { + flArmorValue = floatmin(100.0, flArmorValue + 20.0); + set_member(pToucher, m_iKevlar, 1); + set_pev(pToucher, pev_armorvalue, flArmorValue); - set_pev(pEntity, pev_effects, pev(pEntity, pev_effects) | EF_NODRAW); - set_pev(pEntity, pev_solid, SOLID_NOT); + set_pev(pEntity, pev_effects, pev(pEntity, pev_effects) | EF_NODRAW); + set_pev(pEntity, pev_solid, SOLID_NOT); - emit_sound(pToucher, CHAN_ITEM, "items/tr_kevlar.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + emit_sound(pToucher, CHAN_ITEM, "items/tr_kevlar.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } + } } - return HAM_SUPERCEDE; } diff --git a/src/scripts/entities/zp_entity_item_healthkit.sma b/src/scripts/entities/zp_entity_item_healthkit.sma index 2449f7d..49ecb34 100644 --- a/src/scripts/entities/zp_entity_item_healthkit.sma +++ b/src/scripts/entities/zp_entity_item_healthkit.sma @@ -1,4 +1,3 @@ - #pragma semicolon 1 #include @@ -48,20 +47,24 @@ public OnTouch(pEntity, pToucher) { return HAM_SUPERCEDE; } - new Float:flMaxHealth; - pev(pToucher, pev_max_health, flMaxHealth); - - new Float:flHealth; - pev(pToucher, pev_health, flHealth); + if (GetHamReturnStatus() < HAM_SUPERCEDE) { + if (!get_member_game(m_bFreezePeriod)) { + new Float:flMaxHealth; + pev(pToucher, pev_max_health, flMaxHealth); + + new Float:flHealth; + pev(pToucher, pev_health, flHealth); - if (flHealth < flMaxHealth) { - flHealth = floatmin(flMaxHealth, flHealth + 25.0); - set_pev(pToucher, pev_health, flHealth); + if (flHealth < flMaxHealth) { + flHealth = floatmin(flMaxHealth, flHealth + 25.0); + set_pev(pToucher, pev_health, flHealth); - set_pev(pEntity, pev_effects, pev(pEntity, pev_effects) | EF_NODRAW); - set_pev(pEntity, pev_solid, SOLID_NOT); + set_pev(pEntity, pev_effects, pev(pEntity, pev_effects) | EF_NODRAW); + set_pev(pEntity, pev_solid, SOLID_NOT); - emit_sound(pToucher, CHAN_ITEM, "items/smallmedkit1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + emit_sound(pToucher, CHAN_ITEM, "items/smallmedkit1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } + } } return HAM_SUPERCEDE; diff --git a/src/scripts/entities/zp_entity_trigger_endround.sma b/src/scripts/entities/zp_entity_trigger_endround.sma index ebe5167..51f56f7 100644 --- a/src/scripts/entities/zp_entity_trigger_endround.sma +++ b/src/scripts/entities/zp_entity_trigger_endround.sma @@ -4,18 +4,18 @@ #include #include #include +#include +#include #include #include - -#include #include #define PLUGIN "[Entity] trigger_endround" #define AUTHOR "Hedgehog Fog" #define ENTITY_NAME "trigger_endround" -#define SF_FORALL (1<<0) +#define SF_FORALL BIT(0) new g_ceHandler; new bool:g_bDispatched = false; @@ -34,6 +34,7 @@ public plugin_precache() { ); CE_RegisterHook(CEFunction_Spawn, ENTITY_NAME, "OnSpawn"); + CE_RegisterHook(CEFunction_KVD, ENTITY_NAME, "OnKvd"); } public Round_Fw_RoundStart() { @@ -47,6 +48,12 @@ public OnSpawn(pEntity) { ZP_GameRules_SetObjectiveMode(true); } +public OnKvd(pEntity, const szKey[], const szValue[]) { + if (equal(szKey, "master")) { + set_pev(pEntity, pev_message, szValue); + } +} + public OnTouch_Post(pEntity, pToucher) { if (g_ceHandler != CE_GetHandlerByEntity(pEntity)) { return HAM_IGNORED; @@ -64,6 +71,13 @@ public OnTouch_Post(pEntity, pToucher) { return HAM_IGNORED; } + static szMaster[32]; + pev(pEntity, pev_message, szMaster, charsmax(szMaster)); + + if (!UTIL_IsMasterTriggered(szMaster, pToucher)) { + return HAM_IGNORED; + } + g_bPlayerTouched[pToucher] = true; if (CheckWinConditions(pEntity)) { @@ -75,7 +89,7 @@ public OnTouch_Post(pEntity, pToucher) { } public Round_Fw_NewRound() { - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { g_bPlayerTouched[pPlayer] = false; } } @@ -84,7 +98,7 @@ bool:CheckWinConditions(pEntity) { new pToucherCount = 0; new iHumanCount = 0; - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { if (!is_user_connected(pPlayer)) { continue; } diff --git a/src/scripts/entities/zp_entity_weapon_357.sma b/src/scripts/entities/zp_entity_weapon_357.sma index 3cc661e..c3ff7f3 100644 --- a/src/scripts/entities/zp_entity_weapon_357.sma +++ b/src/scripts/entities/zp_entity_weapon_357.sma @@ -41,7 +41,7 @@ public OnSpawn(pEntity) { new Float:vecAngles[3]; pev(pEntity, pev_angles, vecAngles); - new iWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); + new pWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); } diff --git a/src/scripts/entities/zp_entity_weapon_556AR.sma b/src/scripts/entities/zp_entity_weapon_556AR.sma index b2c0856..0fb0e7d 100644 --- a/src/scripts/entities/zp_entity_weapon_556AR.sma +++ b/src/scripts/entities/zp_entity_weapon_556AR.sma @@ -41,7 +41,7 @@ public OnSpawn(pEntity) { new Float:vecAngles[3]; pev(pEntity, pev_angles, vecAngles); - new iWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); + new pWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); } diff --git a/src/scripts/entities/zp_entity_weapon_9mmhandgun.sma b/src/scripts/entities/zp_entity_weapon_9mmhandgun.sma index 4bd53ed..154fa60 100644 --- a/src/scripts/entities/zp_entity_weapon_9mmhandgun.sma +++ b/src/scripts/entities/zp_entity_weapon_9mmhandgun.sma @@ -41,7 +41,7 @@ public OnSpawn(pEntity) { new Float:vecAngles[3]; pev(pEntity, pev_angles, vecAngles); - new iWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); + new pWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); } diff --git a/src/scripts/entities/zp_entity_weapon_handgrenade.sma b/src/scripts/entities/zp_entity_weapon_handgrenade.sma index 94a54e5..990882b 100644 --- a/src/scripts/entities/zp_entity_weapon_handgrenade.sma +++ b/src/scripts/entities/zp_entity_weapon_handgrenade.sma @@ -42,7 +42,7 @@ public OnSpawn(pEntity) { new Float:vecAngles[3]; pev(pEntity, pev_angles, vecAngles); - new iWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); + new pWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); } \ No newline at end of file diff --git a/src/scripts/entities/zp_entity_weapon_satchel.sma b/src/scripts/entities/zp_entity_weapon_satchel.sma index 9fe8835..5943fd1 100644 --- a/src/scripts/entities/zp_entity_weapon_satchel.sma +++ b/src/scripts/entities/zp_entity_weapon_satchel.sma @@ -42,7 +42,7 @@ public OnSpawn(pEntity) { new Float:vecAngles[3]; pev(pEntity, pev_angles, vecAngles); - new iWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); + new pWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); } diff --git a/src/scripts/entities/zp_entity_weapon_shotgun.sma b/src/scripts/entities/zp_entity_weapon_shotgun.sma index 1e5073f..f3180fc 100644 --- a/src/scripts/entities/zp_entity_weapon_shotgun.sma +++ b/src/scripts/entities/zp_entity_weapon_shotgun.sma @@ -41,7 +41,7 @@ public OnSpawn(pEntity) { new Float:vecAngles[3]; pev(pEntity, pev_angles, vecAngles); - new iWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); - engfunc(EngFunc_SetOrigin, iWeaponBox, vecOrigin); - set_pev(iWeaponBox, pev_angles, vecAngles); + new pWeaponBox = CW_SpawnWeaponBox(g_iCwHandler); + engfunc(EngFunc_SetOrigin, pWeaponBox, vecOrigin); + set_pev(pWeaponBox, pev_angles, vecAngles); } diff --git a/src/scripts/entities/zp_entity_weaponbox.sma b/src/scripts/entities/zp_entity_weaponbox.sma index aa58aed..6a819fc 100644 --- a/src/scripts/entities/zp_entity_weaponbox.sma +++ b/src/scripts/entities/zp_entity_weaponbox.sma @@ -16,214 +16,203 @@ #define MAX_AMMO_SLOTS 32 -new const g_rgszAmmoName[][] = { - "", - "338Magnum", - "762Nato", - "556NatoBox", - "556Nato", - "buckshot", - "45ACP", - "57mm", - "50AE", - "357SIG", - "9mm", - "Flashbang", - "HEGrenade", - "SmokeGrenade", - "C4" -}; +new gmsgAmmoPickup; public plugin_init() { register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + gmsgAmmoPickup = get_user_msgid("AmmoPickup"); + RegisterHam(Ham_Touch, "weaponbox", "OnWeaponBoxTouch", .Post = 0); } -public OnWeaponBoxTouch(iWeaponBox, pToucher) { - if (!pev_valid(iWeaponBox)) { - return HAM_IGNORED; - } +public OnWeaponBoxTouch(pWeaponBox, pToucher) { + if (!pev_valid(pWeaponBox)) { + return HAM_IGNORED; + } - if (~pev(iWeaponBox, pev_flags) & FL_ONGROUND) { - return HAM_SUPERCEDE; - } + if (~pev(pWeaponBox, pev_flags) & FL_ONGROUND) { + return HAM_SUPERCEDE; + } - if (!UTIL_IsPlayer(pToucher)) { - return HAM_IGNORED; - } + if (!UTIL_IsPlayer(pToucher)) { + return HAM_IGNORED; + } - if (!is_user_alive(pToucher)) { - return HAM_IGNORED; - } + if (!is_user_alive(pToucher)) { + return HAM_IGNORED; + } - if (GetHamReturnStatus() < HAM_SUPERCEDE) { - PickupWeaponBox(pToucher, iWeaponBox); - } + if (GetHamReturnStatus() < HAM_SUPERCEDE) { + if (!get_member_game(m_bFreezePeriod)) { + PickupWeaponBox(pToucher, pWeaponBox); + } + } - return HAM_SUPERCEDE; + return HAM_SUPERCEDE; } public Round_Fw_NewRound() { - new iWeaponBox; - while((iWeaponBox = engfunc(EngFunc_FindEntityByString, iWeaponBox, "classname", "weaponbox")) > 0) { - set_pev(iWeaponBox, pev_flags, FL_KILLME); - } -} - -PickupWeaponBox(pPlayer, iWeaponBox) { - if (ZP_Player_IsZombie(pPlayer)) { - return; - } - - new bDestroy = PickupWeaponBoxItems(pPlayer, iWeaponBox); - bDestroy = PickupWeaponBoxAmmo(pPlayer, iWeaponBox) && bDestroy; - - if (bDestroy) { - set_pev(iWeaponBox, pev_flags, FL_KILLME); - } + new pWeaponBox; + while((pWeaponBox = engfunc(EngFunc_FindEntityByString, pWeaponBox, "classname", "weaponbox")) > 0) { + set_pev(pWeaponBox, pev_flags, FL_KILLME); + } } -bool:PickupWeaponBoxItems(pPlayer, iWeaponBox) { - new bool:bResult = true; - - for (new iSlot = 0; iSlot < 6; ++iSlot) { - new pItem = get_member(iWeaponBox, m_WeaponBox_rgpPlayerItems, iSlot); // get main item - set_member(iWeaponBox, m_WeaponBox_rgpPlayerItems, -1, iSlot); // reset main item +PickupWeaponBox(pPlayer, pWeaponBox) { + if (ZP_Player_IsZombie(pPlayer)) { + return; + } + + new bDestroy = PickupWeaponBoxItems(pPlayer, pWeaponBox); + bDestroy = PickupWeaponBoxAmmo(pPlayer, pWeaponBox) && bDestroy; - new iPrevBoxItem = -1; - while (pItem != -1) { - new iNextItem = get_member(pItem, m_pNext); // get next item - set_member(pItem, m_pNext, -1); // reset next item + if (bDestroy) { + set_pev(pWeaponBox, pev_flags, FL_KILLME); + } +} - new iId = get_member(pItem, m_iId); - - new bAmmoExtracted = ExtractAmmo(pItem, pPlayer); +bool:PickupWeaponBoxItems(pPlayer, pWeaponBox) { + new bool:bResult = true; - new pPlayerItem = FindPlayerItemById(pPlayer, iId); - if (pPlayerItem != -1) { // return item to weaponbox if player has the item - if (!bAmmoExtracted) { - // if (get_member(pItem, m_Weapon_iClip) != -1 || get_member(pItem, m_Weapon_iPrimaryAmmoType) <= 0) { - if (iPrevBoxItem == -1) { - set_member(iWeaponBox, m_WeaponBox_rgpPlayerItems, pItem, iSlot); // set main item + for (new iSlot = 0; iSlot < 6; ++iSlot) { + new pItem = get_member(pWeaponBox, m_WeaponBox_rgpPlayerItems, iSlot); // get main item + set_member(pWeaponBox, m_WeaponBox_rgpPlayerItems, -1, iSlot); // reset main item + + new iPrevBoxItem = -1; + while (pItem != -1) { + new iNextItem = get_member(pItem, m_pNext); // get next item + set_member(pItem, m_pNext, -1); // reset next item + + new iId = get_member(pItem, m_iId); + + new bAmmoExtracted = ExtractAmmo(pItem, pPlayer); + + new pPlayerItem = FindPlayerItemById(pPlayer, iId); + if (pPlayerItem != -1) { // return item to weaponbox if player has the item + if (!bAmmoExtracted) { + // if (get_member(pItem, m_Weapon_iClip) != -1 || get_member(pItem, m_Weapon_iPrimaryAmmoType) <= 0) { + if (iPrevBoxItem == -1) { + set_member(pWeaponBox, m_WeaponBox_rgpPlayerItems, pItem, iSlot); // set main item + } else { + set_member(iPrevBoxItem, m_pNext, pItem); // add item to the list + } + + iPrevBoxItem = pItem; + bResult = false; + // } + } } else { - set_member(iPrevBoxItem, m_pNext, pItem); // add item to the list + if (ExecuteHamB(Ham_AddPlayerItem, pPlayer, pItem)) { + ExecuteHamB(Ham_Item_AttachToPlayer, pItem, pPlayer); // add item to the player + emit_sound(pPlayer, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } - iPrevBoxItem = pItem; - bResult = false; - // } - } - } else { - if(ExecuteHam(Ham_AddPlayerItem, pPlayer, pItem)) { - ExecuteHam(Ham_Item_AttachToPlayer, pItem, pPlayer); // add item to the player - emit_sound(pPlayer, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + pItem = iNextItem; } - } - - pItem = iNextItem; } - } - return bResult; + return bResult; } -bool:PickupWeaponBoxAmmo(pPlayer, iWeaponBox) { - new bool:bResult = true; +bool:PickupWeaponBoxAmmo(pPlayer, pWeaponBox) { + new bool:bResult = true; - for (new iSlot = 0; iSlot < MAX_AMMO_SLOTS; ++iSlot) { - new iAmount = get_member(iWeaponBox, m_WeaponBox_rgAmmo, iSlot); + for (new iSlot = 0; iSlot < MAX_AMMO_SLOTS; ++iSlot) { + new iAmount = get_member(pWeaponBox, m_WeaponBox_rgAmmo, iSlot); - static szAmmoName[16]; - get_member(iWeaponBox, m_WeaponBox_rgiszAmmo, szAmmoName, charsmax(szAmmoName), iSlot); + static szAmmoName[16]; + get_member(pWeaponBox, m_WeaponBox_rgiszAmmo, szAmmoName, charsmax(szAmmoName), iSlot); - if (szAmmoName[0] == '^0') { - continue; - } + if (szAmmoName[0] == '^0') { + continue; + } - new iAmmoId = GetAmmoId(szAmmoName); - new iAmmoHandler = ZP_Ammo_GetHandlerById(iAmmoId); - if (iAmmoHandler == -1) { - continue; - } - - iAmount -= AddAmmo(pPlayer, iAmmoHandler, iAmount); - set_member(iWeaponBox, m_WeaponBox_rgAmmo, iAmount, iSlot); + new iAmmoId = GetAmmoId(szAmmoName); + new iAmmoHandler = ZP_Ammo_GetHandlerById(iAmmoId); + if (iAmmoHandler == -1) { + continue; + } + + iAmount -= AddAmmo(pPlayer, iAmmoHandler, iAmount); + set_member(pWeaponBox, m_WeaponBox_rgAmmo, iAmount, iSlot); - if (!iAmount) { - set_member(iWeaponBox, m_WeaponBox_rgiszAmmo, 0, iSlot); - } else { - bResult = false; + if (!iAmount) { + set_member(pWeaponBox, m_WeaponBox_rgiszAmmo, 0, iSlot); + } else { + bResult = false; + } } - } - return bResult; + return bResult; } bool:ExtractAmmo(pItem, pPlayer) { - new iAmmoId = get_member(pItem, m_Weapon_iPrimaryAmmoType); - if (iAmmoId <= 0) { - return false; - } - - new iAmmoAmount = get_member(pItem, m_Weapon_iDefaultAmmo); - if (!iAmmoAmount) { - return false; - } - - new iAmmoHandler = ZP_Ammo_GetHandlerById(iAmmoId); - if (iAmmoHandler == -1) { - return false; - } + new iAmmoId = get_member(pItem, m_Weapon_iPrimaryAmmoType); + if (iAmmoId <= 0) { + return false; + } + + new iAmmoAmount = get_member(pItem, m_Weapon_iDefaultAmmo); + if (!iAmmoAmount) { + return false; + } + + new iAmmoHandler = ZP_Ammo_GetHandlerById(iAmmoId); + if (iAmmoHandler == -1) { + return false; + } - iAmmoAmount -= AddAmmo(pPlayer, iAmmoHandler, iAmmoAmount); - set_member(pItem, m_Weapon_iDefaultAmmo, iAmmoAmount); + iAmmoAmount -= AddAmmo(pPlayer, iAmmoHandler, iAmmoAmount); + set_member(pItem, m_Weapon_iDefaultAmmo, iAmmoAmount); - return !iAmmoAmount; + return !iAmmoAmount; } AddAmmo(pPlayer, iAmmoHandler, iAmount) { - new iAmmoId = ZP_Ammo_GetId(iAmmoHandler); + new iAmmoId = ZP_Ammo_GetId(iAmmoHandler); - static szAmmo[16]; - ZP_Ammo_GetName(iAmmoHandler, szAmmo, charsmax(szAmmo)); + static szAmmo[16]; + ZP_Ammo_GetName(iAmmoHandler, szAmmo, charsmax(szAmmo)); - iAmount = ZP_Player_AddAmmo(pPlayer, szAmmo, iAmount); + iAmount = ZP_Player_AddAmmo(pPlayer, szAmmo, iAmount); - if (iAmount) { - emessage_begin(MSG_ONE, get_user_msgid("AmmoPickup"), _, pPlayer); - ewrite_byte(iAmmoId); - ewrite_byte(iAmount); - emessage_end(); + if (iAmount) { + emessage_begin(MSG_ONE, gmsgAmmoPickup, _, pPlayer); + ewrite_byte(iAmmoId); + ewrite_byte(iAmount); + emessage_end(); - emit_sound(pPlayer, CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } + emit_sound(pPlayer, CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } - return iAmount; + return iAmount; } FindPlayerItemById(pPlayer, iId) { for (new iSlot = 0; iSlot < 6; ++iSlot) { - new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); - - while (pItem != -1) { - if (iId == get_member(pItem, m_iId)) { - return pItem; - } + new pItem = get_member(pPlayer, m_rgpPlayerItems, iSlot); + + while (pItem != -1) { + if (iId == get_member(pItem, m_iId)) { + return pItem; + } - pItem = get_member(pItem, m_pNext); - } + pItem = get_member(pItem, m_pNext); + } } return -1; } GetAmmoId(const szAmmoName[]) { - for (new iAmmoId = 0; iAmmoId < sizeof(g_rgszAmmoName); ++iAmmoId) { - if (equal(g_rgszAmmoName[iAmmoId], szAmmoName)) { - return iAmmoId; + new iSize = sizeof(AMMO_LIST); + for (new iAmmoId = 0; iAmmoId < iSize; ++iAmmoId) { + if (equal(AMMO_LIST[iAmmoId], szAmmoName)) { + return iAmmoId; + } } - } - return -1; + return -1; } diff --git a/src/scripts/extra/zp_hud_hints.sma b/src/scripts/extra/zp_hud_hints.sma new file mode 100644 index 0000000..102a168 --- /dev/null +++ b/src/scripts/extra/zp_hud_hints.sma @@ -0,0 +1,345 @@ +#pragma semicolon 1 + +#include +#include +#include +#include + +#include +#include + +#define PLUGIN "[Zombie Panic] Hints HUD" +#define AUTHOR "Hedgehog Fog" + +enum MessageType { + MessageType_Info, + MessageType_Important, + MessageType_Warn +} + +#define HUD_CHAR_WIDTH 0.02083 // 16.0 / 768.0 +#define DHUD_CHAR_WIDTH 0.03125 // 24.0 / 768.0 + +#define MESSAGE_HINT_POS -1.0, 0.10 +#define MESSAGE_HINT_HOLD_TIME 5.0 +#define MESSAGE_HINT_FADEIN_TIME 1.0 +#define MESSAGE_HINT_FADEOUT_TIME 1.0 + +#define MESSAGE_OBJECTIVE_POS -1.0, 0.20 +#define MESSAGE_OBJECTIVE_HOLD_TIME 5.0 +#define MESSAGE_OBJECTIVE_FADEIN_TIME 1.0 +#define MESSAGE_OBJECTIVE_FADEOUT_TIME 1.0 + +#define MESSAGE_SPEED_WARN_POS -1.0, 0.10 +#define MESSAGE_SPEED_HOLD_TIME 5.0 +#define MESSAGE_SPEED_FADEIN_TIME 1.0 +#define MESSAGE_SPEED_FADEOUT_TIME 1.0 + +#define MESSAGE_RESPAWN_POS -1.0, -1.0 +#define MESSAGE_RESPAWNHOLD_TIME 5.0 +#define MESSAGE_RESPAWNFADEIN_TIME 1.0 +#define MESSAGE_RESPAWNFADEOUT_TIME 1.0 + +#define MESSAGE_PICKUP_POS -1.0, 0.65 +#define MESSAGE_PICKUP_HOLD_TIME 0.75 +#define MESSAGE_PICKUP_FADEIN_TIME 0.5 +#define MESSAGE_PICKUP_FADEOUT_TIME 1.0 + +#define HINTS_KEY "zp_hints" + +enum Message { + Message_Title[64], + Message_Text[256] +} + +new g_rgMessageColors[MessageType][3] = { + { 117, 255, 127 }, + { 0, 255, 255 }, + { 255, 160, 0 } +}; + +new g_message[Message]; + +new bool:g_bShowObjectiveMessage[MAX_PLAYERS + 1] = { true, ... }; +new bool:g_bPlayerShowSpeedWarning[MAX_PLAYERS + 1] = { true, ... }; +new Float:g_flPlayerLastPickupHint[MAX_PLAYERS + 1] = { 0.0, ... }; + +new g_pCvarEnabled; + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_dictionary("zombiepanic.txt"); + + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); + + register_event("AmmoPickup", "OnItemPickup", "be"); + register_event("WeapPickup", "OnItemPickup", "be"); + + g_pCvarEnabled = register_cvar("zp_hints", "1"); +} + +public OnPlayerSpawn_Post(pPlayer) { + if (!get_pcvar_num(g_pCvarEnabled)) { + return HAM_IGNORED; + } + + if (!IsPlayerHintsEnabled(pPlayer)) { + return HAM_IGNORED; + } + + if (Round_IsRoundStarted()) { + if (g_bShowObjectiveMessage[pPlayer]) { + if (ZP_GameRules_GetObjectiveMode()) { + SetMessageTitle("%L", pPlayer, "ZPO_OBJECTIVE_TITLE"); + + if (ZP_Player_IsZombie(pPlayer)) { + SetMessageText("%L", pPlayer, "ZPO_OBJECTIVE_ZOMBIE"); + } else { + SetMessageText("%L", pPlayer, "ZPO_OBJECTIVE_HUMAN"); + } + } else { + SetMessageTitle("%L", pPlayer, "ZP_OBJECTIVE_TITLE"); + + if (ZP_Player_IsZombie(pPlayer)) { + SetMessageText("%L", pPlayer, "ZP_OBJECTIVE_ZOMBIE"); + } else { + SetMessageText("%L", pPlayer, "ZP_OBJECTIVE_HUMAN"); + } + } + + g_bShowObjectiveMessage[pPlayer] = false; + + ShowMessage( + pPlayer, + MessageType_Important, + MESSAGE_OBJECTIVE_POS, + MESSAGE_OBJECTIVE_HOLD_TIME, + MESSAGE_OBJECTIVE_FADEIN_TIME, + MESSAGE_OBJECTIVE_FADEOUT_TIME + ); + } + } else { + SetMessageTitle("%L", pPlayer, "ZP_HINT_TITLE"); + + switch (random(1)) { + case 0: { + SetMessageText("%L", pPlayer, "ZP_HINT_PANIC"); + } + case 1: { + SetMessageText("%L", pPlayer, "ZP_HINT_DROP_AMMO"); + } + case 2: { + SetMessageText("%L", pPlayer, "ZP_HINT_PICKUP"); + } + } + + ShowMessage( + pPlayer, + MessageType_Info, + MESSAGE_HINT_POS, + MESSAGE_HINT_HOLD_TIME, + MESSAGE_HINT_FADEIN_TIME, + MESSAGE_HINT_FADEOUT_TIME + ); + } + + return HAM_IGNORED; +} + +public OnPlayerKilled_Post(pPlayer) { + if (!get_pcvar_num(g_pCvarEnabled)) { + return HAM_IGNORED; + } + + if (!IsPlayerHintsEnabled(pPlayer)) { + return HAM_IGNORED; + } + + if (Round_IsRoundEnd()) { + return HAM_IGNORED; + } + + SetMessageTitle("%L", pPlayer, "ZP_RESPAWN_TITLE"); + + if (ZP_Player_IsZombie(pPlayer)) { + if (ZP_GameRules_GetZombieLives() > 0) { + SetMessageText("%L", pPlayer, "ZP_RESPAWN_ZOMBIE"); + } else { + SetMessageText("%L", pPlayer, "ZP_RESPAWN_NOLIVES"); + } + } else { + SetMessageText("%L", pPlayer, "ZP_RESPAWN_HUMAN"); + } + + ShowMessage( + pPlayer, + MessageType_Info, + MESSAGE_RESPAWN_POS, + MESSAGE_RESPAWNHOLD_TIME, + MESSAGE_RESPAWNFADEIN_TIME, + MESSAGE_RESPAWNFADEOUT_TIME + ); + + return HAM_IGNORED; +} + +public Round_Fw_NewRound() { + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + g_bShowObjectiveMessage[pPlayer] = true; + g_bPlayerShowSpeedWarning[pPlayer] = true; + g_flPlayerLastPickupHint[pPlayer] = 0.0; + } +} + +public OnItemPickup(pPlayer) { + if (!get_pcvar_num(g_pCvarEnabled)) { + return PLUGIN_CONTINUE; + } + + if (!IsPlayerHintsEnabled(pPlayer)) { + return PLUGIN_CONTINUE; + } + + if (!g_bPlayerShowSpeedWarning[pPlayer]) { + return PLUGIN_CONTINUE; + } + + if (get_member_game(m_bFreezePeriod)) { + return PLUGIN_CONTINUE; + } + + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_CONTINUE; + } + + new Float:flMaxSpeed; + pev(pPlayer, pev_maxspeed, flMaxSpeed); + + if (flMaxSpeed < ZP_ZOMBIE_SPEED) { + SetMessageTitle("%L", pPlayer, "ZP_WARN_TITLE"); + SetMessageText("%L", pPlayer, "ZP_WARN_SPEED"); + ShowMessage( + pPlayer, + MessageType_Warn, + MESSAGE_SPEED_WARN_POS, + MESSAGE_SPEED_HOLD_TIME, + MESSAGE_SPEED_FADEIN_TIME, + MESSAGE_SPEED_FADEOUT_TIME + ); + + g_bPlayerShowSpeedWarning[pPlayer] = false; + } + + return PLUGIN_CONTINUE; +} + +public ZP_Fw_Player_AimItem(pPlayer) { + if (!get_pcvar_num(g_pCvarEnabled)) { + return; + } + + if (!IsPlayerHintsEnabled(pPlayer)) { + return; + } + + if (get_gametime() - g_flPlayerLastPickupHint[pPlayer] < 1.0) { + return; + } + + SetMessageTitle("%L", pPlayer, "ZP_ITEM_PICKUP_TITLE"); + SetMessageText("%L", pPlayer, "ZP_ITEM_PICKUP"); + + ShowMessage( + pPlayer, + MessageType_Warn, + MESSAGE_PICKUP_POS, + MESSAGE_PICKUP_HOLD_TIME, + MESSAGE_PICKUP_FADEIN_TIME, + MESSAGE_PICKUP_FADEOUT_TIME + ); + + g_flPlayerLastPickupHint[pPlayer] = get_gametime(); +} + +SetMessageTitle(const szTitle[], any:...) { + static szBuffer[64]; + vformat(szBuffer, charsmax(szBuffer), szTitle, 2); + + copy(g_message[Message_Title], charsmax(g_message[Message_Title]), szBuffer); +} + +SetMessageText(const szText[], any:...) { + static szBuffer[256]; + vformat(szBuffer, charsmax(szBuffer), szText, 2); + + copy(g_message[Message_Text], charsmax(g_message[Message_Text]), szBuffer); +} + +ShowMessage(pPlayer, MessageType:iType, Float:flPosX = -1.0, Float:flPosY = -1.0, Float:holdTime = 5.0, Float:fadeInTime = 1.0, Float:fadeOutTime = 1.0) { + new Float:flTitlePosY = flPosY; + if (flTitlePosY == -1.0) { + new Float:flTextWidth = HUD_CHAR_WIDTH * UTIL_CalculateHUDLines(g_message[Message_Text]); + flTitlePosY = 0.5 - DHUD_CHAR_WIDTH - (flTextWidth / 2); + } else { + flTitlePosY -= DHUD_CHAR_WIDTH; + } + + set_dhudmessage( + g_rgMessageColors[iType][0], + g_rgMessageColors[iType][1], + g_rgMessageColors[iType][2], + flPosX, + flTitlePosY, + 0, + 0.0, + holdTime, + fadeInTime, + fadeOutTime + ); + + show_dhudmessage(pPlayer, g_message[Message_Title]); + + set_hudmessage( + 255, + 255, + 255, + flPosX, + flPosY, + 0, + 0.0, + holdTime, + fadeInTime, + fadeOutTime, + -1 + ); + + show_hudmessage(pPlayer, g_message[Message_Text]); +} + +IsPlayerHintsEnabled(pPlayer) { + static szValue[2]; + get_user_info(pPlayer, HINTS_KEY, szValue, charsmax(szValue)); + + return szValue[0] != '0'; +} + +stock UTIL_CalculateHUDLines(const szText[]) { + new iLineCount = 1; + new iLineLength = 0; + + for (new i = 0; i < 256; ++i) { + if (szText[i] == 0) { + break; + } + + iLineLength++; + + if (szText[i] == '^n' || iLineLength > 68) { + iLineCount++; + iLineLength = 0; + } + } + + return iLineCount; +} diff --git a/src/scripts/extra/zp_objective_marks.sma b/src/scripts/extra/zp_objective_marks.sma new file mode 100644 index 0000000..bff3e9a --- /dev/null +++ b/src/scripts/extra/zp_objective_marks.sma @@ -0,0 +1,365 @@ +#pragma semicolon 1 + +#include +#include +#include +#include +#include + +#include +#include + +#define PLUGIN "[Zombie Panic] Objective Marks" +#define AUTHOR "Hedgehog Fog" + +#define MARK_CLASSNAME "_mark" +#define SPRITE_WIDTH 128.0 +#define SPRITE_HEIGHT 128.0 +#define SPRITE_SCALE 0.03125 +#define SPRITE_AMT 50.0 +#define MARK_UPDATE_DELAY 0.1 +#define MARK_MAX_VELOCITY 200.0 +#define MARK_MAX_MOVE_STEP_LENGTH 1000.0 +#define MARK_MAX_SCALE_STEP 0.125 +#define MARK_MAX_SCALE_STEP_LENGTH 100.0 + +enum _:Frame { TopLeft, TopRight, BottomLeft, BottomRight }; + +enum PlayerData { + Float:Player_Origin[3], + Float:Player_MarkOrigin[3], + Float:Player_MarkAngles[3], + Float:Player_MarkUpdateTime, + Float:Player_MarkScale +} + +new Array:g_irgMarks; +new g_iMarkModelIndex; +new g_rgPlayerData[MAX_PLAYERS + 1][12][PlayerData]; + +new g_pCvarEnabled; + +public plugin_precache() { + g_irgMarks = ArrayCreate(); + g_iMarkModelIndex = precache_model(ZP_OBJECTIVE_MARK_SPRITE); + + RegisterHam(Ham_Spawn, "func_button", "OnButtonSpawn_Post", .Post = 1); +} + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + if (!ZP_GameRules_GetObjectiveMode()) { + for (new i = ArraySize(g_irgMarks) - 1; i >= 0; --i) { + new pMark = ArrayGetCell(g_irgMarks, i); + engfunc(EngFunc_RemoveEntity, pMark); + ArrayDeleteItem(g_irgMarks, i); + } + + return; + } + + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + + register_forward(FM_AddToFullPack, "OnAddToFullPack", 0); + register_forward(FM_AddToFullPack, "OnAddToFullPack_Post", 1); + register_forward(FM_CheckVisibility, "OnCheckVisibility"); + + g_pCvarEnabled = register_cvar("zp_objective_marks", "1"); +} + +public plugin_end() { + ArrayDestroy(g_irgMarks); +} + +public OnButtonSpawn_Post(pButton) { + new pMark = CreateMark(pButton); + set_pev(pMark, pev_iuser1, ArraySize(g_irgMarks)); + ArrayPushCell(g_irgMarks, pMark); +} + +public OnPlayerSpawn_Post(pPlayer) { + new iMarkCount = ArraySize(g_irgMarks); + for (new iMarkIndex = 0; iMarkIndex < iMarkCount; ++iMarkIndex) { + g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkUpdateTime] = 0.0; + } +} + +public OnAddToFullPack(es, e, pEntity, pHost, pHostFlags, pPlayer, pSet) { + if (!UTIL_IsPlayer(pHost)) { + return FMRES_IGNORED; + } + + if (is_user_bot(pHost)) { + return FMRES_IGNORED; + } + + if (!pev_valid(pEntity)) { + return FMRES_IGNORED; + } + + static szClassname[32]; + pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); + + if (!equal(szClassname, MARK_CLASSNAME)) { + return FMRES_IGNORED; + } + + if (get_pcvar_num(g_pCvarEnabled) <= 0) { + return FMRES_SUPERCEDE; + } + + if (!is_user_alive(pHost)) { + return FMRES_SUPERCEDE; + } + + if (ZP_Player_IsZombie(pHost)) { + return FMRES_SUPERCEDE; + } + + new pButton = pev(pEntity, pev_owner); + new iMarkIndex = pev(pEntity, pev_iuser1); + if (!IsUsableObjective(pHost, pButton)) { + g_rgPlayerData[pHost][iMarkIndex][Player_MarkUpdateTime] = 0.0; + return FMRES_SUPERCEDE; + } + + new Float:flDelta = get_gametime() - g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkUpdateTime]; + if (!g_rgPlayerData[pHost][iMarkIndex][Player_MarkUpdateTime] || flDelta >= MARK_UPDATE_DELAY) { + CalculateMark(pEntity, pHost); + } + + return FMRES_HANDLED; +} + +public OnAddToFullPack_Post(es, e, pEntity, pHost, pHostFlags, pPlayer, pSet) { + if (!UTIL_IsPlayer(pHost)) { + return FMRES_IGNORED; + } + + if (!is_user_alive(pHost)) { + return FMRES_IGNORED; + } + + if (ZP_Player_IsZombie(pHost)) { + return FMRES_IGNORED; + } + + if (!pev_valid(pEntity)) { + return FMRES_IGNORED; + } + + static szClassname[32]; + pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); + + if (!equal(szClassname, MARK_CLASSNAME)) { + return FMRES_IGNORED; + } + + if (get_pcvar_num(g_pCvarEnabled) <= 0) { + return FMRES_IGNORED; + } + + new iMarkIndex = pev(pEntity, pev_iuser1); + if (g_rgPlayerData[pHost][iMarkIndex][Player_MarkUpdateTime] > 0.0) { + set_es(es, ES_Angles, g_rgPlayerData[pHost][iMarkIndex][Player_MarkAngles]); + set_es(es, ES_Origin, g_rgPlayerData[pHost][iMarkIndex][Player_MarkOrigin]); + set_es(es, ES_Scale, g_rgPlayerData[pHost][iMarkIndex][Player_MarkScale]); + } + + return FMRES_HANDLED; +} + +public OnCheckVisibility(pEntity) { + if (!pev_valid(pEntity)) { + return FMRES_IGNORED; + } + + static szClassname[32]; + pev(pEntity, pev_classname, szClassname, charsmax(szClassname)); + + if (!equal(szClassname, MARK_CLASSNAME)) { + return FMRES_IGNORED; + } + + forward_return(FMV_CELL, 1); + return FMRES_SUPERCEDE; +} + +CreateMark(pButton) { + new pMark = rg_create_entity("info_target"); + + set_pev(pMark, pev_classname, MARK_CLASSNAME); + set_pev(pMark, pev_scale, SPRITE_SCALE); + set_pev(pMark, pev_modelindex, g_iMarkModelIndex); + set_pev(pMark, pev_rendermode, kRenderTransAdd); + set_pev(pMark, pev_renderamt, SPRITE_AMT); + set_pev(pMark, pev_movetype, MOVETYPE_FLYMISSILE); + set_pev(pMark, pev_solid, SOLID_NOT); + set_pev(pMark, pev_spawnflags, SF_SPRITE_STARTON); + set_pev(pMark, pev_owner, pButton); + + dllfunc(DLLFunc_Spawn, pMark); + + static Float:vecOrigin[3]; + ExecuteHam(Ham_BodyTarget, pButton, 0, vecOrigin); + engfunc(EngFunc_SetOrigin, pMark, vecOrigin); + + return pMark; +} + +CalculateMark(pMark, pPlayer) { + new iMarkIndex = pev(pMark, pev_iuser1); + new Float:flDelta = get_gametime() - g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkUpdateTime]; + + static Float:vecOrigin[3]; + ExecuteHam(Ham_Player_GetGunPosition, pPlayer, vecOrigin); + + static Float:vecTarget[3]; + pev(pMark, pev_origin, vecTarget); + + // ANCHOR: Smooth movement + if (g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkUpdateTime] > 0.0) { + new Float:flMaxStep = MARK_MAX_VELOCITY * flDelta; + new Float:flDirLen = xs_vec_distance(vecOrigin, g_rgPlayerData[pPlayer][iMarkIndex][Player_Origin]); + + if (flDirLen > flMaxStep && flDirLen < MARK_MAX_MOVE_STEP_LENGTH) { + for (new i = 0; i < 3; ++i) { + vecOrigin[i] = g_rgPlayerData[pPlayer][iMarkIndex][Player_Origin][i] + (((vecOrigin[i] - g_rgPlayerData[pPlayer][iMarkIndex][Player_Origin][i]) / flDirLen) * flMaxStep); + } + } + } + + // ANCHOR: Caclulate angles + static Float:vecDir[3]; + xs_vec_sub(vecTarget, vecOrigin, vecDir); + + static Float:vecAngles[3]; + xs_vec_normalize(vecDir, vecAngles); + vector_to_angle(vecAngles, vecAngles); + vecAngles[0] = -vecAngles[0]; + + // ANCHOR: Calculate new target + static Float:vecForward[3]; + angle_vector(vecAngles, ANGLEVECTOR_FORWARD, vecForward); + + static Float:vecUp[3]; + angle_vector(vecAngles, ANGLEVECTOR_UP, vecUp); + + static Float:vecRight[3]; + angle_vector(vecAngles, ANGLEVECTOR_RIGHT, vecRight); + + static Float:rgvecFrameEnd[Frame][3]; + CreateFrame(vecTarget, SPRITE_WIDTH * SPRITE_SCALE, SPRITE_HEIGHT * SPRITE_SCALE, vecUp, vecRight, rgvecFrameEnd); + TraceFrame(vecOrigin, rgvecFrameEnd, pPlayer, rgvecFrameEnd); + + for (new i = 0; i < 3; ++i) { + vecTarget[i] = (rgvecFrameEnd[TopLeft][i] + rgvecFrameEnd[BottomRight][i]) * 0.5; + } + + // ANCHOR: Calculate scale + new Float:flScale = SPRITE_SCALE * (xs_vec_distance(vecOrigin, vecTarget) / 100); + + // ANCHOR: Smooth scale + if (g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkUpdateTime] > 0.0) { + new Float:flLastDistance = xs_vec_distance(g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkOrigin], g_rgPlayerData[pPlayer][iMarkIndex][Player_Origin]); + new Float:flDistance = xs_vec_distance(vecTarget, vecOrigin); + + if (floatabs(flLastDistance - flDistance) < MARK_MAX_SCALE_STEP_LENGTH) { + new Float:flScaleRatio = flScale / g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkScale]; + new Float:flMaxStep = 1 + ((MARK_MAX_SCALE_STEP / g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkScale]) * flDelta); + + if (flScaleRatio > flMaxStep) { + flScale = g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkScale] * flMaxStep; + } else if (flScaleRatio < (1.0 / flMaxStep)) { + flScale = g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkScale] * (1.0 / flMaxStep); + } + } else { + flScale = 0.005; + } + } + + // ANCHOR: Fix frame position using scale + CreateFrame(vecTarget, SPRITE_WIDTH * flScale, SPRITE_HEIGHT * flScale, vecUp, vecRight, rgvecFrameEnd); + for (new i = 0; i < Frame; ++i) { + for (new j = 0; j < 3; ++j) { + rgvecFrameEnd[i][j] -= (vecForward[j] * ((SPRITE_WIDTH * flScale) / 2.0)); + } + } + + // ANCHOR: Get target point + for (new i = 0; i < 3; ++i) { + vecTarget[i] = (rgvecFrameEnd[TopLeft][i] + rgvecFrameEnd[BottomRight][i]) * 0.5; + } + + xs_vec_copy(vecOrigin, g_rgPlayerData[pPlayer][iMarkIndex][Player_Origin]); + xs_vec_copy(vecTarget, g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkOrigin]); + xs_vec_copy(vecAngles, g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkAngles]); + g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkScale] = flScale; + g_rgPlayerData[pPlayer][iMarkIndex][Player_MarkUpdateTime] = get_gametime(); +} + +bool:IsUsableObjective(pPlayer, pButton) { + new iszMaster = get_ent_data(pButton, "CBaseToggle", "m_sMaster"); + + if (iszMaster) { + static szMaster[32]; + engfunc(EngFunc_SzFromIndex, iszMaster, szMaster, charsmax(szMaster)); + + if (!UTIL_IsMasterTriggered(szMaster, pPlayer)) { + return false; + } + } + + if (!get_ent_data(pButton, "CBaseToggle", "m_toggle_state")) { + return false; + } + + if (~pev(pButton, pev_spawnflags) & ZP_BUTTON_FLAG_HUMAN_ONLY) { + return false; + } + + return true; +} + + +CreateFrame(const Float:vecOrigin[3], Float:flWidth, Float:flHeight, const Float:vecUp[3], const Float:vecRight[3], Float:rgvecFrameOut[Frame][3]) { + new Float:flHalfWidth = flWidth / 2.0; + new Float:flHalfHeight = flHeight / 2.0; + + for (new i = 0; i < 3; ++i) { + rgvecFrameOut[TopLeft][i] = vecOrigin[i] + (vecRight[i] * -flHalfWidth) + (vecUp[i] * flHalfHeight); + rgvecFrameOut[TopRight][i] = vecOrigin[i] + (vecRight[i] * flHalfWidth) + (vecUp[i] * flHalfHeight); + rgvecFrameOut[BottomLeft][i] = vecOrigin[i] + (vecRight[i] * -flHalfWidth) + (vecUp[i] * -flHalfHeight); + rgvecFrameOut[BottomRight][i] = vecOrigin[i] + (vecRight[i] * flHalfWidth) + (vecUp[i] * -flHalfHeight); + } +} + +Float:TraceFrame(const Float:vecSrc[3], const Float:rgvecFrame[Frame][3], pIgnore, Float:rgvecFrameOut[Frame][3]) { + new pTr = create_tr2(); + + new Float:flMinFraction = 1.0; + + for (new i = 0; i < Frame; ++i) { + engfunc(EngFunc_TraceLine, vecSrc, rgvecFrame[i], IGNORE_GLASS | IGNORE_MONSTERS, pIgnore, pTr); + + static Float:flFraction; + get_tr2(pTr, TR_flFraction, flFraction); + + if (flFraction < flMinFraction) { + flMinFraction = flFraction; + } + } + + free_tr2(pTr); + + if (flMinFraction < 1.0) { + for (new i = 0; i < Frame; ++i) { + for (new j = 0; j < 3; ++j) { + rgvecFrameOut[i][j] = vecSrc[j] + ((rgvecFrame[i][j] - vecSrc[j]) * flMinFraction); + } + } + } + + return flMinFraction; +} diff --git a/src/scripts/hud/zp_hud_crosshair.sma b/src/scripts/hud/zp_hud_crosshair.sma new file mode 100644 index 0000000..be6e4e0 --- /dev/null +++ b/src/scripts/hud/zp_hud_crosshair.sma @@ -0,0 +1,83 @@ +#pragma semicolon 1 + +#include +#include +#include + +#include + +#define PLUGIN "[Zombie Panic] Crosshair HUD" +#define AUTHOR "Hedgehog Fog" + +new gmsgHideWeapon; +new gmsgSetFOV; +new gmsgCurWeapon; + +new g_iPlayerHideWeapon[MAX_PLAYERS + 1]; + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + gmsgHideWeapon = get_user_msgid("HideWeapon"); + gmsgSetFOV = get_user_msgid("SetFOV"); + gmsgCurWeapon = get_user_msgid("CurWeapon"); + + register_message(gmsgHideWeapon, "OnMessage_HideWeapon"); + + register_event("CurWeapon", "OnEvent_CurWeapon", "be", "1=1"); +} + +public OnMessage_HideWeapon(iMsgId, iMsgDest, pPlayer) { + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + g_iPlayerHideWeapon[pPlayer] = get_msg_arg_int(1); + + set_task(0.1, "Task_UpdateCrosshair", pPlayer); + + return PLUGIN_CONTINUE; +} + +public OnEvent_CurWeapon(pPlayer) { + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + set_task(0.1, "Task_UpdateCrosshair", pPlayer); + + return PLUGIN_CONTINUE; +} + +UpdateCrosshair(pPlayer) { + + emessage_begin(MSG_ONE, gmsgHideWeapon, _, pPlayer); + ewrite_byte(g_iPlayerHideWeapon[pPlayer] | HIDEHUD_CROSSHAIR | BIT(7)); + emessage_end(); + + message_begin(MSG_ONE, gmsgSetFOV, _, pPlayer); + write_byte(89); + message_end(); + + new pActiveItem = get_member(pPlayer, m_pActiveItem); + if (pActiveItem != -1) { + new iWeaponId = get_member(pActiveItem, m_iId); + new iClip = get_member(pActiveItem, m_Weapon_iClip); + + message_begin(MSG_ONE, gmsgCurWeapon, _, pPlayer); + write_byte(1); + write_byte(iWeaponId); + write_byte(iClip); + message_end(); + } + + message_begin(MSG_ONE, gmsgSetFOV, _, pPlayer); + write_byte(get_member(pPlayer, m_iFOV)); + message_end(); +} + +public Task_UpdateCrosshair(iTaskId) { + new pPlayer = iTaskId; + + UpdateCrosshair(pPlayer); +} diff --git a/src/scripts/hud/zp_hud_deathmsg.sma b/src/scripts/hud/zp_hud_deathmsg.sma index c360c23..93dbcf4 100644 --- a/src/scripts/hud/zp_hud_deathmsg.sma +++ b/src/scripts/hud/zp_hud_deathmsg.sma @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -7,19 +8,19 @@ #define PLUGIN "[Zombie Panic] DeathMsg" #define AUTHOR "Hedgehog Fog" -new g_iDeathMsgMessage; +new gmsgDeathMsg; -public plugin_init() -{ - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - - g_iDeathMsgMessage = get_user_msgid("DeathMsg"); - register_message(g_iDeathMsgMessage, "OnMessage_DeathMsg"); +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + gmsgDeathMsg = get_user_msgid("DeathMsg"); + + register_message(gmsgDeathMsg, "OnMessage_DeathMsg"); } public OnMessage_DeathMsg(iMsgId, iDest, pPlayer) { if (pPlayer) { - return PLUGIN_CONTINUE; + return PLUGIN_CONTINUE; } new iKiller = get_msg_arg_int(1); @@ -28,27 +29,27 @@ public OnMessage_DeathMsg(iMsgId, iDest, pPlayer) { static szWeapon[32]; get_msg_arg_string(4, szWeapon, charsmax(szWeapon)); - - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { - if (!is_user_connected(pPlayer)) { - continue; - } - if (!ZP_Player_IsZombie(pPlayer)) { - continue; - } + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer)) { + continue; + } + + if (!ZP_Player_IsZombie(pPlayer) && !UTIL_IsPlayerSpectator(pPlayer)) { + continue; + } - SendDeathMsg(pPlayer, iKiller, iVictim, iHeadshot, szWeapon); + SendDeathMsg(pPlayer, iKiller, iVictim, iHeadshot, szWeapon); } return PLUGIN_HANDLED; } SendDeathMsg(pPlayer, iKiller, iVictim, iHeadshot, const szWeapon[]) { - emessage_begin(MSG_ONE, g_iDeathMsgMessage, _, pPlayer); - ewrite_byte(iKiller); - ewrite_byte(iVictim); - ewrite_byte(iHeadshot); - ewrite_string(szWeapon); - emessage_end(); + emessage_begin(MSG_ONE, gmsgDeathMsg, _, pPlayer); + ewrite_byte(iKiller); + ewrite_byte(iVictim); + ewrite_byte(iHeadshot); + ewrite_string(szWeapon); + emessage_end(); } diff --git a/src/scripts/hud/zp_hud_itempickup.sma b/src/scripts/hud/zp_hud_itempickup.sma index 8cb7f75..85221fb 100644 --- a/src/scripts/hud/zp_hud_itempickup.sma +++ b/src/scripts/hud/zp_hud_itempickup.sma @@ -7,12 +7,19 @@ #define PLUGIN "[Zombie Panic] Item Pickup HUD" #define AUTHOR "Hedgehog Fog" +new gmsgWeapPickup; + public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - register_message(get_user_msgid("WeapPickup"), "OnMessage"); + gmsgWeapPickup = get_user_msgid("WeapPickup"); + register_message(gmsgWeapPickup, "OnMessage"); } public OnMessage(iMsgId, iDest, pPlayer) { - return ZP_Player_IsZombie(pPlayer) ? PLUGIN_HANDLED : PLUGIN_CONTINUE; + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + return ZP_Player_IsZombie(pPlayer) ? PLUGIN_HANDLED : PLUGIN_CONTINUE; } diff --git a/src/scripts/hud/zp_hud_money.sma b/src/scripts/hud/zp_hud_money.sma index 5aebb49..147b97c 100644 --- a/src/scripts/hud/zp_hud_money.sma +++ b/src/scripts/hud/zp_hud_money.sma @@ -4,13 +4,10 @@ #include #include -#include #define PLUGIN "[Zombie Panic] Money HUD" #define AUTHOR "Hedgehog Fog" -#define HIDEHUD_MONEY (1<<5) - new gmsgHideWeapon; new g_iPlayerHideWeapon[MAX_PLAYERS + 1]; diff --git a/src/scripts/hud/zp_hud_radar.sma b/src/scripts/hud/zp_hud_radar.sma index abf09d7..ff4a591 100644 --- a/src/scripts/hud/zp_hud_radar.sma +++ b/src/scripts/hud/zp_hud_radar.sma @@ -1,16 +1,14 @@ #include #include #include - #include + #include #define PLUGIN "[Zombie Panic] Radar" #define AUTHOR "Hedgehog Fog" #define SCORE_STATUS_DEAD BIT(0) -// #define HIDEHUD_HEALTH (1<<3) -// #define IN_SCORE (1<<15) new gmsgScoreAttrib; new gmsgHideWeapon; @@ -21,32 +19,48 @@ new g_bPlayerInScore[MAX_PLAYERS + 1]; new g_iPlayerHideWeapon[MAX_PLAYERS + 1]; public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - gmsgScoreAttrib = get_user_msgid("ScoreAttrib"); - gmsgHideWeapon = get_user_msgid("HideWeapon"); - gmsgRadar = get_user_msgid("Radar"); - gmsgCrosshair = get_user_msgid("Crosshair"); + gmsgScoreAttrib = get_user_msgid("ScoreAttrib"); + gmsgHideWeapon = get_user_msgid("HideWeapon"); + gmsgRadar = get_user_msgid("Radar"); + gmsgCrosshair = get_user_msgid("Crosshair"); - register_message(gmsgScoreAttrib, "OnMessage_ScoreAttrib"); - register_message(gmsgHideWeapon, "OnMessage_HideWeapon"); - register_message(gmsgRadar, "OnMessage_Radar"); + register_message(gmsgScoreAttrib, "OnMessage_ScoreAttrib"); + register_message(gmsgHideWeapon, "OnMessage_HideWeapon"); + register_message(gmsgRadar, "OnMessage_Radar"); - register_forward(FM_CmdStart, "OnCmdStart"); + // register_forward(FM_CmdStart, "OnCmdStart"); } public OnMessage_Radar(iMsgId, iMsgDest, pPlayer) { - return PLUGIN_HANDLED; + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + return PLUGIN_HANDLED; } public OnMessage_ScoreAttrib(iMsgId, iMsgDest, pPlayer) { + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + if(get_msg_arg_int(1) == pPlayer) { set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2) | (g_bPlayerInScore[pPlayer] ? 0 : SCORE_STATUS_DEAD)); } + + return PLUGIN_CONTINUE; } public OnMessage_HideWeapon(iMsgId, iMsgDest, pPlayer) { - g_iPlayerHideWeapon[pPlayer] = get_msg_arg_int(1); + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + g_iPlayerHideWeapon[pPlayer] = get_msg_arg_int(1); + + return PLUGIN_CONTINUE; } public OnCmdStart(pPlayer, pCmd) { @@ -54,10 +68,8 @@ public OnCmdStart(pPlayer, pCmd) { new iButtons = get_uc(pCmd, UC_Buttons); new iOldButtons = pev(pPlayer, pev_oldbuttons); - // client_print(pPlayer, print_center, "Buttons %d %d %d %d %d", iButtons, iOldButtons, get_member(pPlayer, m_afButtonLast), get_member(pPlayer, m_afButtonPressed), get_member(pPlayer, m_afButtonReleased)); - - if (iButtons & IN_SCORE == iOldButtons & IN_SCORE) { - return; + if (iButtons & IN_SCORE == iOldButtons & IN_SCORE) { + return PLUGIN_CONTINUE; } g_bPlayerInScore[pPlayer] = !!(iButtons & IN_SCORE); @@ -69,13 +81,15 @@ public OnCmdStart(pPlayer, pCmd) { emessage_begin(MSG_ONE, gmsgHideWeapon, _, pPlayer); if (g_bPlayerInScore[pPlayer]) { - ewrite_byte(g_iPlayerHideWeapon[pPlayer] | HIDEHUD_ALL); + ewrite_byte(g_iPlayerHideWeapon[pPlayer] | HIDEHUD_ALL); } else { - ewrite_byte(g_iPlayerHideWeapon[pPlayer] & ~HIDEHUD_ALL); + ewrite_byte(g_iPlayerHideWeapon[pPlayer] & ~HIDEHUD_ALL); } emessage_end(); emessage_begin(MSG_ONE, gmsgCrosshair, _, pPlayer); ewrite_byte(0); emessage_end(); + + return PLUGIN_CONTINUE; } diff --git a/src/scripts/hud/zp_hud_roundtimer.sma b/src/scripts/hud/zp_hud_roundtimer.sma new file mode 100644 index 0000000..14fa5e9 --- /dev/null +++ b/src/scripts/hud/zp_hud_roundtimer.sma @@ -0,0 +1,62 @@ +#pragma semicolon 1 + +#include +#include +#include + +#include + +#define PLUGIN "[Zombie Panic] RoundTimer HUD" +#define AUTHOR "Hedgehog Fog" + +new gmsgHideWeapon; + +new g_iPlayerHideWeapon[MAX_PLAYERS + 1]; + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + gmsgHideWeapon = get_user_msgid("HideWeapon"); + + register_event("ResetHUD", "OnResetHUD", "b"); + register_message(gmsgHideWeapon, "OnMessage_HideWeapon"); +} + +public OnResetHUD(pPlayer) { + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + if (!ZP_GameRules_GetObjectiveMode()) { + return PLUGIN_CONTINUE; + } + + if (get_member_game(m_bFreezePeriod)) { + return PLUGIN_CONTINUE; + } + + emessage_begin(MSG_ONE, gmsgHideWeapon, _, pPlayer); + ewrite_byte(HIDEHUD_TIMER); + emessage_end(); + + return PLUGIN_CONTINUE; +} + +public OnMessage_HideWeapon(iMsgId, iMsgDest, pPlayer) { + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + if (!ZP_GameRules_GetObjectiveMode()) { + return PLUGIN_CONTINUE; + } + + if (get_member_game(m_bFreezePeriod)) { + return PLUGIN_CONTINUE; + } + + set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | HIDEHUD_TIMER); + g_iPlayerHideWeapon[pPlayer] = get_msg_arg_int(1); + + return PLUGIN_CONTINUE; +} diff --git a/src/scripts/hud/zp_hud_scoreattrib.sma b/src/scripts/hud/zp_hud_scoreattrib.sma index 58703e6..16537c1 100644 --- a/src/scripts/hud/zp_hud_scoreattrib.sma +++ b/src/scripts/hud/zp_hud_scoreattrib.sma @@ -1,24 +1,37 @@ #include +#include #include #define PLUGIN "[Zombie Panic] ScoreAttrib" #define AUTHOR "Hedgehog Fog" -#define SCORE_STATUS_DEAD (1<<0) +#define SCORE_STATUS_DEAD BIT(0) + +new gmsgScoreAttrib; public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - register_message(get_user_msgid("ScoreAttrib"), "OnMessage"); + gmsgScoreAttrib = get_user_msgid("ScoreAttrib"); + register_message(gmsgScoreAttrib, "OnMessage"); } public OnMessage(iMsgId, iDest, pPlayer) { - new iFlags = get_msg_arg_int(2); + if (!pPlayer) { + return PLUGIN_CONTINUE; + } + + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } + + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_CONTINUE; + } - if (pPlayer && !ZP_Player_IsZombie(pPlayer)) { + new iFlags = get_msg_arg_int(2); set_msg_arg_int(2, ARG_BYTE, iFlags & ~SCORE_STATUS_DEAD); - } - return PLUGIN_CONTINUE; + return PLUGIN_CONTINUE; } diff --git a/src/scripts/hud/zp_hud_scoreinfo.sma b/src/scripts/hud/zp_hud_scoreinfo.sma index 2648b4b..9b016a9 100644 --- a/src/scripts/hud/zp_hud_scoreinfo.sma +++ b/src/scripts/hud/zp_hud_scoreinfo.sma @@ -11,69 +11,61 @@ new gmsgScoreInfo; -public plugin_init() -{ - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - gmsgScoreInfo = get_user_msgid("ScoreInfo"); - register_event("ScoreInfo", "OnEvent", "a"); - register_message(gmsgScoreInfo, "OnMessage"); + gmsgScoreInfo = get_user_msgid("ScoreInfo"); - RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + register_event("ScoreInfo", "OnEvent", "a"); + register_message(gmsgScoreInfo, "OnMessage"); + + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); } public OnPlayerSpawn_Post(pPlayer) { - if (ZP_Player_IsZombie(pPlayer) || is_user_bot(pPlayer)) { - Reset(pPlayer); - } + for (new pTargetPlayer = 1; pTargetPlayer <= MaxClients; ++pTargetPlayer) { + if (!is_user_connected(pTargetPlayer)) { + continue; + } + + Update(pPlayer, pTargetPlayer); + } } public OnMessage(iMsgId, iDest, pPlayer) { - return pPlayer ? PLUGIN_CONTINUE : PLUGIN_HANDLED; + return pPlayer ? PLUGIN_CONTINUE : PLUGIN_HANDLED; } -public OnEvent(pPlayer) { - new pTargetPlayer = read_data(1); - new iScore = read_data(2); - new iDeaths = read_data(3); - new iClassId = read_data(4); - new iTeam = read_data(5); +public OnEvent() { + new pTargetPlayer = read_data(1); - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { - if (!is_user_connected(pPlayer)) { - continue; - } + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer)) { + continue; + } - new bool:bIsHuman = !ZP_Player_IsZombie(pPlayer); - new _iDeaths = !bIsHuman || pTargetPlayer == pPlayer ? iDeaths : 0; - new _iTeam = !bIsHuman || is_user_bot(pPlayer) ? iTeam : get_member(pPlayer, m_iTeam); - SendMessage(pPlayer, pTargetPlayer, iScore, _iDeaths, iClassId, _iTeam); - } + Update(pPlayer, pTargetPlayer); + } - return PLUGIN_HANDLED; + return PLUGIN_HANDLED; } -Reset(pPlayer) { - for (new pTargetPlayer = 1; pTargetPlayer <= MAX_PLAYERS; ++pTargetPlayer) { - if (!is_user_connected(pTargetPlayer)) { - continue; - } - +Update(pPlayer, pTargetPlayer) { new iScore = get_user_frags(pTargetPlayer); - new iDeaths = get_user_deaths(pTargetPlayer); + new iDeaths = ZP_Player_IsZombie(pPlayer) || pTargetPlayer == pPlayer ? get_member(pTargetPlayer, m_iDeaths) : 0; new iClassId = 0; - new iTeam = get_member(pTargetPlayer, m_iTeam); + new bool:bShowTeam = ZP_Player_IsZombie(pPlayer) || is_user_bot(pPlayer) || UTIL_IsPlayerSpectator(pPlayer); + new iTeam = bShowTeam ? get_member(pTargetPlayer, m_iTeam) : get_member(pPlayer, m_iTeam); SendMessage(pPlayer, pTargetPlayer, iScore, iDeaths, iClassId, iTeam); - } } SendMessage(pPlayer, pTargetPlayer, iScore, iDeaths, iClassId, iTeam) { - emessage_begin(MSG_ONE, gmsgScoreInfo, _, pPlayer); - ewrite_byte(pTargetPlayer); - ewrite_short(iScore); - ewrite_short(iDeaths); - ewrite_short(iClassId); - ewrite_short(iTeam); - emessage_end(); + emessage_begin(MSG_ONE, gmsgScoreInfo, _, pPlayer); + ewrite_byte(pTargetPlayer); + ewrite_short(iScore); + ewrite_short(iDeaths); + ewrite_short(iClassId); + ewrite_short(iTeam); + emessage_end(); } diff --git a/src/scripts/hud/zp_hud_statusvalue.sma b/src/scripts/hud/zp_hud_statusvalue.sma index 8967a15..905d5d1 100644 --- a/src/scripts/hud/zp_hud_statusvalue.sma +++ b/src/scripts/hud/zp_hud_statusvalue.sma @@ -2,37 +2,53 @@ #include #include +#include #define PLUGIN "[Zombie Panic] StatusValue" #define AUTHOR "Hedgehog Fog" enum StatusValueFlag { - StatusValueFlag_IsTeammate = 1, - StatusValueFlag_Player, - StatusValueFlag_Health + StatusValueFlag_IsTeammate = 1, + StatusValueFlag_Player, + StatusValueFlag_Health } +new gmsgStatusValue; + new g_statusValue[StatusValueFlag]; public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - register_message(get_user_msgid("StatusValue"), "OnMessage"); + gmsgStatusValue = get_user_msgid("StatusValue"); + register_message(gmsgStatusValue, "OnMessage"); } public OnMessage(iMsgId, iDest, pPlayer) { - new StatusValueFlag:iFlag = StatusValueFlag:get_msg_arg_int(1); - new iValue = get_msg_arg_int(2); + if (is_user_bot(pPlayer)) { + return PLUGIN_CONTINUE; + } - if (!iValue) { - return PLUGIN_CONTINUE; - } + if (ZP_Player_IsZombie(pPlayer)) { + return PLUGIN_CONTINUE; + } + + if (UTIL_IsPlayerSpectator(pPlayer)) { + return PLUGIN_CONTINUE; + } - g_statusValue[iFlag] = iValue; + new StatusValueFlag:iFlag = StatusValueFlag:get_msg_arg_int(1); + new iValue = get_msg_arg_int(2); - if (!ZP_Player_IsZombie(pPlayer) && g_statusValue[StatusValueFlag_IsTeammate] == 2) { - return PLUGIN_HANDLED; - } + if (!iValue) { + return PLUGIN_CONTINUE; + } - return PLUGIN_CONTINUE; + g_statusValue[iFlag] = iValue; + + if (g_statusValue[StatusValueFlag_IsTeammate] == 2) { + return PLUGIN_HANDLED; + } + + return PLUGIN_CONTINUE; } diff --git a/src/scripts/hud/zp_hud_teaminfo.sma b/src/scripts/hud/zp_hud_teaminfo.sma index e3dd21b..dc5bfab 100644 --- a/src/scripts/hud/zp_hud_teaminfo.sma +++ b/src/scripts/hud/zp_hud_teaminfo.sma @@ -10,70 +10,69 @@ #define PLUGIN "[Zombie Panic] TeamInfo" #define AUTHOR "Hedgehog Fog" -#define FAKE_TEAM_NAME "CT" - new gmsgTeamInfo; new g_rgszTeams[][] = { - "UNASSIGNED", - "TERRORIST", - "CT", - "SPECTATOR" + "UNASSIGNED", + "TERRORIST", + "CT", + "SPECTATOR" }; -public plugin_init() -{ - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - gmsgTeamInfo = get_user_msgid("TeamInfo"); + gmsgTeamInfo = get_user_msgid("TeamInfo"); - register_event("TeamInfo", "OnEvent", "a"); - register_message(gmsgTeamInfo, "OnMessage"); + register_event("TeamInfo", "OnEvent", "a"); + register_message(gmsgTeamInfo, "OnMessage"); - RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); } public OnPlayerSpawn_Post(pPlayer) { - if (ZP_Player_IsZombie(pPlayer) || is_user_bot(pPlayer)) { - Reset(pPlayer); - } + if (ZP_Player_IsZombie(pPlayer) || is_user_bot(pPlayer)) { + Reset(pPlayer); + } } public OnMessage(iMsgId, iDest, pPlayer) { - return pPlayer ? PLUGIN_CONTINUE : PLUGIN_HANDLED; + return pPlayer ? PLUGIN_CONTINUE : PLUGIN_HANDLED; } public OnEvent() { - new iTargetPlayer = read_data(1); + new pTargetPlayer = read_data(1); - static szTeam[16]; - read_data(2, szTeam, charsmax(szTeam)); + static szTeam[16]; + read_data(2, szTeam, charsmax(szTeam)); - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { - if (!is_user_connected(pPlayer)) { - continue; - } + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer)) { + continue; + } - new iTeam = get_member(pPlayer, m_iTeam); - SendMessage(pPlayer, iTargetPlayer, ZP_Player_IsZombie(pPlayer) || is_user_bot(pPlayer) ? szTeam : g_rgszTeams[iTeam]); - } + new iTeam = get_member(pPlayer, m_iTeam); + new bool:bShowTeam = ZP_Player_IsZombie(pPlayer) || is_user_bot(pPlayer) || UTIL_IsPlayerSpectator(pPlayer) + + SendMessage(pPlayer, pTargetPlayer, bShowTeam ? szTeam : g_rgszTeams[iTeam]); + } } Reset(pPlayer) { - for (new iTargetPlayer = 1; iTargetPlayer <= MAX_PLAYERS; ++iTargetPlayer) { - if (!is_user_connected(iTargetPlayer)) { - continue; + for (new pTargetPlayer = 1; pTargetPlayer <= MaxClients; ++pTargetPlayer) { + if (!is_user_connected(pTargetPlayer)) { + continue; + } + + static szTeam[16]; + get_user_team(pTargetPlayer, szTeam, charsmax(szTeam)); + SendMessage(pPlayer, pTargetPlayer, szTeam); } - - static szTeam[16]; - get_user_team(iTargetPlayer, szTeam, charsmax(szTeam)); - SendMessage(pPlayer, iTargetPlayer, szTeam); - } } -SendMessage(pPlayer, iTargetPlayer, const szTeam[]) { - emessage_begin(MSG_ONE, gmsgTeamInfo, _, pPlayer); - ewrite_byte(iTargetPlayer); - ewrite_string(szTeam); - emessage_end(); +SendMessage(pPlayer, pTargetPlayer, const szTeam[]) { + emessage_begin(MSG_ONE, gmsgTeamInfo, _, pPlayer); + ewrite_byte(pTargetPlayer); + ewrite_string(szTeam); + emessage_end(); } diff --git a/src/scripts/hud/zp_hud_winmessage.sma b/src/scripts/hud/zp_hud_winmessage.sma index 0daacf7..b3f939d 100644 --- a/src/scripts/hud/zp_hud_winmessage.sma +++ b/src/scripts/hud/zp_hud_winmessage.sma @@ -2,59 +2,73 @@ #include #include - #include #define PLUGIN "[Zombie Panic] Win Message" #define AUTHOR "Hedgehog Fog" -public plugin_init() -{ - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); +new g_iWinnerTeam = 0; + +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - register_message(get_user_msgid("TextMsg"), "OnMessage_OnTextMsg"); - register_message(get_user_msgid("SendAudio"), "OnMessage_SendAudio"); + register_message(get_user_msgid("TextMsg"), "OnMessage_OnTextMsg"); + register_message(get_user_msgid("SendAudio"), "OnMessage_SendAudio"); } public OnMessage_OnTextMsg(iMsgId, iDest, pPlayer) { - static szMessage[32]; - get_msg_arg_string(2, szMessage, charsmax(szMessage)); - - if (equal(szMessage, ZP_ZOMBIE_WIN_MESSAGE)) { - ShowWinMessage("%s have conquered...", ZP_ZOMBIE_TEAM_NAME); - } else if (equal(szMessage, ZP_HUMAN_WIN_MESSAGE)) { - ShowWinMessage("%s win!", ZP_HUMAN_TEAM_NAME); - } else { - return PLUGIN_CONTINUE; - } + static szMessage[32]; + get_msg_arg_string(2, szMessage, charsmax(szMessage)); - return PLUGIN_HANDLED; -} + if (equal(szMessage, ZP_ZOMBIE_WIN_MESSAGE)) { + g_iWinnerTeam = ZP_ZOMBIE_TEAM; + } else if (equal(szMessage, ZP_HUMAN_WIN_MESSAGE)) { + g_iWinnerTeam = ZP_HUMAN_TEAM; + } else { + return PLUGIN_CONTINUE; + } -ShowWinMessage(const szMessage[], any:...) { - new szBuffer[128]; - vformat(szBuffer, charsmax(szBuffer), szMessage, 2); + set_task(0.1, "Task_WinMessage"); - UTIL_ScreenFade(0, {0, 0, 0}, 1.0, ZP_NEW_ROUND_DELAY, 255, FFADE_OUT | FFADE_STAYOUT); - set_dhudmessage(255, 255, 255, -1.0, -1.0); - show_dhudmessage(0, szBuffer); + return PLUGIN_HANDLED; } public OnMessage_SendAudio(iMsgId, iDest, pPlayer) { - static szMessage[32]; - get_msg_arg_string(2, szMessage, charsmax(szMessage)); + static szMessage[32]; + get_msg_arg_string(2, szMessage, charsmax(szMessage)); - if (equal(szMessage[7], "terwin")) { - return PLUGIN_HANDLED; - } + if (equal(szMessage[7], "terwin")) { + return PLUGIN_HANDLED; + } - if (equal(szMessage[7], "ctwin")) { - return PLUGIN_HANDLED; - } + if (equal(szMessage[7], "ctwin")) { + return PLUGIN_HANDLED; + } - if (equal(szMessage[7], "rounddraw")) { - return PLUGIN_HANDLED; - } + if (equal(szMessage[7], "rounddraw")) { + return PLUGIN_HANDLED; + } + + return PLUGIN_CONTINUE; +} + +public Task_WinMessage() { + switch (g_iWinnerTeam) { + case ZP_ZOMBIE_TEAM: { + ShowWinMessage("%s have conquered...", ZP_ZOMBIE_TEAM_NAME); + } + case ZP_HUMAN_TEAM: { + ShowWinMessage("%s win!", ZP_HUMAN_TEAM_NAME); + } + } +} + +ShowWinMessage(const szMessage[], any:...) { + new szBuffer[128]; + vformat(szBuffer, charsmax(szBuffer), szMessage, 2); + + set_dhudmessage(255, 255, 255, -1.0, -1.0); + show_dhudmessage(0, szBuffer); - return PLUGIN_CONTINUE; + UTIL_ScreenFade(0, {0, 0, 0}, 1.0, ZP_NEW_ROUND_DELAY, 255, FFADE_OUT, .bExternal = true); } diff --git a/src/scripts/weapons/zp_weapon_357.sma b/src/scripts/weapons/zp_weapon_357.sma index 52ed771..a5987b8 100644 --- a/src/scripts/weapons/zp_weapon_357.sma +++ b/src/scripts/weapons/zp_weapon_357.sma @@ -3,10 +3,11 @@ #include #include #include - -#include +#include #include +#include +#include #define PLUGIN "[Zombie Panic] Weapon 357 Magnum" #define AUTHOR "Hedgehog Fog" @@ -14,80 +15,81 @@ new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_MAGNUM_HUD_TXT); - - precache_model(ZP_WEAPON_MAGNUM_V_MODEL); - precache_model(ZP_WEAPON_MAGNUM_P_MODEL); - precache_model(ZP_WEAPON_MAGNUM_W_MODEL); - precache_model("models/shell.mdl"); - - for (new i = 0; i < sizeof(ZP_WEAPON_MAGNUM_SHOT_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_MAGNUM_SHOT_SOUNDS[i]); - } - - g_iCwHandler = CW_Register(ZP_WEAPON_MAGNUM, CSW_DEAGLE, 6, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_MAGNUM)), 24, _, _, 1, 6, _, "fiveseven"); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + precache_generic(ZP_WEAPON_MAGNUM_HUD_TXT); + + precache_model(ZP_WEAPON_MAGNUM_V_MODEL); + precache_model(ZP_WEAPON_MAGNUM_P_MODEL); + precache_model(ZP_WEAPON_MAGNUM_W_MODEL); + precache_model("models/shell.mdl"); + + for (new i = 0; i < sizeof(ZP_WEAPON_MAGNUM_SHOT_SOUNDS); ++i) { + precache_sound(ZP_WEAPON_MAGNUM_SHOT_SOUNDS[i]); + } + + g_iCwHandler = CW_Register(ZP_WEAPON_MAGNUM, CSW_DEAGLE, 6, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_MAGNUM)), 24, _, _, 1, 6, _, "fiveseven", CWF_NoBulletSmoke); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + + ZP_Weapons_Register(g_iCwHandler, ZP_WEIGHT_MAGNUM); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); } public @Weapon_Idle(this) { - new Float:flRand = random_float(0.0, 1.0); - - if (flRand < 0.5) { - CW_PlayAnimation(this, 0, 71.0 / 30.0); - } else if (flRand < 0.7) { - CW_PlayAnimation(this, 6, 71.0 / 30.0); - } else if (flRand < 0.9) { - CW_PlayAnimation(this, 7, 89.0 / 30.0); - } else { - CW_PlayAnimation(this, 1, 171.0 / 30.0); - } + new Float:flRand = random_float(0.0, 1.0); + + if (flRand < 0.5) { + CW_PlayAnimation(this, 0, 71.0 / 30.0); + } else if (flRand < 0.7) { + CW_PlayAnimation(this, 6, 71.0 / 30.0); + } else if (flRand < 0.9) { + CW_PlayAnimation(this, 7, 89.0 / 30.0); + } else { + CW_PlayAnimation(this, 1, 171.0 / 30.0); + } } public @Weapon_PrimaryAttack(this) { - if (get_member(this, m_Weapon_iShotsFired) > 0) { - return; - } - - if (CW_DefaultShot(this, 80.0, 1.0, Float:VECTOR_CONE_1DEGREES)) { - CW_PlayAnimation(this, 2, 1.03); - new pPlayer = CW_GetPlayer(this); - emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_MAGNUM_SHOT_SOUNDS[random(sizeof(ZP_WEAPON_MAGNUM_SHOT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - static Float:vecPunchAngle[3]; - vecPunchAngle[0] = -10.0; - vecPunchAngle[1] = random_float(-0.5, 0.5); - vecPunchAngle[2] = 0.0; - set_pev(pPlayer, pev_punchangle, vecPunchAngle); - - CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shell.mdl"), 1); - } + if (get_member(this, m_Weapon_iShotsFired) > 0) { + return; + } + + static Float:vecSpread[3]; + UTIL_CalculateWeaponSpread(this, Float:VECTOR_CONE_1DEGREES, 5.0, 1.0, 0.95, 7.5, vecSpread); + + if (CW_DefaultShot(this, 70.0, 0.5, vecSpread)) { + CW_PlayAnimation(this, 2, 1.03); + new pPlayer = CW_GetPlayer(this); + emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_MAGNUM_SHOT_SOUNDS[random(sizeof(ZP_WEAPON_MAGNUM_SHOT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + set_pev(pPlayer, pev_punchangle, Float:{-10.0, 0.0, 0.0}); + + CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shell.mdl"), 1); + } } public @Weapon_Reload(this) { - CW_DefaultReload(this, 3, 2.5); + CW_DefaultReload(this, 3, 2.5); } public @Weapon_Deploy(this) { - CW_DefaultDeploy(this, ZP_WEAPON_MAGNUM_V_MODEL, ZP_WEAPON_MAGNUM_P_MODEL, 5, "onehanded"); + CW_DefaultDeploy(this, ZP_WEAPON_MAGNUM_V_MODEL, ZP_WEAPON_MAGNUM_P_MODEL, 5, "onehanded"); } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED - 10.0; + return ZP_HUMAN_SPEED; } public @Weapon_Spawn(this) { - engfunc(EngFunc_SetModel, this, ZP_WEAPON_MAGNUM_W_MODEL); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_MAGNUM_W_MODEL); } public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_MAGNUM_W_MODEL); + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_MAGNUM_W_MODEL); } diff --git a/src/scripts/weapons/zp_weapon_556ar.sma b/src/scripts/weapons/zp_weapon_556ar.sma index c287ac7..6f8bd7a 100644 --- a/src/scripts/weapons/zp_weapon_556ar.sma +++ b/src/scripts/weapons/zp_weapon_556ar.sma @@ -2,10 +2,12 @@ #include #include - -#include +#include +#include #include +#include +#include #define PLUGIN "[Zombie Panic] Weapon 556ar" #define AUTHOR "Hedgehog Fog" @@ -13,82 +15,87 @@ new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_RIFLE_HUD_TXT); - - precache_model(ZP_WEAPON_RIFLE_V_MODEL); - precache_model(ZP_WEAPON_RIFLE_P_MODEL); - precache_model(ZP_WEAPON_RIFLE_W_MODEL); - precache_model("models/shell.mdl"); - - for (new i = 0; i < sizeof(ZP_WEAPON_RIFLE_SHOT_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_RIFLE_SHOT_SOUNDS[i]); - } - - precache_sound(ZP_WEAPON_RIFLE_RELOAD_START_SOUND); - precache_sound(ZP_WEAPON_RIFLE_RELOAD_END_SOUND); - - g_iCwHandler = CW_Register(ZP_WEAPON_RIFLE, CSW_MP5NAVY, 30, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_RIFLE)), 90, _, _, 0, 1, _, "m4a1"); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); - CW_Bind(g_iCwHandler, CWB_DefaultReloadEnd, "@Weapon_DefaultReloadEnd"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + precache_generic(ZP_WEAPON_RIFLE_HUD_TXT); + + precache_model(ZP_WEAPON_RIFLE_V_MODEL); + precache_model(ZP_WEAPON_RIFLE_P_MODEL); + precache_model(ZP_WEAPON_RIFLE_W_MODEL); + precache_model("models/shell.mdl"); + + for (new i = 0; i < sizeof(ZP_WEAPON_RIFLE_SHOT_SOUNDS); ++i) { + precache_sound(ZP_WEAPON_RIFLE_SHOT_SOUNDS[i]); + } + + precache_sound(ZP_WEAPON_RIFLE_RELOAD_START_SOUND); + precache_sound(ZP_WEAPON_RIFLE_RELOAD_END_SOUND); + + g_iCwHandler = CW_Register(ZP_WEAPON_RIFLE, CSW_MP5NAVY, 30, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_RIFLE)), 90, _, _, 0, 1, _, "m4a1", CWF_NoBulletSmoke); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); + CW_Bind(g_iCwHandler, CWB_DefaultReloadEnd, "@Weapon_DefaultReloadEnd"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + + ZP_Weapons_Register(g_iCwHandler, ZP_WEIGHT_RIFLE); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); } public @Weapon_Idle(this) { - switch (random(2)) { - case 0: { - CW_PlayAnimation(this, 0, 41.0 / 8.0); - } - case 1: { - CW_PlayAnimation(this, 1, 111.0 / 35.0); + switch (random(2)) { + case 0: { + CW_PlayAnimation(this, 0, 41.0 / 8.0); + } + case 1: { + CW_PlayAnimation(this, 1, 111.0 / 35.0); + } } - } } public @Weapon_PrimaryAttack(this) { - if (CW_DefaultShot(this, 20.0, 0.095, Float:VECTOR_CONE_6DEGREES)) { - CW_PlayAnimation(this, 5 + random(3), 0.7); - new pPlayer = CW_GetPlayer(this); - emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_RIFLE_SHOT_SOUNDS[random(sizeof(ZP_WEAPON_RIFLE_SHOT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + static Float:vecSpread[3]; + UTIL_CalculateWeaponSpread(this, Float:VECTOR_CONE_6DEGREES, 3.0, 0.5, 0.95, 3.5, vecSpread); - set_pev(pPlayer, pev_punchangle, Float:{-2.0, 0.0, 0.0}); + if (CW_DefaultShot(this, 26.0, 0.095, Float:vecSpread)) { + CW_PlayAnimation(this, 5 + random(3), 0.7); + new pPlayer = CW_GetPlayer(this); + emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_RIFLE_SHOT_SOUNDS[random(sizeof(ZP_WEAPON_RIFLE_SHOT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shell.mdl"), 1); - } + set_pev(pPlayer, pev_punchangle, Float:{-2.0, 0.0, 0.0}); + + CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shell.mdl"), 1); + } } public @Weapon_Reload(this) { - // new pPlayer = CW_GetPlayer(this); - if (CW_DefaultReload(this, 3, 1.57)) { - // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_RIFLE_RELOAD_START_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } + // new pPlayer = CW_GetPlayer(this); + if (CW_DefaultReload(this, 3, 1.57)) { + // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_RIFLE_RELOAD_START_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } public @Weapon_DefaultReloadEnd(this) { - // new pPlayer = CW_GetPlayer(this); - // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_RIFLE_RELOAD_END_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + // new pPlayer = CW_GetPlayer(this); + // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_RIFLE_RELOAD_END_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } public @Weapon_Deploy(this) { - CW_DefaultDeploy(this, ZP_WEAPON_RIFLE_V_MODEL, ZP_WEAPON_RIFLE_P_MODEL, 4, "rifle"); + CW_DefaultDeploy(this, ZP_WEAPON_RIFLE_V_MODEL, ZP_WEAPON_RIFLE_P_MODEL, 4, "rifle"); } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED - 15.0; + return ZP_HUMAN_SPEED; } public @Weapon_Spawn(this) { - engfunc(EngFunc_SetModel, this, ZP_WEAPON_RIFLE_W_MODEL); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_RIFLE_W_MODEL); } public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_RIFLE_W_MODEL); + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_RIFLE_W_MODEL); } diff --git a/src/scripts/weapons/zp_weapon_9mmhandgun.sma b/src/scripts/weapons/zp_weapon_9mmhandgun.sma index b3f6555..58196ce 100644 --- a/src/scripts/weapons/zp_weapon_9mmhandgun.sma +++ b/src/scripts/weapons/zp_weapon_9mmhandgun.sma @@ -3,10 +3,11 @@ #include #include #include - -#include +#include #include +#include +#include #define PLUGIN "[Zombie Panic] Weapon 9mm Handgun" #define AUTHOR "Hedgehog Fog" @@ -14,84 +15,89 @@ new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_PISTOL_HUD_TXT); - - precache_model(ZP_WEAPON_PISTOL_V_MODEL); - precache_model(ZP_WEAPON_PISTOL_P_MODEL); - precache_model(ZP_WEAPON_PISTOL_W_MODEL); - precache_model("models/shell.mdl"); - - precache_sound(ZP_WEAPON_PISTOL_SHOT_SOUND); - precache_sound(ZP_WEAPON_PISTOL_RELOAD_START_SOUND); - precache_sound(ZP_WEAPON_PISTOL_RELOAD_END_SOUND); - - g_iCwHandler = CW_Register(ZP_WEAPON_PISTOL, CSW_FIVESEVEN, 7, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_PISTOL)), 120, _, _, 1, 1, _, "fiveseven"); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); - CW_Bind(g_iCwHandler, CWB_DefaultReloadEnd, "@Weapon_DefaultReloadEnd"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + precache_generic(ZP_WEAPON_PISTOL_HUD_TXT); + + precache_model(ZP_WEAPON_PISTOL_V_MODEL); + precache_model(ZP_WEAPON_PISTOL_P_MODEL); + precache_model(ZP_WEAPON_PISTOL_W_MODEL); + precache_model("models/shell.mdl"); + + precache_sound(ZP_WEAPON_PISTOL_SHOT_SOUND); + precache_sound(ZP_WEAPON_PISTOL_RELOAD_START_SOUND); + precache_sound(ZP_WEAPON_PISTOL_RELOAD_END_SOUND); + + g_iCwHandler = CW_Register(ZP_WEAPON_PISTOL, CSW_FIVESEVEN, 7, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_PISTOL)), 120, _, _, 1, 1, _, "fiveseven", CWF_NoBulletSmoke); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); + CW_Bind(g_iCwHandler, CWB_DefaultReloadEnd, "@Weapon_DefaultReloadEnd"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + + ZP_Weapons_Register(g_iCwHandler, ZP_WEIGHT_PISTOL); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); } public @Weapon_Idle(this) { - switch (random(3)) { - case 0: { - CW_PlayAnimation(this, 0, 61.0 / 16.0); - } - case 1: { - CW_PlayAnimation(this, 1, 61.0 / 16.0); - } - case 2: { - CW_PlayAnimation(this, 2, 61.0 / 14.0); + switch (random(3)) { + case 0: { + CW_PlayAnimation(this, 0, 61.0 / 16.0); + } + case 1: { + CW_PlayAnimation(this, 1, 61.0 / 16.0); + } + case 2: { + CW_PlayAnimation(this, 2, 61.0 / 14.0); + } } - } } public @Weapon_PrimaryAttack(this) { - if (get_member(this, m_Weapon_iShotsFired) > 0) { - return; - } - - if (CW_DefaultShot(this, 15.0, 0.2, Float:VECTOR_CONE_5DEGREES)) { - CW_PlayAnimation(this, 3, 0.71); - new pPlayer = CW_GetPlayer(this); - emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_PISTOL_SHOT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - set_pev(pPlayer, pev_punchangle, Float:{-3.5, 0.0, 0.0}); - CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shell.mdl"), 1); - } + if (get_member(this, m_Weapon_iShotsFired) > 0) { + return; + } + + static Float:vecSpread[3]; + UTIL_CalculateWeaponSpread(this, Float:VECTOR_CONE_10DEGREES, 3.0, 0.5, 0.95, 3.5, vecSpread); + + if (CW_DefaultShot(this, 30.0, 0.125, vecSpread)) { + CW_PlayAnimation(this, 3, 0.71); + new pPlayer = CW_GetPlayer(this); + emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_PISTOL_SHOT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + set_pev(pPlayer, pev_punchangle, Float:{-3.5, 0.0, 0.0}); + CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shell.mdl"), 1); + } } public @Weapon_Reload(this) { - // new pPlayer = CW_GetPlayer(this); - if (CW_DefaultReload(this, 5, 1.68)) { - // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_PISTOL_RELOAD_START_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } + // new pPlayer = CW_GetPlayer(this); + if (CW_DefaultReload(this, 5, 1.68)) { + // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_PISTOL_RELOAD_START_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } public @Weapon_DefaultReloadEnd(this) { - // new pPlayer = CW_GetPlayer(this); - // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_PISTOL_RELOAD_END_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + // new pPlayer = CW_GetPlayer(this); + // emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_PISTOL_RELOAD_END_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } public @Weapon_Deploy(this) { - CW_DefaultDeploy(this, ZP_WEAPON_PISTOL_V_MODEL, ZP_WEAPON_PISTOL_P_MODEL, 7, "onehanded"); + CW_DefaultDeploy(this, ZP_WEAPON_PISTOL_V_MODEL, ZP_WEAPON_PISTOL_P_MODEL, 7, "onehanded"); } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED - 5.0; + return ZP_HUMAN_SPEED; } public @Weapon_Spawn(this) { - engfunc(EngFunc_SetModel, this, ZP_WEAPON_PISTOL_W_MODEL); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_PISTOL_W_MODEL); } public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_PISTOL_W_MODEL); + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_PISTOL_W_MODEL); } diff --git a/src/scripts/weapons/zp_weapon_crowbar.sma b/src/scripts/weapons/zp_weapon_crowbar.sma index 0f93658..75918a2 100644 --- a/src/scripts/weapons/zp_weapon_crowbar.sma +++ b/src/scripts/weapons/zp_weapon_crowbar.sma @@ -17,104 +17,106 @@ new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_CROWBAR_HUD_TXT); - - precache_model(ZP_WEAPON_CROWBAR_V_MODEL); - precache_model(ZP_WEAPON_CROWBAR_P_MODEL); - precache_model(ZP_WEAPON_CROWBAR_W_MODEL); - - precache_sound(ZP_WEAPON_CROWBAR_MISS_SOUND); - - for (new i = 0; i < sizeof(ZP_WEAPON_CROWBAR_HIT_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_CROWBAR_HIT_SOUNDS[i]); - } - - for (new i = 0; i < sizeof(ZP_WEAPON_CROWBAR_HITBODY_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_CROWBAR_HITBODY_SOUNDS[i]); - } - - g_iCwHandler = CW_Register(ZP_WEAPON_CROWBAR, CSW_KNIFE, WEAPON_NOCLIP, 0, -1, 0, -1, 2, 5); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_SecondaryAttack, "@Weapon_SecondaryAttack"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); - CW_Bind(g_iCwHandler, CWB_CanDrop, "@Weapon_CanDrop"); -} + precache_generic(ZP_WEAPON_CROWBAR_HUD_TXT); -public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); -} + precache_model(ZP_WEAPON_CROWBAR_V_MODEL); + precache_model(ZP_WEAPON_CROWBAR_P_MODEL); + precache_model(ZP_WEAPON_CROWBAR_W_MODEL); -public @Weapon_Idle(this) { - switch (random(3)) { - case 0: { - CW_PlayAnimation(this, 0, 36.0 / 13.0); - } - case 1: { - CW_PlayAnimation(this, 9, 81.0 / 15.0); + precache_sound(ZP_WEAPON_CROWBAR_MISS_SOUND); + + for (new i = 0; i < sizeof(ZP_WEAPON_CROWBAR_HIT_SOUNDS); ++i) { + precache_sound(ZP_WEAPON_CROWBAR_HIT_SOUNDS[i]); } - case 2: { - CW_PlayAnimation(this, 10, 81.0 / 15.0); + + for (new i = 0; i < sizeof(ZP_WEAPON_CROWBAR_HITBODY_SOUNDS); ++i) { + precache_sound(ZP_WEAPON_CROWBAR_HITBODY_SOUNDS[i]); } - } -} -public @Weapon_PrimaryAttack(this) { - new pPlayer = CW_GetPlayer(this); - new pHit = CW_DefaultSwing(this, 25.0, 0.5, 48.0); - CW_PlayAnimation(this, 4, 0.25); + g_iCwHandler = CW_Register(ZP_WEAPON_CROWBAR, CSW_KNIFE, WEAPON_NOCLIP, 0, -1, 0, -1, 2, 5, _, _, CWF_NoBulletSmoke); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_SecondaryAttack, "@Weapon_SecondaryAttack"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + CW_Bind(g_iCwHandler, CWB_CanDrop, "@Weapon_CanDrop"); + + ZP_Weapons_Register(g_iCwHandler, ZP_WEIGHT_MELEE); +} - if (pHit < 0) { - switch (random(3)) { - case 0: CW_PlayAnimation(this, 4, 0.25); - case 1: CW_PlayAnimation(this, 5, 0.25); - case 2: CW_PlayAnimation(this, 7, 0.25); - } +public plugin_init() { + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); +} - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_CROWBAR_MISS_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } else { +public @Weapon_Idle(this) { switch (random(3)) { - case 0: CW_PlayAnimation(this, 3, 0.25); - case 1: CW_PlayAnimation(this, 6, 0.25); - case 2: CW_PlayAnimation(this, 8, 0.25); + case 0: { + CW_PlayAnimation(this, 0, 36.0 / 13.0); + } + case 1: { + CW_PlayAnimation(this, 9, 81.0 / 15.0); + } + case 2: { + CW_PlayAnimation(this, 10, 81.0 / 15.0); + } } +} - if (UTIL_IsPlayer(pHit)) { - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_CROWBAR_HITBODY_SOUNDS[random(sizeof(ZP_WEAPON_CROWBAR_HITBODY_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); +public @Weapon_PrimaryAttack(this) { + new pPlayer = CW_GetPlayer(this); + new pHit = CW_DefaultSwing(this, 35.0, 0.5, 36.0); + CW_PlayAnimation(this, 4, 0.25); + + if (pHit < 0) { + switch (random(3)) { + case 0: CW_PlayAnimation(this, 4, 11.0 / 22.0); + case 1: CW_PlayAnimation(this, 5, 14.0 / 22.0); + case 2: CW_PlayAnimation(this, 7, 19.0 / 24.0); + } + + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_CROWBAR_MISS_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } else { - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_CROWBAR_HIT_SOUNDS[random(sizeof(ZP_WEAPON_CROWBAR_HIT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + switch (random(3)) { + case 0: CW_PlayAnimation(this, 3, 11.0 / 22.0); + case 1: CW_PlayAnimation(this, 6, 14.0 / 22.0); + case 2: CW_PlayAnimation(this, 8, 19.0 / 24.0); + } + + if (UTIL_IsPlayer(pHit)) { + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_CROWBAR_HITBODY_SOUNDS[random(sizeof(ZP_WEAPON_CROWBAR_HITBODY_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } else { + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_CROWBAR_HIT_SOUNDS[random(sizeof(ZP_WEAPON_CROWBAR_HIT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } - } - set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); + set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); } public @Weapon_SecondaryAttack(this) { - new pPlayer = CW_GetPlayer(this); - if (is_user_bot(pPlayer)) { - CW_PrimaryAttack(this); - } + new pPlayer = CW_GetPlayer(this); + if (is_user_bot(pPlayer)) { + CW_PrimaryAttack(this); + } } public @Weapon_Deploy(this) { - CW_DefaultDeploy(this, ZP_WEAPON_CROWBAR_V_MODEL, ZP_WEAPON_CROWBAR_P_MODEL, 1, "grenade"); + CW_DefaultDeploy(this, ZP_WEAPON_CROWBAR_V_MODEL, ZP_WEAPON_CROWBAR_P_MODEL, 1, "grenade"); } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED; + return ZP_HUMAN_SPEED; } public @Weapon_Spawn(this) { - engfunc(EngFunc_SetModel, this, ZP_WEAPON_CROWBAR_W_MODEL); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_CROWBAR_W_MODEL); } public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_CROWBAR_W_MODEL); + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_CROWBAR_W_MODEL); } public @Weapon_CanDrop(this) { - return PLUGIN_HANDLED; + return PLUGIN_HANDLED; } diff --git a/src/scripts/weapons/zp_weapon_handgrenade.sma b/src/scripts/weapons/zp_weapon_handgrenade.sma index 968bbe0..b8dad92 100644 --- a/src/scripts/weapons/zp_weapon_handgrenade.sma +++ b/src/scripts/weapons/zp_weapon_handgrenade.sma @@ -8,78 +8,146 @@ #include #include +#include #include #define PLUGIN "[Zombie Panic] Weapon Grenade" #define AUTHOR "Hedgehog Fog" new const g_rgszBounceSounds[][] = { - "weapons/g_bounce1.wav", - "weapons/g_bounce2.wav", - "weapons/g_bounce3.wav" + "weapons/g_bounce1.wav", + "weapons/g_bounce2.wav", + "weapons/g_bounce3.wav" }; new g_iAmmoId; new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_GRENADE_HUD_TXT); - - precache_model(ZP_WEAPON_GRENADE_V_MODEL); - precache_model(ZP_WEAPON_GRENADE_P_MODEL); - precache_model(ZP_WEAPON_GRENADE_W_MODEL); - - for (new i = 0; i < sizeof(g_rgszBounceSounds); ++i) { - precache_sound(g_rgszBounceSounds[i]); - } - - g_iAmmoId = ZP_Ammo_GetId(ZP_Ammo_GetHandler("grenade")); - g_iCwHandler = CW_Register(ZP_WEAPON_GRENADE, CSW_HEGRENADE, WEAPON_NOCLIP, g_iAmmoId, -1, 0, -1, 3, 6); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + precache_generic(ZP_WEAPON_GRENADE_HUD_TXT); + + precache_model(ZP_WEAPON_GRENADE_V_MODEL); + precache_model(ZP_WEAPON_GRENADE_P_MODEL); + precache_model(ZP_WEAPON_GRENADE_W_MODEL); + + for (new i = 0; i < sizeof(g_rgszBounceSounds); ++i) { + precache_sound(g_rgszBounceSounds[i]); + } + + g_iAmmoId = ZP_Ammo_GetId(ZP_Ammo_GetHandler("grenade")); + g_iCwHandler = CW_Register(ZP_WEAPON_GRENADE, CSW_HEGRENADE, WEAPON_NOCLIP, g_iAmmoId, -1, 0, -1, 3, 6); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_Holster, "@Weapon_Holster"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + + ZP_Weapons_Register(g_iCwHandler, 0.0); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); } public @Weapon_PrimaryAttack(this) { - new pPlayer = CW_GetPlayer(this); - if (!get_member(this, m_flStartThrow) && get_member(pPlayer, m_rgAmmo, g_iAmmoId) > 0) { - set_member(this, m_flStartThrow, get_gametime()); - set_member(this, m_flReleaseThrow, 0.0); - CW_PlayAnimation(this, 2, 0.5); - } + new pPlayer = CW_GetPlayer(this); + if (!get_member(this, m_flStartThrow) && get_member(pPlayer, m_rgAmmo, g_iAmmoId) > 0) { + set_member(this, m_flStartThrow, get_gametime()); + set_member(this, m_flReleaseThrow, 0.0); + CW_PlayAnimation(this, 2, 0.5); + } } public @Weapon_Idle(this) { - new pPlayer = CW_GetPlayer(this); + new pPlayer = CW_GetPlayer(this); - if (!get_member(this, m_flReleaseThrow) && get_member(this, m_flStartThrow)) { - set_member(this, m_flReleaseThrow, get_gametime()); - } + if (!get_member(this, m_flReleaseThrow) && get_member(this, m_flStartThrow)) { + set_member(this, m_flReleaseThrow, get_gametime()); + } - if (get_member(this, m_Weapon_flTimeWeaponIdle) > 0.0) { - return; - } + if (get_member(this, m_flStartThrow)) { + ThrowGrenade(this); + return; + } else if (get_member(this, m_flReleaseThrow) > 0.0) { + // we've finished the throw, restart. + set_member(this, m_flStartThrow, 0.0); + + if (get_member(pPlayer, m_rgAmmo, g_iAmmoId > 0)) { + CW_PlayAnimation(this, 7, 16.0 / 30.0); + } else { + CW_RemovePlayerItem(this); + return; + } + + set_member(this, m_flReleaseThrow, -1.0); + return; + } + + if (get_member(pPlayer, m_rgAmmo, g_iAmmoId)) { + if (random_float(0.0, 1.0) <= 0.75) { + CW_PlayAnimation(this, 0, 91.0 / 30.0); + } else { + CW_PlayAnimation(this, 1, 76.0 / 30.0); + } + } else { + CW_RemovePlayerItem(this); + } +} + +public @Weapon_Deploy(this) { + set_member(this, m_flReleaseThrow, -1.0); + CW_DefaultDeploy(this, ZP_WEAPON_GRENADE_V_MODEL, ZP_WEAPON_GRENADE_P_MODEL, 7, "grenade"); +} + +public @Weapon_Holster(this) { + if (get_member(this, m_flStartThrow)) { + ThrowGrenade(this); + } + + // set_member(this, m_flStartThrow, 0.0); + // set_member(this, m_flReleaseThrow, -1.0); + + new pPlayer = CW_GetPlayer(this); + if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { + SetThink(this, "RemovePlayerItem"); + set_pev(this, pev_nextthink, get_gametime() + 0.1); + } +} + +public RemovePlayerItem(this) { + CW_RemovePlayerItem(this); +} + +public Float:@Weapon_GetMaxSpeed(this) { + return ZP_HUMAN_SPEED; +} + +public @Weapon_Spawn(this) { + set_member(this, m_Weapon_iDefaultAmmo, 1); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_GRENADE_W_MODEL); +} + +public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_GRENADE_W_MODEL); +} + +ThrowGrenade(this) { + new pPlayer = CW_GetPlayer(this); - if (get_member(this, m_flStartThrow)) { static Float:vecThrowAngle[3]; pev(pPlayer, pev_v_angle, vecThrowAngle); if (vecThrowAngle[0] < 0.0) { - vecThrowAngle[0] = -10.0 + vecThrowAngle[0] * ((90.0 - 10.0) / 90.0); + vecThrowAngle[0] = -10.0 + vecThrowAngle[0] * ((90.0 - 10.0) / 90.0); } else { - vecThrowAngle[0] = -10.0 + vecThrowAngle[0] * ((90.0 + 10.0) / 90.0); + vecThrowAngle[0] = -10.0 + vecThrowAngle[0] * ((90.0 + 10.0) / 90.0); } new Float:flVel = (90.0 - vecThrowAngle[0]) * 4; if (flVel > 500.0) { - flVel = 500.0; + flVel = 500.0; } engfunc(EngFunc_MakeVectors, vecThrowAngle); @@ -94,24 +162,24 @@ public @Weapon_Idle(this) { get_global_vector(GL_v_forward, vecForward); for (new i = 0; i < 3; ++i) { - vecSrc[i] += vecForward[i] * 16.0; - vecThrow[i] += vecForward[i] * flVel; + vecSrc[i] += vecForward[i] * 16.0; + vecThrow[i] += vecForward[i] * flVel; } // alway explode 3 seconds after the pin was pulled new Float:flTime = get_member(this, m_flStartThrow) - get_gametime() + 3.0; if (flTime < 0.0) { - flTime = 0.0; + flTime = 0.0; } ShootTimed(pPlayer, vecSrc, vecThrow, flTime); if ( flVel < 500 ) { - CW_PlayAnimation(this, 3); + CW_PlayAnimation(this, 3); } else if ( flVel < 1000 ) { - CW_PlayAnimation(this, 4); + CW_PlayAnimation(this, 4); } else { - CW_PlayAnimation(this, 5); + CW_PlayAnimation(this, 5); } // player "shoot" animation @@ -125,208 +193,166 @@ public @Weapon_Idle(this) { set_member(pPlayer, m_rgAmmo, get_member(pPlayer, m_rgAmmo, g_iAmmoId) - 1, g_iAmmoId); if (get_member(pPlayer, m_rgAmmo, g_iAmmoId)) { - // just threw last grenade - // set attack times in the future, and weapon idle in the future so we can see the whole throw - // animation, weapon idle will automatically retire the weapon for us. - // m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay(0.5);// ensure that the animation can finish playing - set_member(this, m_Weapon_flTimeWeaponIdle, 0.5); - set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); - set_member(this, m_Weapon_flNextPrimaryAttack, 0.5); + // just threw last grenade + // set attack times in the future, and weapon idle in the future so we can see the whole throw + // animation, weapon idle will automatically retire the weapon for us. + // m_flTimeWeaponIdle = m_flNextSecondaryAttack = m_flNextPrimaryAttack = GetNextAttackDelay(0.5);// ensure that the animation can finish playing + set_member(this, m_Weapon_flTimeWeaponIdle, 0.5); + set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); + set_member(this, m_Weapon_flNextPrimaryAttack, 0.5); } ZP_Player_UpdateSpeed(pPlayer); - - return; - } else if (get_member(this, m_flReleaseThrow) > 0.0) { - // we've finished the throw, restart. - set_member(this, m_flStartThrow, 0.0); - - if (get_member(pPlayer, m_rgAmmo, g_iAmmoId > 0)) { - CW_PlayAnimation(this, 7, 16.0 / 30.0); - } else { - CW_RemovePlayerItem(this); - return; - } - - set_member(this, m_flReleaseThrow, -1.0); - return; - } - - if (get_member(pPlayer, m_rgAmmo, g_iAmmoId)) { - if (random_float(0.0, 1.0) <= 0.75) { - CW_PlayAnimation(this, 0, 91.0 / 30.0); - } else { - CW_PlayAnimation(this, 1, 76.0 / 30.0); - } - } else { - CW_RemovePlayerItem(this); - } -} - -public @Weapon_Deploy(this) { - set_member(this, m_flReleaseThrow, -1.0); - CW_DefaultDeploy(this, ZP_WEAPON_GRENADE_V_MODEL, ZP_WEAPON_GRENADE_P_MODEL, 7, "grenade"); -} - -public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED - 10.0; -} - -public @Weapon_Spawn(this) { - set_member(this, m_Weapon_iDefaultAmmo, 1); - engfunc(EngFunc_SetModel, this, ZP_WEAPON_GRENADE_W_MODEL); -} - -public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_GRENADE_W_MODEL); } ShootTimed(pOwner, const Float:vecStart[3], const Float:vecVelocity[3], Float:flTime) { - new pGrenade = rg_create_entity("grenade"); - dllfunc(DLLFunc_Spawn, pGrenade); - engfunc(EngFunc_SetOrigin, pGrenade, vecStart); - set_pev(pGrenade, pev_velocity, vecVelocity); + new pGrenade = rg_create_entity("grenade"); + dllfunc(DLLFunc_Spawn, pGrenade); + engfunc(EngFunc_SetOrigin, pGrenade, vecStart); + set_pev(pGrenade, pev_velocity, vecVelocity); - static Float:vecAngles[3]; - vector_to_angle(vecVelocity, vecAngles); - set_pev(pGrenade, pev_angles, vecAngles); - set_pev(pGrenade, pev_owner, pOwner); + static Float:vecAngles[3]; + vector_to_angle(vecVelocity, vecAngles); + set_pev(pGrenade, pev_angles, vecAngles); + set_pev(pGrenade, pev_owner, pOwner); - SetTouch(pGrenade, "BounceTouch"); // Bounce if touched + SetTouch(pGrenade, "BounceTouch"); // Bounce if touched - // Take one second off of the desired detonation time and set the think to PreDetonate. PreDetonate - // will insert a DANGER sound into the world sound list and delay detonation for one second so that - // the grenade explodes after the exact amount of time specified in the call to ShootTimed(). + // Take one second off of the desired detonation time and set the think to PreDetonate. PreDetonate + // will insert a DANGER sound into the world sound list and delay detonation for one second so that + // the grenade explodes after the exact amount of time specified in the call to ShootTimed(). - set_pev(pGrenade, pev_dmgtime, get_gametime() + flTime); - SetThink(pGrenade, "TumbleThink"); - set_pev(pGrenade, pev_nextthink, get_gametime() + 0.1); + set_pev(pGrenade, pev_dmgtime, get_gametime() + flTime); + SetThink(pGrenade, "TumbleThink"); + set_pev(pGrenade, pev_nextthink, get_gametime() + 0.1); - if (flTime < 0.1) { - set_pev(pGrenade, pev_nextthink, get_gametime()); - set_pev(pGrenade, pev_velocity, Float:{0.0, 0.0, 0.0}); - } + if (flTime < 0.1) { + set_pev(pGrenade, pev_nextthink, get_gametime()); + set_pev(pGrenade, pev_velocity, NULL_VECTOR); + } - set_pev(pGrenade, pev_sequence, random_num(3, 7)); - set_pev(pGrenade, pev_framerate, 1.0); + set_pev(pGrenade, pev_sequence, random_num(3, 7)); + set_pev(pGrenade, pev_framerate, 1.0); - // Tumble through the air - // pGrenade->pev->avelocity.x = -400; + // Tumble through the air + // pGrenade->pev->avelocity.x = -400; - set_pev(pGrenade, pev_gravity, 0.5); - set_pev(pGrenade, pev_friction, 0.8); + set_pev(pGrenade, pev_gravity, 0.5); + set_pev(pGrenade, pev_friction, 0.8); - engfunc(EngFunc_SetModel, pGrenade, ZP_WEAPON_GRENADE_W_MODEL); - set_pev(pGrenade, pev_dmg, 200.0); + engfunc(EngFunc_SetModel, pGrenade, ZP_WEAPON_GRENADE_W_MODEL); + set_pev(pGrenade, pev_dmg, 300.0); - return pGrenade; + return pGrenade; } public BounceTouch(this, pOther) { - // don't hit the guy that launched this grenade - if (pOther == pev(this, pev_owner)) { - return; - } - - static Float:vecVelocity[3]; - pev(this, pev_velocity, vecVelocity); - - // only do damage if we're moving fairly fast - if (get_member(this, m_flNextAttack) < get_gametime() && xs_vec_len(vecVelocity) > 100.0) { - if (pev(this, pev_owner)) { - new tr = create_tr2(); - rg_multidmg_clear(); - static Float:vecForward[3]; - get_global_vector(GL_v_forward, vecForward); - ExecuteHamB(Ham_TraceAttack, pOther, pev(this, pev_owner), 1.0, vecForward, tr, DMG_CLUB); - rg_multidmg_apply(this, pev(this, pev_owner)); - free_tr2(tr); - } + new pOwner = pev(this, pev_owner); - set_member(this, m_flNextAttack, get_gametime() + 1.0); // debounce - } - - // Vector vecTestVelocity; - // // pev->avelocity = Vector (300, 300, 300); - - // // this is my heuristic for modulating the grenade velocity because grenades dropped purely vertical - // // or thrown very far tend to slow down too quickly for me to always catch just by testing velocity. - // // trimming the Z velocity a bit seems to help quite a bit. - // vecTestVelocity = pev->velocity; - // vecTestVelocity.z *= 0.45; + // don't hit the guy that launched this grenade + if (pOther == pOwner) { + return; + } - // if ( !m_fRegisteredSound && vecTestVelocity.Length() <= 60 ) - // { - // //ALERT( at_console, "Grenade Registered!: %f\n", vecTestVelocity.Length() ); + static Float:vecVelocity[3]; + pev(this, pev_velocity, vecVelocity); + + // only do damage if we're moving fairly fast + if (get_member(this, m_flNextAttack) < get_gametime() && xs_vec_len(vecVelocity) > 100.0) { + if (UTIL_IsPlayer(pOwner) && UTIL_IsPlayer(pOther) && rg_is_player_can_takedamage(pOther, pOwner)) { + new tr = create_tr2(); + rg_multidmg_clear(); + static Float:vecForward[3]; + get_global_vector(GL_v_forward, vecForward); + ExecuteHamB(Ham_TraceAttack, pOther, pOwner, 1.0, vecForward, tr, DMG_CLUB); + rg_multidmg_apply(this, pOwner); + free_tr2(tr); + } + + set_member(this, m_flNextAttack, get_gametime() + 1.0); // debounce + } - // // grenade is moving really slow. It's probably very close to where it will ultimately stop moving. - // // go ahead and emit the danger sound. + // Vector vecTestVelocity; + // // pev->avelocity = Vector (300, 300, 300); + + // // this is my heuristic for modulating the grenade velocity because grenades dropped purely vertical + // // or thrown very far tend to slow down too quickly for me to always catch just by testing velocity. + // // trimming the Z velocity a bit seems to help quite a bit. + // vecTestVelocity = pev->velocity; + // vecTestVelocity.z *= 0.45; + + // if ( !m_fRegisteredSound && vecTestVelocity.Length() <= 60 ) + // { + // //ALERT( at_console, "Grenade Registered!: %f\n", vecTestVelocity.Length() ); + + // // grenade is moving really slow. It's probably very close to where it will ultimately stop moving. + // // go ahead and emit the danger sound. + + // // register a radius louder than the explosion, so we make sure everyone gets out of the way + // CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin, static_cast(pev->dmg / 0.4), 0.3 ); + // m_fRegisteredSound = TRUE; + // } + + if (pev(this, pev_flags) & FL_ONGROUND) { + // add a bit of static friction + xs_vec_mul_scalar(vecVelocity, 0.8, vecVelocity); + set_pev(this, pev_velocity, vecVelocity); + set_pev(this, pev_sequence, 1); + } else { + // play bounce sound + emit_sound(this, CHAN_VOICE, g_rgszBounceSounds[random(sizeof(g_rgszBounceSounds))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } - // // register a radius louder than the explosion, so we make sure everyone gets out of the way - // CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin, static_cast(pev->dmg / 0.4), 0.3 ); - // m_fRegisteredSound = TRUE; - // } - - if (pev(this, pev_flags) & FL_ONGROUND) { - // add a bit of static friction - xs_vec_mul_scalar(vecVelocity, 0.8, vecVelocity); - set_pev(this, pev_velocity, vecVelocity); - set_pev(this, pev_sequence, 1); - } else { - // play bounce sound - emit_sound(this, CHAN_VOICE, g_rgszBounceSounds[random(sizeof(g_rgszBounceSounds))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } - - new Float:flFramerate = xs_vec_len(vecVelocity) / 200.0; - if (flFramerate > 1.0) { - flFramerate = 1.0; - } else if (flFramerate < 0.5) { - flFramerate = 0.0; - } - - set_pev(this, pev_framerate, flFramerate); + new Float:flFramerate = xs_vec_len(vecVelocity) / 200.0; + if (flFramerate > 1.0) { + flFramerate = 1.0; + } else if (flFramerate < 0.5) { + flFramerate = 0.0; + } + + set_pev(this, pev_framerate, flFramerate); } public TumbleThink(this) { - if (!ExecuteHam(Ham_IsInWorld, this)) { - engfunc(EngFunc_RemoveEntity, this); - return; - } + if (!ExecuteHam(Ham_IsInWorld, this)) { + engfunc(EngFunc_RemoveEntity, this); + return; + } - // StudioFrameAdvance( ); - set_pev(this, pev_nextthink, get_gametime() + 0.1); + // StudioFrameAdvance( ); + set_pev(this, pev_nextthink, get_gametime() + 0.1); - new Float:flDmgTime; - pev(this, pev_dmgtime, flDmgTime); + new Float:flDmgTime; + pev(this, pev_dmgtime, flDmgTime); - // if (flDmgTime - 1.0 < get_gametime()) { - // CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin + pev->velocity * (flDmgTime - get_gametime()), 400, 0.1 ); - // } + // if (flDmgTime - 1.0 < get_gametime()) { + // CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin + pev->velocity * (flDmgTime - get_gametime()), 400, 0.1 ); + // } - if (flDmgTime <= get_gametime()) { - SetThink(this, "Detonate"); - } + if (flDmgTime <= get_gametime()) { + SetThink(this, "Detonate"); + } - static Float:vecVelocity[3]; - pev(this, pev_velocity, vecVelocity); + static Float:vecVelocity[3]; + pev(this, pev_velocity, vecVelocity); - if (pev(this, pev_waterlevel) != 0) { - xs_vec_mul_scalar(vecVelocity, 0.5, vecVelocity); - set_pev(this, pev_velocity, vecVelocity); - set_pev(this, pev_framerate, 0.2); - } + if (pev(this, pev_waterlevel) != 0) { + xs_vec_mul_scalar(vecVelocity, 0.5, vecVelocity); + set_pev(this, pev_velocity, vecVelocity); + set_pev(this, pev_framerate, 0.2); + } } public Detonate(this) { - new Float:flDamage; - pev(this, pev_dmg, flDamage); + new Float:flDamage; + pev(this, pev_dmg, flDamage); - CW_GrenadeDetonate(this, flDamage * 2.5); - SetThink(this, "GrenadeSmoke"); - set_pev(this, pev_nextthink, get_gametime() + 0.1); + CW_GrenadeDetonate(this, flDamage, flDamage * 0.125); + SetThink(this, "GrenadeSmoke"); + set_pev(this, pev_nextthink, get_gametime() + 0.1); } public GrenadeSmoke(this) { - CW_GrenadeSmoke(this); - engfunc(EngFunc_RemoveEntity, this); + CW_GrenadeSmoke(this); + engfunc(EngFunc_RemoveEntity, this); } diff --git a/src/scripts/weapons/zp_weapon_satchel.sma b/src/scripts/weapons/zp_weapon_satchel.sma index b488b38..b6f8afa 100644 --- a/src/scripts/weapons/zp_weapon_satchel.sma +++ b/src/scripts/weapons/zp_weapon_satchel.sma @@ -14,9 +14,9 @@ #define AUTHOR "Hedgehog Fog" new const g_rgszBounceSounds[][] = { - "weapons/g_bounce1.wav", - "weapons/g_bounce2.wav", - "weapons/g_bounce3.wav" + "weapons/g_bounce1.wav", + "weapons/g_bounce2.wav", + "weapons/g_bounce3.wav" }; new bool:g_bPlayerChargeReady[MAX_PLAYERS + 1]; @@ -26,150 +26,151 @@ new g_iAmmoId; new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_SATCHEL_HUD_TXT); - - precache_model(ZP_WEAPON_SATCHEL_V_MODEL); - precache_model(ZP_WEAPON_SATCHEL_P_MODEL); - precache_model(ZP_WEAPON_SATCHEL_W_MODEL); - precache_model(ZP_WEAPON_SATCHELRADIO_V_MODEL); - precache_model(ZP_WEAPON_SATCHELRADIO_P_MODEL); - - for (new i = 0; i < sizeof(g_rgszBounceSounds); ++i) { - precache_sound(g_rgszBounceSounds[i]); - } - - g_iAmmoId = ZP_Ammo_GetId(ZP_Ammo_GetHandler("satchel")); - - g_iCwHandler = CW_Register(ZP_WEAPON_SATCHEL, CSW_C4, WEAPON_NOCLIP, g_iAmmoId, -1, 0, -1, 4, 5); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_SecondaryAttack, "@Weapon_SecondaryAttack"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_Holster, "@Weapon_Holster"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); - CW_Bind(g_iCwHandler, CWB_CanDrop, "@Weapon_CanDrop"); + precache_generic(ZP_WEAPON_SATCHEL_HUD_TXT); + + precache_model(ZP_WEAPON_SATCHEL_V_MODEL); + precache_model(ZP_WEAPON_SATCHEL_P_MODEL); + precache_model(ZP_WEAPON_SATCHEL_W_MODEL); + precache_model(ZP_WEAPON_SATCHELRADIO_V_MODEL); + precache_model(ZP_WEAPON_SATCHELRADIO_P_MODEL); + + for (new i = 0; i < sizeof(g_rgszBounceSounds); ++i) { + precache_sound(g_rgszBounceSounds[i]); + } + + g_iAmmoId = ZP_Ammo_GetId(ZP_Ammo_GetHandler("satchel")); + + g_iCwHandler = CW_Register(ZP_WEAPON_SATCHEL, CSW_C4, WEAPON_NOCLIP, g_iAmmoId, -1, 0, -1, 4, 5); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_SecondaryAttack, "@Weapon_SecondaryAttack"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_Holster, "@Weapon_Holster"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + CW_Bind(g_iCwHandler, CWB_CanDrop, "@Weapon_CanDrop"); + + ZP_Weapons_Register(g_iCwHandler, 0.0); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); - RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); + RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); } public @Weapon_PrimaryAttack(this) { - new pPlayer = CW_GetPlayer(this); + new pPlayer = CW_GetPlayer(this); - if (g_bPlayerChargeReady[pPlayer]) { - Detonate(this); - } else { - if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { - return; - } + if (g_bPlayerChargeReady[pPlayer]) { + Detonate(this); + } else { + if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { + return; + } - Throw(this); - } + Throw(this); + } - CW_PlayAnimation(this, 3, 0.53); - set_member(this, m_Weapon_flNextPrimaryAttack, 0.53); - set_member(this, m_Weapon_flNextSecondaryAttack, 0.53); - g_bPlayerRedeploy[pPlayer] = true; + CW_PlayAnimation(this, 3, 0.5); + g_bPlayerRedeploy[pPlayer] = true; } public @Weapon_SecondaryAttack(this) { - new pPlayer = CW_GetPlayer(this); + new pPlayer = CW_GetPlayer(this); - if (!g_bPlayerChargeReady[pPlayer]) { - return; - } + if (!g_bPlayerChargeReady[pPlayer]) { + return; + } - if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { - return; - } + if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { + return; + } - Throw(this); - set_member(this, m_Weapon_flNextPrimaryAttack, 0.53); - set_member(this, m_Weapon_flNextSecondaryAttack, 0.53); + Throw(this); + set_member(this, m_Weapon_flNextPrimaryAttack, 0.53); + set_member(this, m_Weapon_flNextSecondaryAttack, 0.53); } public @Weapon_Deploy(this) { - new pPlayer = CW_GetPlayer(this); + new pPlayer = CW_GetPlayer(this); - if (g_bPlayerChargeReady[pPlayer] || get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { - CW_DefaultDeploy(this, ZP_WEAPON_SATCHELRADIO_V_MODEL, ZP_WEAPON_SATCHELRADIO_P_MODEL, 1, "grenade"); - } else { - CW_DefaultDeploy(this, ZP_WEAPON_SATCHEL_V_MODEL, ZP_WEAPON_SATCHEL_P_MODEL, 1, "grenade"); - } + if (g_bPlayerChargeReady[pPlayer] || get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0) { + CW_DefaultDeploy(this, ZP_WEAPON_SATCHELRADIO_V_MODEL, ZP_WEAPON_SATCHELRADIO_P_MODEL, 2, "grenade"); + } else { + CW_DefaultDeploy(this, ZP_WEAPON_SATCHEL_V_MODEL, ZP_WEAPON_SATCHEL_P_MODEL, 2, "grenade"); + } } public @Weapon_Holster(this) { - new pPlayer = CW_GetPlayer(this); - if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0 && !g_bPlayerChargeReady[pPlayer]) { - SetThink(this, "RemovePlayerItem"); - set_pev(this, pev_nextthink, get_gametime() + 0.1); - } + new pPlayer = CW_GetPlayer(this); + if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0 && !g_bPlayerChargeReady[pPlayer]) { + SetThink(this, "RemovePlayerItem"); + set_pev(this, pev_nextthink, get_gametime() + 0.1); + } } public RemovePlayerItem(this) { - CW_RemovePlayerItem(this); + CW_RemovePlayerItem(this); } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED - 10.0; + return ZP_HUMAN_SPEED; } public @Weapon_Idle(this) { - new pPlayer = CW_GetPlayer(this); - if (g_bPlayerRedeploy[pPlayer]) { - ExecuteHamB(Ham_Item_Deploy, this); - g_bPlayerRedeploy[pPlayer] = false; - } else { - CW_PlayAnimation(this, 0, 5.5); + new pPlayer = CW_GetPlayer(this); + if (g_bPlayerRedeploy[pPlayer]) { + ExecuteHamB(Ham_Item_Deploy, this); + g_bPlayerRedeploy[pPlayer] = false; + } else { + CW_PlayAnimation(this, 0, 5.5); + } if (get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0 && !g_bPlayerChargeReady[pPlayer]) { - CW_RemovePlayerItem(this); + RemovePlayerItem(this); } - } } public @Weapon_Spawn(this) { - set_member(this, m_Weapon_iDefaultAmmo, 1); - engfunc(EngFunc_SetModel, this, ZP_WEAPON_SATCHEL_W_MODEL); + set_member(this, m_Weapon_iDefaultAmmo, 1); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_SATCHEL_W_MODEL); } public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_SATCHEL_W_MODEL); + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_SATCHEL_W_MODEL); } public @Weapon_CanDrop(this) { - new pPlayer = CW_GetPlayer(this); - return get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0 ? PLUGIN_HANDLED : PLUGIN_CONTINUE; + new pPlayer = CW_GetPlayer(this); + return get_member(pPlayer, m_rgAmmo, g_iAmmoId) <= 0 ? PLUGIN_HANDLED : PLUGIN_CONTINUE; } Throw(this) { - new pPlayer = CW_GetPlayer(this); - new iAmmoAmount = get_member(pPlayer, m_rgAmmo, g_iAmmoId); + new pPlayer = CW_GetPlayer(this); + new iAmmoAmount = get_member(pPlayer, m_rgAmmo, g_iAmmoId); + + if (iAmmoAmount <= 0) { + return; + } - if (iAmmoAmount > 0) { static Float:vecOrigin[3]; pev(pPlayer, pev_origin, vecOrigin); static Float:vecAngles[3]; pev(pPlayer, pev_v_angle, vecAngles); - + static Float:vecForward[3]; angle_vector(vecAngles, ANGLEVECTOR_FORWARD, vecForward); static Float:vecVelocity[3]; pev(pPlayer, pev_velocity, vecVelocity); for (new i = 0; i < 3; ++i) { - vecVelocity[i] = (vecForward[i] * 274.0) + vecVelocity[i]; + vecVelocity[i] = (vecForward[i] * 274.0) + vecVelocity[i]; } - new pSatchelCharge = SpawnSatchelCharge(); - // new pSatchelCharge = CE_Create("zp_satchel_charge", vecOrigin); engfunc(EngFunc_SetOrigin, pSatchelCharge, vecOrigin); set_pev(pSatchelCharge, pev_velocity, vecVelocity); set_pev(pSatchelCharge, pev_avelocity, Float:{0.0, 100.0, 0.0}); @@ -180,163 +181,169 @@ Throw(this) { rg_set_animation(pPlayer, PLAYER_ATTACK1); g_bPlayerChargeReady[pPlayer] = true; - } - ZP_Player_UpdateSpeed(pPlayer); + set_member(this, m_Weapon_flNextPrimaryAttack, 1.0); + set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); + + ZP_Player_UpdateSpeed(pPlayer); } Detonate(this) { - new pPlayer = CW_GetPlayer(this); + new pPlayer = CW_GetPlayer(this); - new pEntity; - while ((pEntity = engfunc(EngFunc_FindEntityByString, pEntity, "classname", "zp_satchel_charge")) != 0) { - if (pev(pEntity, pev_owner) == pPlayer) { - ExecuteHamB(Ham_Use, pEntity, pPlayer, pPlayer, USE_ON, 0.0); - g_bPlayerChargeReady[pPlayer] = false; + new pEntity; + while ((pEntity = engfunc(EngFunc_FindEntityByString, pEntity, "classname", "zp_satchel_charge")) != 0) { + if (pev(pEntity, pev_owner) == pPlayer) { + ExecuteHamB(Ham_Use, pEntity, pPlayer, pPlayer, USE_ON, 0.0); + } } - } + + g_bPlayerChargeReady[pPlayer] = false; + + set_member(this, m_Weapon_flNextPrimaryAttack, 0.5); + set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); } SpawnSatchelCharge() { - new pEntity = rg_create_entity("info_target"); - dllfunc(DLLFunc_Spawn, pEntity); - - set_pev(pEntity, pev_classname, "zp_satchel_charge"); + new pEntity = rg_create_entity("info_target"); + dllfunc(DLLFunc_Spawn, pEntity); + + set_pev(pEntity, pev_classname, "zp_satchel_charge"); - set_pev(pEntity, pev_movetype, MOVETYPE_BOUNCE); - set_pev(pEntity, pev_solid, SOLID_BBOX); + set_pev(pEntity, pev_movetype, MOVETYPE_BOUNCE); + set_pev(pEntity, pev_solid, SOLID_BBOX); - engfunc(EngFunc_SetModel, pEntity, ZP_WEAPON_SATCHEL_W_MODEL); - // engfunc(EngFunc_SetSize, pEntity, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 16.0}); + engfunc(EngFunc_SetModel, pEntity, ZP_WEAPON_SATCHEL_W_MODEL); + // engfunc(EngFunc_SetSize, pEntity, Float:{-8.0, -8.0, 0.0}, Float:{8.0, 8.0, 16.0}); - SetTouch(pEntity, "SatchelChargeSlide"); - SetUse(pEntity, "GrenadeDetonateUse"); - SetThink(pEntity, "SatchelChargeThink"); + SetTouch(pEntity, "SatchelChargeSlide"); + SetUse(pEntity, "GrenadeDetonateUse"); + SetThink(pEntity, "SatchelChargeThink"); - set_pev(pEntity, pev_nextthink, get_gametime() + 0.1); + set_pev(pEntity, pev_nextthink, get_gametime() + 0.1); - set_pev(pEntity, pev_gravity, 0.5); - set_pev(pEntity, pev_friction, 0.8); + set_pev(pEntity, pev_gravity, 0.5); + set_pev(pEntity, pev_friction, 0.8); - set_pev(pEntity, pev_dmg, 500.0); - set_pev(pEntity, pev_sequence, 1); - set_pev(pEntity, pev_spawnflags, SF_DETONATE); + set_pev(pEntity, pev_dmg, 500.0); + set_pev(pEntity, pev_sequence, 1); + set_pev(pEntity, pev_spawnflags, SF_DETONATE); - return pEntity; + return pEntity; } Deactivate(this) { - set_pev(this, pev_solid, SOLID_NOT); - set_pev(this, pev_flags, pev(this, pev_flags) | FL_KILLME); + set_pev(this, pev_solid, SOLID_NOT); + set_pev(this, pev_flags, pev(this, pev_flags) | FL_KILLME); } DeactivateSatchels(pOwner) { - new pEntity; - while ((pEntity = engfunc(EngFunc_FindEntityByString, pEntity, "classname", "zp_satchel_charge")) != 0) { - if (pev(pEntity, pev_owner) == pOwner) { - Deactivate(pEntity); + new pEntity; + while ((pEntity = engfunc(EngFunc_FindEntityByString, pEntity, "classname", "zp_satchel_charge")) != 0) { + if (pev(pEntity, pev_owner) == pOwner) { + Deactivate(pEntity); + } } - } - g_bPlayerChargeReady[pOwner] = false; + g_bPlayerChargeReady[pOwner] = false; } public SatchelChargeSlide(pEntity) { - set_pev(pEntity, pev_gravity, 1.0); + set_pev(pEntity, pev_gravity, 1.0); - static Float:vecOrigin[3]; - pev(pEntity, pev_origin, vecOrigin); + static Float:vecOrigin[3]; + pev(pEntity, pev_origin, vecOrigin); - static Float:vecVelocity[3]; - pev(pEntity, pev_velocity, vecVelocity); + static Float:vecVelocity[3]; + pev(pEntity, pev_velocity, vecVelocity); - static Float:vecDown[3]; - xs_vec_copy(vecOrigin, vecDown); - vecDown[2] -= 10.0; + static Float:vecDown[3]; + xs_vec_copy(vecOrigin, vecDown); + vecDown[2] -= 10.0; - new pTr = create_tr2(); - engfunc(EngFunc_TraceLine, vecOrigin, vecDown, IGNORE_MONSTERS, pEntity, pTr); + new pTr = create_tr2(); + engfunc(EngFunc_TraceLine, vecOrigin, vecDown, IGNORE_MONSTERS, pEntity, pTr); - static Float:flFraction; - get_tr2(pTr, TR_flFraction, flFraction); + static Float:flFraction; + get_tr2(pTr, TR_flFraction, flFraction); - free_tr2(pTr); + free_tr2(pTr); - if (flFraction < 1.0) { - xs_vec_mul_scalar(vecVelocity, 0.95, vecVelocity); - set_pev(pEntity, pev_velocity, vecVelocity); + if (flFraction < 1.0) { + xs_vec_mul_scalar(vecVelocity, 0.95, vecVelocity); + set_pev(pEntity, pev_velocity, vecVelocity); - // static Float:vecAVelocity[3]; - // pev(pEntity, pev_velocity, vecAVelocity); - // xs_vec_mul_scalar(vecAVelocity, 0.9, vecAVelocity); - // set_pev(pEntity, pev_avelocity, vecAVelocity); - } + // static Float:vecAVelocity[3]; + // pev(pEntity, pev_velocity, vecAVelocity); + // xs_vec_mul_scalar(vecAVelocity, 0.9, vecAVelocity); + // set_pev(pEntity, pev_avelocity, vecAVelocity); + } - if ((~pev(pEntity, pev_flags) & FL_ONGROUND) && xs_vec_len(vecVelocity) > 10.0) { - emit_sound(pEntity, CHAN_VOICE, g_rgszBounceSounds[random(sizeof(g_rgszBounceSounds))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } + if ((~pev(pEntity, pev_flags) & FL_ONGROUND) && xs_vec_len(vecVelocity) > 10.0) { + emit_sound(pEntity, CHAN_VOICE, g_rgszBounceSounds[random(sizeof(g_rgszBounceSounds))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } public SatchelChargeThink(pEntity) { - if (!ExecuteHam(Ham_IsInWorld, pEntity)) { - engfunc(EngFunc_RemoveEntity, pEntity); - return; - } - - static Float:vecVelocity[3]; - pev(pEntity, pev_velocity, vecVelocity); - - new iWaterLevel = pev(pEntity, pev_waterlevel); - if (iWaterLevel == 3) { - set_pev(pEntity, pev_movetype, MOVETYPE_FLY); - - xs_vec_mul_scalar(vecVelocity, 0.8, vecVelocity); - vecVelocity[2] += 8.0; - set_pev(pEntity, pev_velocity, vecVelocity); - - static Float:vecAVelocity[3]; - pev(pEntity, pev_avelocity, vecAVelocity); - xs_vec_mul_scalar(vecAVelocity, 0.9, vecAVelocity); - set_pev(pEntity, pev_avelocity, vecAVelocity); - } else if (iWaterLevel == 0) { - set_pev(pEntity, pev_movetype, MOVETYPE_BOUNCE); - } else { - vecVelocity[2] -= 8.0; - set_pev(pEntity, pev_velocity, vecVelocity); - } + if (!ExecuteHam(Ham_IsInWorld, pEntity)) { + engfunc(EngFunc_RemoveEntity, pEntity); + return; + } + + static Float:vecVelocity[3]; + pev(pEntity, pev_velocity, vecVelocity); + + new iWaterLevel = pev(pEntity, pev_waterlevel); + if (iWaterLevel == 3) { + set_pev(pEntity, pev_movetype, MOVETYPE_FLY); + + xs_vec_mul_scalar(vecVelocity, 0.8, vecVelocity); + vecVelocity[2] += 8.0; + set_pev(pEntity, pev_velocity, vecVelocity); + + static Float:vecAVelocity[3]; + pev(pEntity, pev_avelocity, vecAVelocity); + xs_vec_mul_scalar(vecAVelocity, 0.9, vecAVelocity); + set_pev(pEntity, pev_avelocity, vecAVelocity); + } else if (iWaterLevel == 0) { + set_pev(pEntity, pev_movetype, MOVETYPE_BOUNCE); + } else { + vecVelocity[2] -= 8.0; + set_pev(pEntity, pev_velocity, vecVelocity); + } - // if (!xs_vec_len_2d(vecVelocity) && (iWaterLevel || pev(pEntity, pev_flags) & FL_ONGROUND)) { - // set_pev(pEntity, pev_solid, SOLID_NOT); - // } + // if (!xs_vec_len_2d(vecVelocity) && (iWaterLevel || pev(pEntity, pev_flags) & FL_ONGROUND)) { + // set_pev(pEntity, pev_solid, SOLID_NOT); + // } - set_pev(pEntity, pev_nextthink, get_gametime() + 0.1); + set_pev(pEntity, pev_nextthink, get_gametime() + 0.1); } public GrenadeDetonateUse(const pEntity) { - SetThink(pEntity, "GrenadeDetonate"); - set_pev(pEntity, pev_nextthink, get_gametime()); + SetThink(pEntity, "GrenadeDetonate"); + set_pev(pEntity, pev_nextthink, get_gametime()); } public GrenadeDetonate(this) { - new Float:flDamage; - pev(this, pev_dmg, flDamage); + new Float:flDamage; + pev(this, pev_dmg, flDamage); - CW_GrenadeDetonate(this, flDamage, flDamage * 0.125); - SetThink(this, "GrenadeSmoke"); - set_pev(this, pev_nextthink, get_gametime() + 0.1); + CW_GrenadeDetonate(this, flDamage * 0.75, flDamage * 0.125); + SetThink(this, "GrenadeSmoke"); + set_pev(this, pev_nextthink, get_gametime() + 0.1); } public GrenadeSmoke(this) { - CW_GrenadeSmoke(this); - engfunc(EngFunc_RemoveEntity, this); + CW_GrenadeSmoke(this); + engfunc(EngFunc_RemoveEntity, this); } public Round_Fw_NewRound() { - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { - DeactivateSatchels(pPlayer); - } + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + DeactivateSatchels(pPlayer); + } } public OnPlayerKilled_Post(pPlayer) { - DeactivateSatchels(pPlayer); + DeactivateSatchels(pPlayer); } diff --git a/src/scripts/weapons/zp_weapon_shotgun.sma b/src/scripts/weapons/zp_weapon_shotgun.sma index 180d6e1..7ef5967 100644 --- a/src/scripts/weapons/zp_weapon_shotgun.sma +++ b/src/scripts/weapons/zp_weapon_shotgun.sma @@ -3,8 +3,10 @@ #include #include #include +#include #include +#include #include #define PLUGIN "[Zombie Panic] Weapon Shotgun" @@ -13,83 +15,87 @@ new CW:g_iCwHandler; public plugin_precache() { - precache_generic(ZP_WEAPON_SHOTGUN_HUD_TXT); - - precache_model(ZP_WEAPON_SHOTGUN_V_MODEL); - precache_model(ZP_WEAPON_SHOTGUN_P_MODEL); - precache_model(ZP_WEAPON_SHOTGUN_W_MODEL); - precache_model("models/shotgunshell.mdl"); - - for (new i = 0; i < sizeof(ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS[i]); - } - - precache_sound(ZP_WEAPON_SHOTGUN_SHOT_SOUND); - precache_sound(ZP_WEAPON_SHOTGUN_PUMP_SOUND); - - g_iCwHandler = CW_Register(ZP_WEAPON_SHOTGUN, CSW_M3, 6, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_SHOTGUN)), 24, _, _, 0, 3, _, "m3"); - CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); - CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); - CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); - CW_Bind(g_iCwHandler, CWB_Pump, "@Weapon_Pump"); - CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); - CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); - CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); - CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + precache_generic(ZP_WEAPON_SHOTGUN_HUD_TXT); + + precache_model(ZP_WEAPON_SHOTGUN_V_MODEL); + precache_model(ZP_WEAPON_SHOTGUN_P_MODEL); + precache_model(ZP_WEAPON_SHOTGUN_W_MODEL); + precache_model("models/shotgunshell.mdl"); + + for (new i = 0; i < sizeof(ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS); ++i) { + precache_sound(ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS[i]); + } + + precache_sound(ZP_WEAPON_SHOTGUN_SHOT_SOUND); + precache_sound(ZP_WEAPON_SHOTGUN_PUMP_SOUND); + + g_iCwHandler = CW_Register(ZP_WEAPON_SHOTGUN, CSW_M3, 6, ZP_Ammo_GetId(ZP_Ammo_GetHandler(ZP_AMMO_SHOTGUN)), 24, _, _, 0, 3, _, "m3", CWF_NoBulletSmoke); + CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); + CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); + CW_Bind(g_iCwHandler, CWB_Reload, "@Weapon_Reload"); + CW_Bind(g_iCwHandler, CWB_Pump, "@Weapon_Pump"); + CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); + CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); + CW_Bind(g_iCwHandler, CWB_Spawn, "@Weapon_Spawn"); + CW_Bind(g_iCwHandler, CWB_WeaponBoxModelUpdate, "@Weapon_WeaponBoxSpawn"); + + ZP_Weapons_Register(g_iCwHandler, ZP_WEIGHT_SHOTGUN); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); } public @Weapon_PrimaryAttack(this) { - if (CW_DefaultShotgunShot(this, 6.0, 1.0, 0.5, Float:VECTOR_CONE_15DEGREES, 16)) { - CW_PlayAnimation(this, 1, 1.5); - new pPlayer = CW_GetPlayer(this); - emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_SHOTGUN_SHOT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - - set_pev(pPlayer, pev_punchangle, Float:{-5.0, 0.0, 0.0}); + static Float:vecSpread[3]; + UTIL_CalculateWeaponSpread(this, Float:VECTOR_CONE_15DEGREES, 1.5, 1.0, 0.95, 2.0, vecSpread); + + if (CW_DefaultShotgunShot(this, 7.0, 1.0, 0.5, vecSpread, 25)) { + CW_PlayAnimation(this, 1, 1.5); + new pPlayer = CW_GetPlayer(this); + emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_SHOTGUN_SHOT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + + set_pev(pPlayer, pev_punchangle, Float:{-5.0, 0.0, 0.0}); - CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shotgunshell.mdl"), 2); - } + CW_EjectWeaponBrass(this, engfunc(EngFunc_ModelIndex, "models/shotgunshell.mdl"), 2); + } } public @Weapon_Reload(this) { - if (CW_DefaultShotgunReload(this, 5, 3, 0.6, 0.5)) { - new flInSpecialReload = get_member(this, m_Weapon_fInSpecialReload); + if (CW_DefaultShotgunReload(this, 5, 3, 0.6, 0.5)) { + new flInSpecialReload = get_member(this, m_Weapon_fInSpecialReload); - if (flInSpecialReload == 2) { - new pPlayer = CW_GetPlayer(this); - emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS[random(sizeof(ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + if (flInSpecialReload == 2) { + new pPlayer = CW_GetPlayer(this); + emit_sound(pPlayer, CHAN_WEAPON, ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS[random(sizeof(ZP_WEAPON_SHOTGUN_RELOAD_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } } - } } public @Weapon_Idle(this) { - new Float:flRand = random_float(0.0, 1.0); // UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); - CW_DefaultShotgunIdle(this, flRand > 0.96 ? 0 : 7, 4, (flRand > 0.96 ? (18.0 / 3.0) : (18.0 / 2.0)), 1.5, ZP_WEAPON_SHOTGUN_PUMP_SOUND); + new Float:flRand = random_float(0.0, 1.0); // UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); + CW_DefaultShotgunIdle(this, flRand > 0.96 ? 0 : 7, 4, (flRand > 0.96 ? (18.0 / 3.0) : (18.0 / 2.0)), 1.5, ZP_WEAPON_SHOTGUN_PUMP_SOUND); } public @Weapon_Pump(this) { - new pPlayer = CW_GetPlayer(this); - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SHOTGUN_PUMP_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + new pPlayer = CW_GetPlayer(this); + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SHOTGUN_PUMP_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } public @Weapon_Deploy(this) { - new pPlayer = CW_GetPlayer(this); - CW_DefaultDeploy(this, ZP_WEAPON_SHOTGUN_V_MODEL, ZP_WEAPON_SHOTGUN_P_MODEL, 4, "shotgun"); - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SHOTGUN_PUMP_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + new pPlayer = CW_GetPlayer(this); + CW_DefaultDeploy(this, ZP_WEAPON_SHOTGUN_V_MODEL, ZP_WEAPON_SHOTGUN_P_MODEL, 4, "shotgun"); + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SHOTGUN_PUMP_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_HUMAN_SPEED - 17.0; + return ZP_HUMAN_SPEED; } public @Weapon_Spawn(this) { - engfunc(EngFunc_SetModel, this, ZP_WEAPON_SHOTGUN_W_MODEL); + engfunc(EngFunc_SetModel, this, ZP_WEAPON_SHOTGUN_W_MODEL); } public @Weapon_WeaponBoxSpawn(this, pWeaponBox) { - engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_SHOTGUN_W_MODEL); + engfunc(EngFunc_SetModel, pWeaponBox, ZP_WEAPON_SHOTGUN_W_MODEL); } - diff --git a/src/scripts/weapons/zp_weapon_swipe.sma b/src/scripts/weapons/zp_weapon_swipe.sma index c40609a..f828480 100644 --- a/src/scripts/weapons/zp_weapon_swipe.sma +++ b/src/scripts/weapons/zp_weapon_swipe.sma @@ -16,155 +16,155 @@ #define PRIMARY_AMMO_ID 13 new CW:g_iCwHandler; +new gmsgAmmoX; public plugin_precache() { precache_generic(ZP_WEAPON_SWIPE_HUD_TXT); for (new i = 0; i < sizeof(ZP_WEAPON_SWIPE_MISS_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_SWIPE_MISS_SOUNDS[i]); + precache_sound(ZP_WEAPON_SWIPE_MISS_SOUNDS[i]); } for (new i = 0; i < sizeof(ZP_WEAPON_SWIPE_HIT_SOUNDS); ++i) { - precache_sound(ZP_WEAPON_SWIPE_HIT_SOUNDS[i]); + precache_sound(ZP_WEAPON_SWIPE_HIT_SOUNDS[i]); } - g_iCwHandler = CW_Register(ZP_WEAPON_SWIPE, CSW_KNIFE, WEAPON_NOCLIP, PRIMARY_AMMO_ID, -1, _, _, 2, 0); + g_iCwHandler = CW_Register(ZP_WEAPON_SWIPE, CSW_KNIFE, WEAPON_NOCLIP, PRIMARY_AMMO_ID, -1, _, _, 2, 0, _, _, CWF_NoBulletDecal); CW_Bind(g_iCwHandler, CWB_Idle, "@Weapon_Idle"); CW_Bind(g_iCwHandler, CWB_PrimaryAttack, "@Weapon_PrimaryAttack"); CW_Bind(g_iCwHandler, CWB_SecondaryAttack, "@Weapon_SecondaryAttack"); CW_Bind(g_iCwHandler, CWB_Deploy, "@Weapon_Deploy"); CW_Bind(g_iCwHandler, CWB_GetMaxSpeed, "@Weapon_GetMaxSpeed"); CW_Bind(g_iCwHandler, CWB_CanDrop, "@Weapon_CanDrop"); + + ZP_Weapons_Register(g_iCwHandler, 0.0); } public plugin_init() { - register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + register_plugin(PLUGIN, ZP_VERSION, AUTHOR); + + gmsgAmmoX = get_user_msgid("AmmoX"); - RegisterHam(Ham_TraceAttack, "player", "OnPlayerTraceAttack", .Post = 0); - RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); - RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); + RegisterHam(Ham_TraceAttack, "player", "OnPlayerTraceAttack", .Post = 0); + RegisterHam(Ham_Killed, "player", "OnPlayerKilled_Post", .Post = 1); + RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn_Post", .Post = 1); } public @Weapon_PrimaryAttack(this) { - new pPlayer = CW_GetPlayer(this); + new pPlayer = CW_GetPlayer(this); - if (random(2) == 0) { - set_member(pPlayer, m_szAnimExtention, "grenade"); - } else { - set_member(pPlayer, m_szAnimExtention, "shieldgren"); - } + if (random(2) == 0) { + set_member(pPlayer, m_szAnimExtention, "grenade"); + } else { + set_member(pPlayer, m_szAnimExtention, "shieldgren"); + } - new pHit = CW_DefaultSwing(this, 25.0, 0.5, 48.0); + new pHit = CW_DefaultSwing(this, 35.0, 0.5, 36.0); - if (pHit < 0) { - switch (random(3)) { - case 0: CW_PlayAnimation(this, 1, 0.25); - case 1: CW_PlayAnimation(this, 5, 0.25); - case 2: CW_PlayAnimation(this, 7, 0.25); - } + if (pHit < 0) { + switch (random(3)) { + case 0: CW_PlayAnimation(this, 4, 11.0 / 22.0); + case 1: CW_PlayAnimation(this, 5, 14.0 / 22.0); + case 2: CW_PlayAnimation(this, 7, 19.0 / 24.0); + } - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SWIPE_MISS_SOUNDS[random(sizeof(ZP_WEAPON_SWIPE_MISS_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } else { - switch (random(3)) { - case 0: CW_PlayAnimation(this, 3, 0.25); - case 1: CW_PlayAnimation(this, 6, 0.25); - case 2: CW_PlayAnimation(this, 8, 0.25); - } + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SWIPE_MISS_SOUNDS[random(sizeof(ZP_WEAPON_SWIPE_MISS_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } else { + switch (random(3)) { + case 0: CW_PlayAnimation(this, 3, 11.0 / 22.0); + case 1: CW_PlayAnimation(this, 6, 14.0 / 22.0); + case 2: CW_PlayAnimation(this, 8, 19.0 / 24.0); + } - emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SWIPE_HIT_SOUNDS[random(sizeof(ZP_WEAPON_SWIPE_HIT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); - } + emit_sound(pPlayer, CHAN_ITEM, ZP_WEAPON_SWIPE_HIT_SOUNDS[random(sizeof(ZP_WEAPON_SWIPE_HIT_SOUNDS))], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); + } - set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); + set_member(this, m_Weapon_flNextSecondaryAttack, 0.5); } public @Weapon_SecondaryAttack(this) { - new pPlayer = CW_GetPlayer(this); - if (is_user_bot(pPlayer)) { - CW_PrimaryAttack(this); - } + new pPlayer = CW_GetPlayer(this); + if (is_user_bot(pPlayer)) { + CW_PrimaryAttack(this); + } } public @Weapon_Deploy(this) { - new pPlayer = CW_GetPlayer(this); - new iCharacter = ZP_Player_GetCharacter(pPlayer); - - static szVModel[64]; - ZP_GetCharacterModel(iCharacter, CharacterModel_Swipe, szVModel, charsmax(szVModel)); - CW_DefaultDeploy(this, szVModel, "", 1, "dualpistols"); + CW_DefaultDeploy(this, NULL_STRING, NULL_STRING, 1, "dualpistols"); } public @Weapon_Idle(this) { - new pPlayer = CW_GetPlayer(this); - set_member(pPlayer, m_szAnimExtention, "dualpistols"); + new pPlayer = CW_GetPlayer(this); + set_member(pPlayer, m_szAnimExtention, "dualpistols"); - switch (random(3)) { - case 0: { - CW_PlayAnimation(this, 0, 36.0 / 13.0); - } - case 1: { - CW_PlayAnimation(this, 9, 61.0 / 15.0); - } - case 2: { - CW_PlayAnimation(this, 10, 61.0 / 15.0); + switch (random(3)) { + case 0: { + CW_PlayAnimation(this, 0, 36.0 / 13.0); + } + case 1: { + CW_PlayAnimation(this, 9, 61.0 / 15.0); + } + case 2: { + CW_PlayAnimation(this, 10, 61.0 / 15.0); + } } - } } public Float:@Weapon_GetMaxSpeed(this) { - return ZP_ZOMBIE_SPEED; + return ZP_ZOMBIE_SPEED; } public @Weapon_CanDrop(this) { - return PLUGIN_HANDLED; + return PLUGIN_HANDLED; } public OnPlayerKilled_Post() { - UpdateZombieLives(); - return HAM_HANDLED; + UpdateZombieLives(); + return HAM_HANDLED; } public OnPlayerSpawn_Post(pPlayer) { - UpdateZombieLives(); - return HAM_HANDLED; + UpdateZombieLives(); + UpdatePlayerZombieLives(pPlayer); + return HAM_HANDLED; } public OnPlayerTraceAttack(this, pAttacker, Float:flDamage, Float:vecDir[3], pTr, iDamageBits) { - if (!UTIL_IsPlayer(pAttacker)) { - return HAM_IGNORED; - } + if (!UTIL_IsPlayer(pAttacker)) { + return HAM_IGNORED; + } - new pItem = get_member(pAttacker, m_pActiveItem); - if (CW_GetHandlerByEntity(pItem) != g_iCwHandler) { - return HAM_IGNORED; - } + new pItem = get_member(pAttacker, m_pActiveItem); + if (CW_GetHandlerByEntity(pItem) != g_iCwHandler) { + return HAM_IGNORED; + } - set_tr2(pTr, TR_iHitgroup, get_tr2(pTr, TR_iHitgroup) & ~HIT_HEAD); + set_tr2(pTr, TR_iHitgroup, get_tr2(pTr, TR_iHitgroup) & ~HIT_HEAD); - return HAM_HANDLED; + return HAM_HANDLED; } UpdateZombieLives() { - for (new pPlayer = 1; pPlayer <= MAX_PLAYERS; ++pPlayer) { - if (!is_user_connected(pPlayer)) { - continue; - } + for (new pPlayer = 1; pPlayer <= MaxClients; ++pPlayer) { + if (!is_user_connected(pPlayer)) { + continue; + } - if (!is_user_alive(pPlayer)) { - continue; - } + if (!is_user_alive(pPlayer)) { + continue; + } - if (!ZP_Player_IsZombie(pPlayer)) { - continue; - } + if (!ZP_Player_IsZombie(pPlayer)) { + continue; + } - UpdatePlayerZombieLives(pPlayer); - } + UpdatePlayerZombieLives(pPlayer); + } } UpdatePlayerZombieLives(pPlayer) { - message_begin(MSG_ONE, get_user_msgid("AmmoX"), _, pPlayer); - write_byte(PRIMARY_AMMO_ID); - write_byte(ZP_GameRules_GetZombieLives()); - message_end(); + message_begin(MSG_ONE, gmsgAmmoX, _, pPlayer); + write_byte(PRIMARY_AMMO_ID); + write_byte(ZP_GameRules_GetZombieLives()); + message_end(); } -