Commit c62055b
Implement ice physics for BadGuy enemies (#3365)
* Implement ice physics for BadGuy enemies
Add ice slipping mechanics similar to player physics:
- Add ice state tracking (m_on_ice, m_ice_this_frame)
- Detect ice tiles in collision_tile()
- Apply reduced friction on ice surfaces
- Reset ice state each frame with proper management
Closes #733
* Implement proper ice physics for BadGuy enemies
Apply identical ice physics behavior to enemies as used by the player:
- BadGuys now use same ice friction multiplier (0.1f) as Tux
- WalkingBadguys apply ice acceleration reduction during direction changes
- Remove artificial velocity threshold that prevented natural ice sliding
- Enemies now exhibit realistic ice sliding and momentum like the player
This ensures consistent ice physics behavior across all game entities,
providing the expected slippery surface effects for enemy movement.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Fix French comments to English in badguy ice physics
---------
Co-authored-by: Claude <[email protected]>1 parent 89bf5c1 commit c62055b
3 files changed
+51
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
122 | 128 | | |
123 | 129 | | |
124 | 130 | | |
| 131 | + | |
| 132 | + | |
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
| |||
456 | 464 | | |
457 | 465 | | |
458 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
| |||
472 | 486 | | |
473 | 487 | | |
474 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
475 | 492 | | |
476 | 493 | | |
477 | 494 | | |
| |||
494 | 511 | | |
495 | 512 | | |
496 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
497 | 519 | | |
498 | 520 | | |
499 | 521 | | |
| |||
729 | 751 | | |
730 | 752 | | |
731 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
732 | 771 | | |
733 | 772 | | |
734 | 773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| |||
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
| 302 | + | |
| 303 | + | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
156 | | - | |
| 160 | + | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| |||
0 commit comments