Skip to content

Commit

Permalink
EGO runtime fixes (#1970)
Browse files Browse the repository at this point in the history
fixes aspiration

Update code/modules/projectiles/projectile/ego_bullets/teth.dm

Co-authored-by: Gboster-0 <[email protected]>
  • Loading branch information
Coxswain-Navigator and Gboster-0 authored Feb 19, 2024
1 parent 1b7a417 commit e9fe9f2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions code/game/objects/items/ego_weapons/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,8 @@

/obj/item/ego_weapon/replica/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
SIGNAL_HANDLER
if(!isliving(target))
return TRUE
var/mob/living/T = target
var/range = (get_dist(firer, T) - 1)//it should never pull things into your tile.
var/throw_target = get_edge_target_turf(T, get_dir(T, get_step_towards(T, src)))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/ego_weapons/subtype/lance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
return
current_holder = user
RaiseLance(user)
RegisterSignal(current_holder, COMSIG_MOVABLE_BUMP, PROC_REF(UserBump))
RegisterSignal(current_holder, COMSIG_MOVABLE_BUMP, PROC_REF(UserBump), override = TRUE)
RegisterSignal(current_holder, COMSIG_MOVABLE_MOVED, PROC_REF(UserMoved))
if(!force_cap)
force_cap = (initial(force) * 2)
Expand Down
8 changes: 5 additions & 3 deletions code/modules/projectiles/projectile/ego_bullets/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@

/obj/projectile/ego_bullet/replica/on_hit(atom/target, blocked = FALSE)
. = ..()
var/mob/living/carbon/human/H = target
if(!isliving(target))
return
var/mob/living/T = target
var/mob/living/user = firer
if(user.faction_check_mob(H))//player faction
H.Knockdown(50)//trip the target
if(user.faction_check_mob(T))//player faction
T.Knockdown(50)//trip the target
return BULLET_ACT_BLOCK
qdel(src)

Expand Down
10 changes: 6 additions & 4 deletions code/modules/projectiles/projectile/ego_bullets/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@

/obj/projectile/ego_bullet/ego_aspiration/on_hit(atom/target, blocked = FALSE)
. = ..()
var/mob/living/carbon/human/H = target
if(!isliving(target))
return
var/mob/living/T = target
var/mob/living/user = firer
if(firer==target)
if(firer == target)
return BULLET_ACT_BLOCK
if(user.faction_check_mob(H)) // Our faction
H.adjustBruteLoss(-10)
if(user.faction_check_mob(T)) // Our faction
T.adjustBruteLoss(-10)
return BULLET_ACT_BLOCK

/obj/projectile/ego_bullet/ego_patriot
Expand Down

0 comments on commit e9fe9f2

Please sign in to comment.