Skip to content

Godmode fix for DMG_CRUSH and point_hurt#1188

Merged
rtldg merged 3 commits intoshavitush:masterfrom
azalty:patch-1
Apr 29, 2023
Merged

Godmode fix for DMG_CRUSH and point_hurt#1188
rtldg merged 3 commits intoshavitush:masterfrom
azalty:patch-1

Conversation

@azalty
Copy link
Contributor

@azalty azalty commented Apr 25, 2023

Fixes DMG_CRUSH (by moving/falling objects for example (with cs_enable_player_physics_box 1))

Handles correctly damage dealt by point_hurt entities (see https://developer.valvesoftware.com/wiki/Point_hurt)

IMPORTANT: shavit_misc_godmode 1 will now block damage dealt by ALL entities that aren't players, instead of only 0 (world).
If you don't want to make it like that, please tell me.

-- Added shavit_misc_godmode 4 for that

@rtldg rtldg changed the title Godmod fix for DMG_CRUSH and point_hurt Godmode fix for DMG_CRUSH and point_hurt Apr 27, 2023
@rtldg
Copy link
Collaborator

rtldg commented Apr 27, 2023

Can you split these into two separate cvar values (4 & 5)?

@azalty
Copy link
Contributor Author

azalty commented Apr 27, 2023

For the world/fall damage also preventing damage from entities I understand, but what would be the other option?

@rtldg
Copy link
Collaborator

rtldg commented Apr 27, 2023

Oh yeah I guess the thing for case 2 doesn't really need to be split out.

@azalty
Copy link
Contributor Author

azalty commented Apr 27, 2023

This should do, I hope I didn't miss anything and didn't create any error.
Didn't try to compile the plugin.

…ed too since the convar has min/max limits
@rtldg rtldg merged commit ca60971 into shavitush:master Apr 29, 2023
@azalty
Copy link
Contributor Author

azalty commented Apr 29, 2023

Didn't know default had to be in last position. It's apparently not the case in other languages so I thought it would be the same here

ty for merging

@rtldg
Copy link
Collaborator

rtldg commented Apr 29, 2023

yeah it's a sourcepawn quirk that I forgot about too that thankfully the workflow threw an error for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants