printz Posted December 24, 2015 I've noticed that damage caused by a thing in a layer to a thing in another layer (across a linked portal) causes a damage thrust in the wrong direction. Here's a test map. It contains an archvile trapped in a square sector beyond a portal (it's trapped because of a monster-blocking linedef, not by the portal). It was modified not to produce fire. Just stand there waiting for the vile to hit you. Instead of being thrusted backwards, you'll be thrusted to your right. So I looked into P_DamageMobj (responsible for thrusting damaged targets), and I saw this snippet there: auto link = P_GetLinkOffset(inflictor->groupid, target->groupid); ang = P_PointToAngle(inflictor->x, inflictor->y, target->x + link->x, target->y + link->y); (full context Github section here) I highly suspect that link->x and link->y are added, when instead they should be subtracted from target, or conversely added to inflictor. Because of the wrong sign, the map editor offset between the two objects in different areas was exaggerated instead of being compensated. Do you think it's okay if I fix it this way? 0 Share this post Link to post
printz Posted December 24, 2015 Decided to fix and commit it anyway. Based on other examples, it was a wrong order of operands here. 0 Share this post Link to post