-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for thrown items dealing damage twice to first target #30115
Fix for thrown items dealing damage twice to first target #30115
Conversation
Yes, I've tested throwing items at walls to make sure they don't do anything weird. Everything behaves normally. Nothing is doing anything weird. I've thrown every single item I can find. You can still throw items into trash cans, things still bounce off walls, throwing things in no grav is still fine, etc etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (TerminatingOrDeleted(args.Target))
return;
as a wise man once said in another throwing-related PR: i trust you with my life. |
<!-- ЭТО ШАБЛОН ВАШЕГО PULL REQUEST. Текст между стрелками - это комментарии - они не будут видны в PR. --> ## Описание PR <!-- Ниже опишите ваш Pull Request. Что он изменяет? На что еще это может повлиять? Постарайтесь описать все внесённые вами изменения! --> ## Changelog.yml <details><summary>Лист чейнжлогов, смотреть подробнее..</summary> ```yml - author: SlamBamActionman changes: - message: RGBee and Rainbow Carp plushies now cycle color when held/worn. type: Fix id: 6917 time: '2024-07-14T10:26:34.0000000+00:00' url: space-wizards/space-station-14#30023 - author: Winkarst-cpu changes: - message: Now grappling gun is clumsy proof. type: Tweak id: 6918 time: '2024-07-14T10:26:56.0000000+00:00' url: space-wizards/space-station-14#29904 - author: HahayesSiH changes: - message: It is now possible to pet cyborgs. type: Add - message: Clicking on cyborgs and opening the strip menu no longer unlocks them. type: Tweak id: 6919 time: '2024-07-14T14:09:41.0000000+00:00' url: space-wizards/space-station-14#30037 - author: deltanedas changes: - message: Fixed ninja shoes not working as magboots. type: Fix id: 6920 time: '2024-07-14T15:11:40.0000000+00:00' url: space-wizards/space-station-14#28586 - author: lzk228 changes: - message: Scarves are eatable again. type: Fix id: 6921 time: '2024-07-14T15:12:25.0000000+00:00' url: space-wizards/space-station-14#29959 - author: Winkarst-cpu changes: - message: Now addgamerule command processes only valid game rules. type: Fix id: 6922 time: '2024-07-15T19:18:33.0000000+00:00' url: space-wizards/space-station-14#29912 - author: Jezithyr changes: - message: Removed the Geras ability from Slimes type: Remove id: 6923 time: '2024-07-16T22:50:17.0000000+00:00' url: space-wizards/space-station-14#29731 - author: K-Dynamic changes: - message: nerfed paraylze timer of all slippable objects (including soaps, water puddles, and clown-related items) type: Tweak id: 6924 time: '2024-07-16T23:26:02.0000000+00:00' url: space-wizards/space-station-14#27879 - author: EmoGarbage404 changes: - message: Resprited wall signs. type: Tweak id: 6925 time: '2024-07-17T04:35:19.0000000+00:00' url: space-wizards/space-station-14#29806 - author: lzk228 changes: - message: Added health examine for caustic and cold damage. type: Add id: 6926 time: '2024-07-17T06:19:13.0000000+00:00' url: space-wizards/space-station-14#29989 - author: lzk228 changes: - message: Surgery saws now are normal-sized (no more pocket circular saw). type: Tweak id: 6927 time: '2024-07-17T06:26:10.0000000+00:00' url: space-wizards/space-station-14#29995 - author: Winkarst-cpu changes: - message: The super door remote is now able to control Syndicate doors. type: Fix id: 6928 time: '2024-07-17T13:50:25.0000000+00:00' url: space-wizards/space-station-14#30033 - author: Errant changes: - message: Vox are temporarily removed from Space Ninjas and all Unknown Shuttle ghostroles, until code supports giving them species-specific gear. type: Tweak id: 6929 time: '2024-07-17T22:04:51.0000000+00:00' url: space-wizards/space-station-14#30099 - author: Cojoke-dot changes: - message: You can no longer teleport objects that should not be in other objects into other objects with the Quantum Spin Inverter type: Fix id: 6930 time: '2024-07-18T00:40:54.0000000+00:00' url: space-wizards/space-station-14#29200 - author: Plykiya changes: - message: Stun batons no longer use up charges when hitting objects without stamina. type: Fix id: 6931 time: '2024-07-18T00:48:09.0000000+00:00' url: space-wizards/space-station-14#30136 - author: Sh18RW changes: - message: Moth can't eat boots with an item more type: Fix id: 6932 time: '2024-07-18T22:34:18.0000000+00:00' url: space-wizards/space-station-14#30019 - author: portfiend changes: - message: Reptilians display correct mask sprites in character customization screen. type: Fix id: 6933 time: '2024-07-18T22:36:53.0000000+00:00' url: space-wizards/space-station-14#30095 - author: Plykiya changes: - message: You no longer deal double damage to your first target when throwing an item. type: Fix id: 6934 time: '2024-07-19T01:08:52.0000000+00:00' url: space-wizards/space-station-14#30115 - author: deepdarkdepths changes: - message: Removed the description about geras in the Slime guidebook section. type: Remove id: 6935 time: '2024-07-19T09:04:43.0000000+00:00' url: space-wizards/space-station-14#30140 - author: Blackern5000 changes: - message: Nuclear operatives are now able to purchase durable armor which is NOT space-proof. type: Add id: 6936 time: '2024-07-19T09:38:26.0000000+00:00' url: space-wizards/space-station-14#29845 - author: Plykiya, slarticodefast changes: - message: Explosive pens now correctly embed into their target. type: Fix id: 6937 time: '2024-07-19T09:42:58.0000000+00:00' url: space-wizards/space-station-14#30112 - author: ThatOneEnby1337 changes: - message: News Reporters are now able to use markup tags in their reports without bricking the PDAs of readers type: Fix id: 6938 time: '2024-07-19T14:18:39.0000000+00:00' url: space-wizards/space-station-14#30169 - author: themias changes: - message: Mailing units are functional again type: Fix id: 6939 time: '2024-07-20T02:31:26.0000000+00:00' url: space-wizards/space-station-14#30174 - author: Ghagliiarghii changes: - message: Nuclear Operatives' Reinforcements now have a PDA! type: Tweak id: 6940 time: '2024-07-20T02:59:31.0000000+00:00' url: space-wizards/space-station-14#28088 - author: Plykiya changes: - message: Chameleon scarves now work again. type: Fix id: 6941 time: '2024-07-20T03:00:28.0000000+00:00' url: space-wizards/space-station-14#30156 - author: Aidenkrz changes: - message: The mass hallucinations event no longer affects non-humanoids. type: Fix id: 6942 time: '2024-07-20T05:53:58.0000000+00:00' url: space-wizards/space-station-14#28748 - author: buntobaggins changes: - message: Increased light radius on the Spationaut Hardsuit type: Tweak id: 6943 time: '2024-07-21T03:29:21.0000000+00:00' url: space-wizards/space-station-14#30049 - author: EmoGarbage404 changes: - message: Fixed wires not updating UI on the Particle Accelerator. type: Fix id: 6944 time: '2024-07-21T05:27:18.0000000+00:00' url: space-wizards/space-station-14#28750 - author: CroilBird changes: - message: 6-pack of cola displays correctly when not being handled type: Fix id: 6945 time: '2024-07-21T05:49:48.0000000+00:00' url: space-wizards/space-station-14#29309 - author: metalgearsloth changes: - message: Fix muzzle flashes not tracking properly. type: Fix id: 6946 time: '2024-07-21T06:09:17.0000000+00:00' url: space-wizards/space-station-14#30163 - author: metalgearsloth changes: - message: Fix being able to throw items while your cursor is off-screen. type: Fix id: 6947 time: '2024-07-21T06:13:28.0000000+00:00' url: space-wizards/space-station-14#30164 - author: metalgearsloth changes: - message: Reset the scroll bar in the ghost warp menu whenever you search for a role. Previously it remained at your previous position and you would have to scroll up to see the first entry. type: Tweak id: 6948 time: '2024-07-21T06:38:45.0000000+00:00' url: space-wizards/space-station-14#30159 - author: Blackern5000 changes: - message: The syndicate agent's cyborg weapons module now uses syndicate weaponry rather than NT weaponry. type: Tweak id: 6949 time: '2024-07-21T07:04:33.0000000+00:00' url: space-wizards/space-station-14#26947 - author: Winkarst-cpu changes: - message: Added ambience to the camera routers and telecommunication servers. type: Add - message: Now server's and router's ambience stops once they are unpowered. type: Fix id: 6950 time: '2024-07-21T07:22:02.0000000+00:00' url: space-wizards/space-station-14#30091 - author: Scott Dimeling changes: - message: Reduced the number of botanists in some stations, for optimal _workflow_ type: Tweak id: 6951 time: '2024-07-21T07:23:28.0000000+00:00' url: space-wizards/space-station-14#29581 - author: metalgearsloth changes: - message: Escape pods won't show up on shuttle map anymore. type: Tweak id: 6952 time: '2024-07-21T07:23:44.0000000+00:00' url: space-wizards/space-station-14#29758 - author: IProduceWidgets changes: - message: an arabian lamp! type: Add id: 6953 time: '2024-07-21T07:24:28.0000000+00:00' url: space-wizards/space-station-14#27270 - author: osjarw changes: - message: NPCs no longer get stuck trying to pick up anchored pipes. type: Fix id: 6954 time: '2024-07-21T07:28:37.0000000+00:00' url: space-wizards/space-station-14#30061 - author: The Hands Leader - JoJo cat changes: - message: Train map is back into rotation type: Tweak id: 6955 time: '2024-07-21T07:44:18.0000000+00:00' url: space-wizards/space-station-14#30145 ``` </details> **Медиа** <!-- Если приемлемо, добавьте скриншоты для демонстрации вашего PR. Если ваш PR представляет собой визуальное изменение, добавьте скриншоты, иначе он может быть закрыт. --> **Проверки** <!-- Выполнение всех следующих действий, если это приемлемо для вида изменений сильно ускорит разбор вашего PR --> - [ ] PR полностью завершён и мне не нужна помощь чтобы его закончить. - [ ] Я внимательно просмотрел все свои изменения и багов в них не нашёл. - [ ] Я запускал локальный сервер со своими изменениями и всё протестировал. - [ ] Я добавил скриншот/видео демонстрации PR в игре, **или** этот PR этого не требует. **Изменения** :cl: Шрёдька - tweak: Подтянуты коммиты с корвакса, 27.07.24
…rds#30115) * FUCK YOU * fine --------- Co-authored-by: plykiya <plykiya@protonmail.com>
About the PR
All I did was delete a function call
Why / Balance
Fixes #26022
Technical details
#18574 called LandComponent() in DamageOtherOnHitSystem as soon as it hits literally anything and regenerated contacts to stop items phasing through walls. Any subsequent hit on other entities will also trigger LandComponent() but because it's already "Landed" from the first call, it doesn't do anything. LandComponent() only triggers on the first hit, regenerates the contacts, and hits the first target twice. Additionally, it doesn't even "land" the item, that's calculated elsewhere.
#18576 fixed what the previous PR was intending to do but did not remove the behavior where it calls LandComponent() on hit because it is seemingly necessary for reasons related to I don't really know. Items no longer phase through walls as a result of this PR, regardless of LandComponent() being called.
#20700 later on made it so that it calls LandComponent() in ThrownItemSystem when the time is appropriate in the lifecycle of the throw and not on the first hit. So LandComponent() is successfully being called when flyTime for the item is less than the currentTime in the game.
In summary, we have no need for that LandComponent() in DamageOtherOnHitSystem anymore so we can just delete it. The only thing it accomplished was duplicating damage on the first hit of an entity.
Media
FOR DEMONSTRATION PURPOSES I'M USING A PIERCING SPEAR
Before:
2024-07-16.20-22-49.mp4
After:
2024-07-16.20-20-55.mp4
Breaking changes
nothing
Changelog
🆑