Skip to content

Commit

Permalink
Fix launch_towards ordering for facehuggers (#3826)
Browse files Browse the repository at this point in the history
# About the pull request

This PR simply fixes the order of logic that is altering facehuggers so
the launch_towards icon change occurs before launch_impact.

# Explain why it's good for the game

Fixes situations like
https://media.discordapp.net/attachments/1069150999517868066/1126358950707728384/gank_chamber.mp4

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Example of two huggers:

![leap](https://github.com/cmss13-devs/cmss13/assets/76988376/86767e97-334f-4b52-b95d-2b5747fe7bd6)

Order of events for three huggers:

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/17cefebc-80e8-4a52-b606-3090e2fa3e57)

</details>


# Changelog
:cl: Drathek
fix: Fixed facehuggers incorrectly displaying thrown state when it has
landed
/:cl:
  • Loading branch information
Drulikar committed Jul 7, 2023
1 parent 4133e4c commit 564e60a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/Facehuggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@
return FALSE

/obj/item/clothing/mask/facehugger/launch_towards(datum/launch_metadata/LM)
..()
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]_thrown"
..()

/obj/item/clothing/mask/facehugger/launch_impact(atom/hit_atom)
. = ..()
Expand Down Expand Up @@ -240,8 +240,8 @@
if(!target)
return FALSE

target.visible_message(SPAN_WARNING("\The scuttling [src] leaps at [target]!"), \
SPAN_WARNING("The scuttling [src] leaps at [target]!"))
target.visible_message(SPAN_WARNING("[src] leaps at [target]!"), \
SPAN_WARNING("[src] leaps at [target]!"))
leaping = TRUE
throw_atom(target, 3, SPEED_FAST)
return TRUE
Expand Down

0 comments on commit 564e60a

Please sign in to comment.