Starwaster / DeadlyReentry

Heat and force damage for KSP
Other
31 stars 19 forks source link

Remove casts to (base C#) object #55

Closed NathanKell closed 3 years ago

NathanKell commented 3 years ago

This is either unneeded (when the type in question is not a Unity type anyway, so this is just an extra cast to no purpose), or is dangerous (it is a Unity type with nullchecking overridden, and Deadly Reentry is in the habit of being active when things explode, which means things are liable to be destroyed by Unity due to Explosions).

Starwaster commented 3 years ago

Still not convinced of the necessity for this but I'll merge it.

Have to do it manually though because it can't be done automatically anymore. Probably because of my own recent edits. I'll have it done today.

NathanKell commented 3 years ago

Ah, yeah, it touched a bunch so I'm not surprised it was brittle wrt merge conflicts. Sorry about that, wasn't sure of a way around it other than a bunch of minor PRs for it. Cheers!