View Issue Details

IDProjectCategoryView StatusLast Update
0004095Spring enginepublic2013-10-30 01:18
ReporterThe_Yak Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version94.1.1+git 
Summary0004095: Hovers take waterdamage when on top of water in latest builds
DescriptionHovers take waterdamage, tested and always reporduceable in 94.1.1-1414-gd4d1201 with Zero-K and BA Reloaded.
Steps To Reproduce(1)Load map with waterdamage like Violence 2 or Throne Acidic
(2)Maek hover
(3)Suicide
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2013-10-29 21:24

developer   ~0011895

It's known (https://github.com/spring/spring/blob/develop/rts/Sim/Units/Unit.cpp#L1087) but you must use a gadget to cancel out the damage. The other way around would be harder for game (and map) devs to handle if they did want hovercraft to be damaged and less efficient.

The_Yak

2013-10-29 23:22

reporter   ~0011899

Why can't it just be the way it was back in 94.1?

Kloot

2013-10-30 00:09

developer   ~0011901

Maybe if you ask that question in a less antagonistic way and open your mind to the possibility there might be a valid reason this changed I'll be bothered to answer. Otherwise you'll have to make do with "because".

The_Yak

2013-10-30 00:21

reporter   ~0011902

Last edited: 2013-10-30 00:31

I had no intention of being antagonistic. Hovers took no waterdamage in 94.1 and earlier versions and this seems reasonable. Hovercrafts float on top of water and it doesn't seem intuitive that they would take waterdamage. I don't understand how this is supposed to be more efficent and easier for mappers/devs and from the perspective of someone trying to make a lava map seems quite the opposite.

There is no need to be defensive. I simply want to know how to work around this and make Violence (and any other maps that may want playable lava) compatible with latest spring.

The lava gadget in the map includes a lavadeathcheck that kills underwater units but it doesn't work on all of them. Some things like tidals and shipyard and some ships can still be built. This is why I want to use waterdamage as it prevents this.

Kloot

2013-10-30 00:53

developer   ~0011904

Sorry, not in the mood for long explanations so here's a summary of why hovers are no longer exempt:

1) hovercraft don't actually float above water (from the engine's perspective, not talking about real life) but are *in* it

2) prior to 95.0 there was a hardcoded check in place (amounting to "is this unit a hovercraft?") which prevented them from taking damage, otherwise they would have been treated like any other type of unit

3) because of 2), if a game actually *wanted* hovercraft to take damage, it would need to constantly track their positions (inefficient and cumbersome) and implement custom logic to do this, whereas blocking the application of water damage to specific unit types requires only a tiny, fast snippet of Lua

If you really need help writing such a gadget I can pastebin an example, but it ain't rocket science.

The_Yak

2013-10-30 00:58

reporter   ~0011905

Last edited: 2013-10-30 00:58

Knowing that I can block waterdamage to unit types is enough, but if you could share an example whenever convienient that would be helpful :)

I am still learning lua

Kloot

2013-10-30 01:17

developer   ~0011906

Last edited: 2013-10-30 01:18

hf: http://pastebin.com/au6sKX2k

Issue History

Date Modified Username Field Change
2013-10-29 21:10 The_Yak New Issue
2013-10-29 21:24 Kloot Note Added: 0011895
2013-10-29 21:24 Kloot Status new => closed
2013-10-29 21:24 Kloot Assigned To => Kloot
2013-10-29 21:24 Kloot Resolution open => won't fix
2013-10-29 23:22 The_Yak Note Added: 0011899
2013-10-29 23:22 The_Yak Status closed => feedback
2013-10-29 23:22 The_Yak Resolution won't fix => reopened
2013-10-30 00:09 Kloot Note Added: 0011901
2013-10-30 00:09 Kloot Status feedback => closed
2013-10-30 00:09 Kloot Resolution reopened => won't fix
2013-10-30 00:21 The_Yak Note Added: 0011902
2013-10-30 00:21 The_Yak Status closed => feedback
2013-10-30 00:21 The_Yak Resolution won't fix => reopened
2013-10-30 00:24 The_Yak Note Edited: 0011902
2013-10-30 00:25 The_Yak Note Edited: 0011902
2013-10-30 00:31 The_Yak Note Edited: 0011902
2013-10-30 00:53 Kloot Note Added: 0011904
2013-10-30 00:54 Kloot Status feedback => closed
2013-10-30 00:54 Kloot Resolution reopened => won't fix
2013-10-30 00:58 The_Yak Note Added: 0011905
2013-10-30 00:58 The_Yak Status closed => feedback
2013-10-30 00:58 The_Yak Resolution won't fix => reopened
2013-10-30 00:58 The_Yak Note Edited: 0011905
2013-10-30 01:17 Kloot Note Added: 0011906
2013-10-30 01:18 Kloot Note Edited: 0011906
2013-10-30 01:18 Kloot Note Edited: 0011906
2013-10-30 01:18 Kloot Status feedback => closed
2013-10-30 01:18 Kloot Resolution reopened => no change required