Commit Graph

755 Commits

Author SHA1 Message Date
Francisco Muñoz
f441279294
API: CSPlayer new members (physics related) (#851)
* CSPlayer new members
* API refactory in pm_shared.cpp
* Cached CSPlayer pointer in a global variable
* Changed PM_JumpHeight from lambda function to an inline function
* Changed m_flDuckSpeedMultiplier data type to double
2023-09-05 10:52:14 +07:00
Francisco Muñoz
696f465977
API: Added new API funcs (6) and new Hookchains (21) (#849)
* Added few newest API Hookchains
* Added hookchain for PM_CheckWaterJump
* Added hookchain for PM_Jump
* Added hookchain for PM_Duck
* Added hookchain for PM_UnDuck
* Added hookchain for ClearMultiDamage
* Added hookchain for AddMultiDamage
* Added hookchain for ApplyMultiDamage
* Added hookchain for CSGameRules::TeamFull
* Added hookchain for CSGameRules::TeamStacked
* Added hookchain for CSGameRules::PlayerGotWeapon
* Added hookchain for CBotManager::OnEvent
* Added hookchain for CBasePlayer::EntSelectSpawnPoint
* Added hookchain for CBasePlayerWeapon::KickBack
* Added hookchain for CBasePlayerWeapon::SendWeaponAnim
* Added new PM_* Hookchains
* Added PM_WaterJump
* Added PM_PlayStepSound
* Added PM_AirAccelerate
* Added CBasePlayer::CheckTimeBasedDamage
* Added CBasePlayerWeapon::ItemPostFrame
* Added BuyItem and CSGameRules::Think
* AddAmmoNameToAmmoRegistry refactory
* Bump minor version in an API bump up to 23
2023-09-05 10:43:40 +07:00
s1lentq
f3723d7a04 Add reserve members for CCS Entity
Bump interface version up to CSENTITY_API_INTERFACE_VERSION003
2023-08-24 17:09:50 +07:00
s1lentq
02bb06a6ef Fixed bug when restarting a button using multisource (Do not use multisource when restarting a button) 2023-08-23 23:14:31 +07:00
Francisco Muñoz
53d26a7ea5
API: CSPlayerWeapon integration + new members and functions (#850)
- Member name changed to m_iStateSecondaryAttack
- Member type changed to uint8_t which has same size of bool but allows more values than true or false (this wont break API compatibility)
- Moved logic inside HasSecondaryAttack to correctly alter function return based on m_iStateSecondaryAttack, which can be (0) no value / null (1) set (2) block
-Removed logic in CBasePlayerWeapon::Spawn that caches the return value of HasSecondaryAttack, as this can only be overridden when set, rather than always
* Improve API compatibility
2023-08-23 21:27:35 +07:00
Sergey Shorokhov
942776783b
mp_fadetoblack 2 fade timings now depends from mp_dying_time CVar and code fixes (#845)
Fix forcing 1-person view for players when `mp_fadetoblack = 2`;
 Fix player blackout on server entry when `mp_fadetoblack = 2`;
 Fix observer not being blinded when `mp_fadetoblack = 2`;
 Fix fadetoblack message timings using new CVar `mp_dying_time`.

fix #501
fix #506

Co-authored-by: s1lentq <s1lentsk@yandex.ru>
2023-07-16 15:55:58 +03:00
s1lentq
c526fa5885 Enable location feature if bots allowed or listen server is running 2023-07-16 04:17:14 +07:00
s1lentq
ad13545dac TutorMessageEvent::GetNextParameter: Fixed corrupted stack 2023-07-16 04:13:08 +07:00
Adrian Cirstea
718f0330f1
API: Implement PM_LadderMove hook (#740)
Related to https://github.com/s1lentq/reapi/issues/82
2023-07-16 03:48:44 +07:00
Francisco Muñoz
8a8f348755
Adjust gib's velocity limit according to sv_maxvelocity (#846)
* Adjust gib's velocity limit according to sv_maxvelocity
* Gib max velocity adjusted to sv_maxvelocity
2023-07-15 04:34:54 +07:00
Francisco Muñoz
11d6b086b4
Shield constants code cleaning (#843)
* Change constant name (SHIELDREN -> SHIELDGREN)

* Correct and separate constant names
2023-07-13 01:29:56 +03:00
Sergey Shorokhov
8a18969be1
New CVar: mp_dying_time (#483)
* Add new CVar: mp_dying_time < 0 .. 999>

* Add description

* magic numbers to named const

* magic numbers to named const (№2)

* cvar value handling

* update description

* a better description

* resolve conflicts

* lil order fixes & indent

* remove death animation skip

* DYING_TIME -> DEATH_ANIMATION_TIME

* Fix death animation when mp_dying_time < 3.0 depending on animation

* change desc

* change cvar desc

---------

Co-authored-by: dystopm <fjmunozpena@gmail.com>
2023-07-12 20:43:37 +03:00
Hamdi
e1d1c11992
add FTRACE_KNIFE flag (#817)
* trace flags

* remove unused flags

* add FTRACE_KNIFE flag
2023-07-11 05:57:50 +03:00
Sergey Shorokhov
6da11fa4dd
fix: bot_profile_db CVar use (#827) 2023-07-11 03:09:11 +03:00
Francisco Muñoz
6375ea5504
Little code cleaning: g_vecAttackDir (#831)
* Tiny code cleaning

* Skip REGAMEDLL_FIXES

* UTIL_BloodDrips: remove useless `direction` param

* Fix test demo (RANDOM_FLOAT inside UTIL_RandomBloodVector should be called for testdemo)

---------

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
Co-authored-by: s1lentq <s1lentsk@yandex.ru>
2023-07-11 03:01:53 +03:00
Francisco Muñoz
a5f288fbd6
Fix Glock and Famas undesired ammo decreasing on burst mode (#832) 2023-07-10 16:36:58 +03:00
Francisco Muñoz
8ddda261fe
New CVars: mp_weapondrop and mp_ammodrop and fixes (#840)
* First implementation

* Update player.cpp

* Apply suggestions from code review

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>

* Improve readability

* Improve readability x2

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>

* Tabulation tip

* Compile error resolved

* Add mp_weapondrop 3: drop all weapons

---------

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
2023-07-10 15:45:24 +03:00
Francisco Muñoz
d4deabfe59
CZero: Fix broken Career Tasks (#836)
* Fix HandleEnemyKill params and Hostage target detection

* Var name mistake

* Grouping more code on FIXES macro
2023-07-10 15:44:31 +03:00
Francisco Muñoz
12560c2b87
Make Knife back stab multiplier customizable (#834)
- Add Backstab multiplier CKnife member with default value
- Adding REGAMEDLL_API macros correctly to extended members of CKnife
- Added inline functions for specific values, considering original and new behaviour
2023-07-01 09:52:11 +07:00
Francisco Muñoz
e08cf1e72a
Disable BotPrecache whether game is CS 1.6 (#839) 2023-07-01 09:48:33 +07:00
s1lentq
94bf705196 RemovePlayerItemEx: Do not remove the grenade weapons until it runs out of ammo 2023-04-27 17:24:29 +07:00
s1lentq
4b4cd88feb RemovePlayerItemEx: Reduce ammo supply for grenades and c4 2023-04-27 01:01:46 +07:00
Sergey Shorokhov
e090a52846
Add Visual Studio 2022 (17.0) Platform Toolset (#820)
* Add Visual Studio 2022 (17.0) Platform Toolset
2023-04-03 22:16:36 +03:00
Vaqtincha
2f88574a94
Weaponbox ammopack hardcode (#533) 2023-04-01 01:09:41 +07:00
Vaqtincha
c756bf89d1
* fix bug when picking weaponbox grenades with ammo > 1 (#669)
* fix bug pickup sound (if the player has ammo > 0)
2023-04-01 01:03:03 +07:00
Unreal Karaulov
4a7a63533c
Missing friendlyfire after previous commit (#805)
* Missing friendlyfire after previous  commit
Fixes https://github.com/s1lentq/ReGameDLL_CS/pull/798 issue.
2023-04-01 00:57:16 +07:00
Hamdi
dce06e91c2
Add new trace flags (#813) 2023-04-01 00:53:43 +07:00
deprale
d2ea0d342f
fix incorrect player 3rd cam animations on death while frozen. (#815) 2023-04-01 00:53:04 +07:00
fl0werD
eb91f9280d
Add FreeGameRules hook, util api functions, player api functions (#808) 2023-03-13 02:33:15 +07:00
Sergey Shorokhov
8ff30b4c3e Revert "New entity trigger_bomb_reset (#796)"
This reverts commit 5dec3bad32.
2023-03-11 11:23:30 +03:00
Sergey Shorokhov
889edc81bf
CI: Keep the ICC build for releases only (#800) 2022-12-18 00:28:36 +03:00
Sergey Shorokhov
5dec3bad32
New entity trigger_bomb_reset (#796)
* Init

* Implementation

* Add `trigger_bomb_reset` to `.fgd`

* Set CC4 position on CC4::AttachToPlayer()

* move to `addons/trigger_bomb_reset`

* rename method & member

* CTriggerBombReset: Add `SetUse()`
2022-12-18 00:17:02 +03:00
RauliTop
7caf748a61
Fix: 'fast fire glitch' at AUG/SG552 (#734)
* Fix 'fast fire glitch' at AUG/SG552

Bug is caused because of not checking his FOV in some conditions.

* refactoring

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
2022-12-17 23:49:05 +03:00
Federico Matías
1c68cb0c98
FIX: Unexpected behavior with mp_forcerespawn (#653)
* Unexpected behavior with mp_forcerespawn leading to a possible exploit

Basically there is an exploit (or bug?) where depending on mp_forcerespawn if his value is higher to 0 and lower than 1, when you respawn you have a brief window to change your team, if you succesfully manage to change your team between the mp_forcerespawn value and WITHOUT closing the change appearance menu, you won't die due to "m_fNextSuicideTime", that will trigger the change team but without actually changing your skin model, you will keep the enemy one but the team change will success.

Thanks https://github.com/metita for helping me with this

Co-Authored-By: metita <33007491+metita@users.noreply.github.com>

* Revert "Unexpected behavior with mp_forcerespawn leading to a possible exploit"

This reverts commit 73d1c16706.

* fix: nullify `m_fNextSuicideTime` before call `ClientKill()`

* ClientKill: refactoring

* add forgotten if-statement

* remove macros

Co-authored-by: metita <33007491+metita@users.noreply.github.com>
Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
2022-12-17 19:45:04 +03:00
Adrian Cirstea
15e7d4a11e
Implement game_round_start & game_entity_restart triggers (#754)
* Added `game_entity_restart` for entities and `game_round_start` for round start

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
2022-12-16 13:10:01 +03:00
RauliTop
9a001cabd1
Fix TimeBasedDamage Paralyze decl typo (#748)
[skip ci]
2022-12-16 12:13:42 +03:00
Sergey Shorokhov
f3fb30fd9d
CI: ubuntu-latest -> ubuntu-20.04 (#799) 2022-12-15 16:35:36 +03:00
Sergey Shorokhov
ab2bfd4b9d
little code fixes (#798)
* weapons.cpp fix compile warning

`warning C4715: 'GetBaseAccuracy': not all control paths return a value`

* vihicle.cpp: use PlayerRelationship()

thanks to cf8deb9cac (r92242848)

Co-authored-by: Vaqtincha <51029683+Vaqtincha@users.noreply.github.com>
2022-12-15 16:06:08 +03:00
Vaqtincha
980162774a
fix: Reset immunity effects always (#788)
* Reset immunity effects always

* add new member m_bSpawnProtectionEffects
2022-12-15 16:04:34 +03:00
Unreal Karaulov
cf8deb9cac
Update func_vehicle for multiplayer (#792)
* Update func_vehicle for multiplayer. Added mp_legacy_vehicle_block cvar.

* Update dist/game.cfg

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>

* Update regamedll/dlls/game.cpp

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>

* Fix default behavior

* Optimization

Thanks to https://github.com/s1lentq/ReGameDLL_CS/pull/737#issuecomment-1068038171 help!

* Update README.md

Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
2022-12-07 02:11:25 +07:00
Sergey Shorokhov
86e7215bfd
Update CI dependencies (#787)
Co-authored-by: Sergey Shorokhov <sergeyshorokhov@csgo.com>
2022-12-05 19:53:50 +07:00
s1lentq
dae415df66 Disable CHalfLifeMultiplay::Think in training to avoid changing level when time limit has been met and other multiplayer features 2022-12-05 19:52:13 +07:00
s1lentq
2d44adae43 Call OnCreate after full creation 2022-11-28 18:23:02 +07:00
fl0werD
84f1f5e4c6
New CVar: mp_hostages_rescued_ratio (#786)
* Add mp_hostages_rescued_ratio cvar

* Add restriction of the CVar value

Co-authored-by: Sergey Shorokhov <sergeyshorokhov@csgo.com>
2022-11-24 20:16:37 +03:00
Vaqtincha
946b5a9db0
Correcting code style and config (#783)
* cosmetic changes (for perfectionists)

* cosmetic changes (in sdk)

* add quotes for all cvar values
2022-11-24 19:04:42 +03:00
Sergey Shorokhov
d8702df548 fix for previous commit 2022-10-08 20:35:12 +03:00
666JuL
83151aaf0b
New CVar: mp_give_c4_frags (#776)
Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
2022-10-08 20:32:30 +03:00
Adrian Cirstea
98b387bb68
Add an argument to swapteams command (#739)
* Added an argument to `swapteams` command

* Updated `README.md` `swapteams` description

* Fixed check arguments count

* better arg usage

* better notations for readme

* better desc

Co-authored-by: Sergey Shorokhov <sergeyshorokhov@csgo.com>
2022-09-15 19:52:54 +03:00
Sergey Shorokhov
e83eeaed39
fix: update scoreboard attributes on defuser pickup (#770) 2022-09-15 16:45:32 +03:00
s1lentq
10813019c8 UTIL_ResetEntities: Crash fixed, sometimes returns NULL for 1 index 2022-06-14 19:31:34 +07:00