Skip to content
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

prevent vehicle turrets from attacking their own car #6016

Merged
merged 2 commits into from Feb 8, 2014

Conversation

Projects
None yet
3 participants
@BevapDin
Copy link
Contributor

commented Feb 8, 2014

Vehicle turrets use a fake npc to fire their gun. This PR adds checks for that fake creature and the vehicle they are on. It prevents calling map::shoot if this would damage the very same vehicle.

This prevents certain code that damages the terrain/furniture from being executed, but the squares should not have any of theses terrain/furnitures, because driving the car onto that square should have already damaged the content.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2014

Uh, sorry, BevapDin. My armored car blew out its own headlight and steel plating shooting at soldier ants.

Screencap: https://www.dropbox.com/s/ifq0ub6tmp2v9yz/02072014TurretsStillSelfDamage.PNG
Save (immediately post-blowout): https://www.dropbox.com/s/wy0ke5sql98ydhb/Hustler.7z

@BevapDin

This comment has been minimized.

Copy link
Contributor Author

commented Feb 8, 2014

Fixed it, was checking for (tx,tx) not (tx,ty) and my test case contained tx == ty, so the bug did not appear to me.

@KA101 KA101 merged commit 47bf8f1 into CleverRaven:master Feb 8, 2014

1 check passed

default
Details
@KA101

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2014

Np. This'll make a lot of vehicle-users very happy. When GlyphGryph gets back, remind me to put you in for four-star.

@HunterAlpha1

This comment has been minimized.

Copy link

commented Feb 8, 2014

going to try it out now.

@BevapDin BevapDin deleted the BevapDin:targeting-turrets branch Feb 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.