| 12-24-2006, 04:56 AM | #1 |
kay, one day i was toying around with caster system, and changed the caster model to a sheep, when i tried the map, i found that all the function that dealing with collision missle, the caster dummy isn't cleaned up !! for example, the infernal spell, after shooting for a while, there is a BIG BUNCH of sheep stacked on each other, does not fade or whatever. This can also seen from an easier collison function i made in the caster sys map. (the succumbus blood star) uhmm maybe i was wrong in some place for chaging the caster model for no reason -.- but is those collision missle dummy really get cleaned up ? |
| 12-24-2006, 11:12 AM | #2 |
Why did you attach the map? If the collisionmissile is created with usenewcaster as false then it will use a caster from the caster pool and always recycle them. |
| 12-24-2006, 11:32 AM | #3 |
It seems that the issue is with GetACaster and RecicleCaster, the only way it could cause harm is with collisionmissiles, so temporarily always use UseNewCaster when creating the missile. |
| 12-24-2006, 11:38 AM | #4 |
Found the bug, I was forgetting to create the caster system group... Quick fix: replace InitCasterSystem with this: JASS:private function InitCasterSystem takes nothing returns nothing set udg_casters=CreateGroup() call CS_SafeXY_Init() call CreateCasters(cs_InitialCastersNumber) set udg_castervars[100]=-1 set udg_castervars[101]=-1 set udg_castervars[102]=-1 set udg_castervars[103]=-1 set udg_castervars[104]=-1 set cs_dmg_caster=CreateCaster(0.,0.,0.) call UnitRemoveAbility(cs_dmg_caster,'Aloc') //Otherwise the units would flee like crazy endfunction It was about time to get forced to update the caster system, will be cool to use structs for collisionmissiles |
