Closed kai-li-wop closed 1 year ago
the trace is never 1 - but 0.997
I did more tests and in some maps the icon disappears only at one station, in other maps it does not disappear at any of the stations.
the origin of the healthstations are sometimes slightly placed into the ground surface - we should apply an offset to the z axis about half the height of the model. Also it looks like the distance of 250 is not enough. You almost have to stand in the healthstation to disable it.
Hmm, it is the same distance like with the balloon boxes (where i took the code from) and it works very good with one of the health stations in PadGarden (next to the barbecue).
The balloon model does not seem to be affected by these problems. In PadCastle (content of the PadPack addon) there is definitely a balloon box that is below floor level (one or a few units, you can at least see the floor of the room inside the box) and the icon is still displayed. The origin of the balloon box model is definitely at the base of the model. What does the balloon box icon code do differently?
Should work for all health stations like expected. When the player is in close range, the icon should disappear.
Just tried it, works flawlessly!
On all health stations the icon will disappear proper when getting close to it.
The icon should not be drawn if the health station is very close and visible to the player. I tried to implement this with 96e4081, which uses existing code from the balloon boxes. The code works so far, but only for one of all health stations in a map. I can't figure out why, since all stations should be passed through due to the loop that calls
CG_DrawHealthstationIcon
.