RSSy MYGO.pl Opublikowano Wrzesień 29, 2022 o 11:23 RSSy Udostępnij Opublikowano Wrzesień 29, 2022 o 11:23 Description:This is refactored code of original work by panxiaohai + manually added some features from Marttt's fork, aimed to make it as fast (performance optimized) and crash-safe as possible. Contains some features, which not exist in above fork. Same vice versa, doesn't contain some feature you can find in Marttt fork. Read ChangeLog for details. NEW: - API Spoiler PHP Code: /** * Safely removes witch prop. * * @param iWitch Witch prop. * * @error Entity is not valid. * @noreturn */ native void WG_WitchRemove(int iWitch); /** * Called whenever player put the witch on the ground. * * @param iClient Client index who put the witch * @param iWitch Witch prop. * @param fVec[3] Witch coordinates * * @noreturn */ forward void OnWitchGuard_PutGround(int iClient, int iWitch, float fVec[3]); /** * Called whenever player took the witch guard from the ground. * * @param iClient Client index * @param iWitch Witch prop. * @param fVec[3] Witch coordinates * * @noreturn */ forward void OnWitchGuard_RemoveGround(int iClient, int iWitch, float fVec[3]); Dependency: - (optional) ThirdPersonShoulder_Detect by Lux Settings (ConVars): Can be found in: cfg/sourcemod/l4d_witch_guard.cfg PHP Code: // 0: random pose, 1: best pose, 2: specific pose (uses pose_onback cvars) l4d_witch_guard_bestpose_onback "0" // 0: random pose, 1: best pose, 2: specific pose (uses pose_down cvars) l4d_witch_guard_bestpose_ondown "1" // 0: off, 1-82: default witch pose while on back. (l4d_witch_guard_bestpose_onback must be: 2) l4d_witch_guard_pose_onback "" // 0: off, 1-82: default witch pose while down. (l4d_witch_guard_bestpose_onback must be: 2) l4d_witch_guard_pose_down "" // attack damage, 1.0: normal [0.1, 1.0] l4d_witch_guard_damage "1.0" // attack range l4d_witch_guard_range "600.0" // gun count l4d_witch_guard_gun_count "1" // 0: do not shot on back, 1: shot l4d_witch_guard_shotonback "0" // Enables/Disables other clients to steal(pick up) a Witch from other owners while on the ground. 0 = Disable, 1 = Enable. l4d_witch_guard_steal "0" // Show/Hide the sprite indicating which Witch in the ground is from the owner. 0 = Hide, 1 = Show. l4d_witch_guard_spriteowner "1" // Prioritize human players. 0 = Disable, 1 = Enable. l4d_witch_guard_prioritize_human_players "0" // Give witch to a random player if the killer already has one. 0 = Disable, 1 = Enable. l4d_witch_guard_give_random "0" // Show witch on back when some third-person actions happen? 0 = Disable (can increase performance), 1 = Enable. l4d_witch_guard_detect_thirdperson "1" // Enable this plugin? 0 = No, 1 = Yes. l4d_witch_guard_enable "1" // Weapon type given to the witch. 0 = Random, 1 = Assault Rifle, 2 = Hunting Rifle, 3 = Auto Shotgun. l4d_witch_guard_weapon_type "0" Supported games: - L4D1 - L4D2 Warning: Don't forget to remove the old plugin witch_guard_l4d.smx, if you update (he has different name!) ChangeLog 1.4.10-B (05-Aug-2022) - Added preserving of witch color. - Fixed compilation warnings on SM 1.11 1.4.9-B (26-Oct-2021) - Added WG_WitchRemove native. - Added OnWitchGuard_PutGround forward. - Added OnWitchGuard_RemoveGround forward. 1.4.8-B (26-Apr-2021) - Fixed rare invalid client entity error in CreateButton. 1.4.7-B (21-Mar-2020) - Code is beautified. - Optimizations. - Fixed anim timer doesn't stop in some cases and target wrong entities. - Cached ConVar values. - Some protections against crash. - Added ConVar: "l4d_witch_guard_detect_thirdperson" - Show witch on back when some third-person actions happen? 0 = Disable (can increase performance), 1 = Enable. - Added ConVar: "l4d_witch_guard_enable" - Enable this plugin? 0 = No, 1 = Yes. - Added safe unloading. Included Marttt changes from 1.4.9.4: - Button for pickup the witch is now added through a timer 1.5 seconds later. Included Marttt changes from 1.4.9.5: - l4d_witch_guard_bestpose_onback ? 0: random pose, 1: best pose, 2: specific pose (uses pose_onback cvars) - l4d_witch_guard_bestpose_ondown ? 0: random pose, 1: best pose, 2: specific pose (uses pose_down cvars) - l4d_witch_guard_pose_down ? 0: off, 1-82: default witch pose while down. (l4d_witch_guard_bestpose_onback must be: 2) - l4d_witch_guard_pose_onback ? 0: off, 1-82: default witch pose while on back. (l4d_witch_guard_bestpose_onback must be: 2) 1.4.6-B - code clear, performance, safety and translation optimizations. - added support for custom witch models. - fixed conflict with CPR plugin (Ctrl + E is no more trigger witch guard). - restored L4D1 support. New (optional) requirement: ThirdPersonShoulder_Detect plugin by Lux: https://forums.alliedmods.net/showthread.php?p=2529779 Credits: - @panxiaohai - original author - @Marttt - for amazing additions in his fork - @Lux - for third person detection plugin. - @Mr. GameOver - for third person detection (in L4D1). DonateDonates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often: - Patreon - BitCoin - Ю.Money Attached Files WitchGuard2.zip (46.7 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi