mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 17:13:46 +01:00
Throwing fix (#24087)
* non gravity movement, flat second immobilized removed
* let it be
* naming
* Update code/controllers/subsystem/SSthrowing.dm
* Update code/controllers/subsystem/SSthrowing.dm
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
* Revert "Update code/controllers/subsystem/SSthrowing.dm"
This reverts commit 20ef2af351.
* comment update
---------
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -71,6 +71,8 @@ SUBSYSTEM_DEF(throwing)
|
||||
///When this variable is false, non dense mobs will be hit by a thrown item. useful for things that you dont want to be cheesed by crawling, EG. gravitational anomalies
|
||||
var/dodgeable = TRUE
|
||||
/// Can a thrown mob move themselves to stop the throw?
|
||||
var/should_block_movement = TRUE
|
||||
/// Will thrownthing datum actually block movement? this might be FALSE with some circumstances even if var/should_block_movement is TRUE. This variable change automatically during the throw
|
||||
var/block_movement = TRUE
|
||||
|
||||
/datum/thrownthing/proc/tick()
|
||||
@@ -94,7 +96,19 @@ SUBSYSTEM_DEF(throwing)
|
||||
//calculate how many tiles to move, making up for any missed ticks.
|
||||
var/tilestomove = CEILING(min(((((world.time + world.tick_lag) - start_time + delayed_time) * speed) - (dist_travelled ? dist_travelled : -1)), speed * MAX_TICKS_TO_MAKE_UP) * (world.tick_lag * SSthrowing.wait), 1)
|
||||
while(tilestomove-- > 0)
|
||||
if((dist_travelled >= maxrange || AM.loc == target_turf) && has_gravity(AM, AM.loc))
|
||||
var/gravity
|
||||
if(ismob(AM))
|
||||
var/mob/mob = AM
|
||||
gravity = mob.mob_has_gravity(mob.loc)
|
||||
else
|
||||
gravity = has_gravity(AM, AM.loc)
|
||||
|
||||
if(!gravity)
|
||||
block_movement = FALSE // you should be able to move if there is no gravity, supports jetpack movement during throw
|
||||
else
|
||||
block_movement = should_block_movement
|
||||
|
||||
if((dist_travelled >= maxrange || AM.loc == target_turf) && gravity)
|
||||
hitcheck() //Just to be sure
|
||||
finalize()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user