Original War Support Bug Tracker
star_faded.png
Please log in to bookmark issues
feature_request_small.png
CLOSED  Feature request #130  -  When creating new Unit re-use old slots
Posted Aug 02, 2015 - updated Nov 09, 2015
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Done" and resolution "RESOLVED".
Issue details
  • Type of issue
    Feature request
  • Status
     
    Done
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Stucuk
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Time spent
    No time spent
  • Category
    Not determined
  • Resolution
    RESOLVED
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
Issue description
When creating new units use slots which are no longer being used (Unit died).

#1
Comment posted by
 McBenn
Aug 03, 15:22
Couldn't this cause some funny bugs? Let's say I have a variable pointing to unit 45 and if that unit is dead my code should act differently that if it is alive. Then the unit dies and some time later another unit takes up it's slot (45) effectively "resurrecting" my unit.
#2
Comment posted by
 Stucuk
icon_reply.pngAug 03, 19:17, in reply to comment #1
Currently the game crashes when you go over the unit limit. So it can't be worse than that.

McBenn wrote:
Couldn't this cause some funny bugs? Let's say I have a variable pointing
to unit 45 and if that unit is dead my code should act differently that if
it is alive. Then the unit dies and some time later another unit takes up
it's slot (45) effectively "resurrecting" my unit.


#3
Comment posted by
 Gravitr
Aug 04, 08:37
Yes, if it would work only from very high units on map (very close to 2000), nothing should be broken.
#4
Comment posted by
 McBenn
Aug 05, 15:12
Why is there a limit on the number of slots in the first place (other than MAXINT or some equivalent)?
#5
Comment posted by
 Stucuk
icon_reply.pngOct 28, 18:00, in reply to comment #4
Because the game was released in 2001 when you had to care about the amount of memory a PC had. PC's had like 64MB of memory if they were top of the line.
#6
Comment posted by
 Stucuk
Nov 07, 06:07
Implemented in versions after 2.0.3.4 . Note: Will not work with Multiplayer.

The issue was updated with the following change(s):
  • This issue has been closed
  • The status has been updated, from New to Done.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.
#7
Comment posted by
 CornyjK
icon_reply.pngNov 08, 19:46, in reply to comment #1


McBenn wrote:
Couldn't this cause some funny bugs? Let's say I have a variable pointing
to unit 45 and if that unit is dead my code should act differently that if
it is alive. Then the unit dies and some time later another unit takes up
it's slot (45) effectively "resurrecting" my unit.
You can make something like OnDie(45) reset this variable
#8
Comment posted by
 Stucuk
icon_reply.pngNov 09, 04:23, in reply to comment #7
There is already an event for when units are destroyed. But it would only matter if your map could create more than 2000 units (Where some die).