COB: Create() executed more than once

COB: Create() executed more than once

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

COB: Create() executed more than once

Post by rattle »

Code: Select all

cob->Call(COBFN_Create);
found in Unit.cpp:2248 and UnitLoader.cpp:327. One of them needs to go.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

No need, they are (or should be) mutually
exclusive (the one in CUnit::PostLoad() only
gets called when loading a saved game, and
the other only when a unit is built).
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Yeah tobi already told me... still, in local tests Create() is being called twice for the commander unit.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

The Commanders testscript always spawns two
commanders, are you sure it's being called twice
for each?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Me being dumb... thought get PRINT was local to the team the player was on. Nothing's wrong at all, sorry for wasting your time. :(
Post Reply

Return to “Engine”