Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
f5509d1e
Commit
f5509d1e
authored
May 09, 2022
by
hatsune-miku
Committed by
Melledy
May 09, 2022
Browse files
Disable falling damage for godmode
parent
c2230485
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/recv/HandlerCombatInvocationsNotify.java
View file @
f5509d1e
...
...
@@ -102,6 +102,10 @@ public class HandlerCombatInvocationsNotify extends PacketHandler {
if
(
cachedLandingSpeed
<
-
28
)
{
damageFactor
=
1
f
;
}
// Disable falling damage for players in god mode.
if
(
session
.
getPlayer
()
!=
null
&&
session
.
getPlayer
().
inGodmode
())
{
damageFactor
=
0
;
}
float
damage
=
maxHP
*
damageFactor
;
float
newHP
=
currentHP
-
damage
;
if
(
newHP
<
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment