Finding entry points Branch analysis from position: 0 1 jumps found. (Code = 62) Position 1 = -2 filename: /in/HBcFj function name: (null) number of ops: 12 compiled vars: !0 = $message line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 2 0 E > ASSIGN !0, '%3Cp%3EThis+is+more+tricky+than+it+may+sound.%3C%2Fp%3E%0A%3Cp%3EThe+problem+is+that+when+a+unit+is+unspawned+it+is+immediately+deleted.+After+that+we+can%27t+report+any+events+about+the+unit+to+the+script+because+the+unit+no+longer+exists+and+we+don%27t+want+to+pass+references+to+dead+objects+to+the+script.%3C%2Fp%3E%0A%3Cp%3ESo+when+the+physics+system+some+time+after+the+unspawn+detects+that+the+object+has+left+the+trigger+we+have+no+way+of+notifying+the+script+about+that.%3C%2Fp%3E%0A%3Cp%3EThere+are+some+potential+ways+of+solving+this+problem%3A%3C%2Fp%3E%0A%3Cul%3E%0A%3Cli%3EWe+could+delay+deleting+the+unit+for+a+%22couple+of+frames%22+until+we+have+had+time+to+report+events+about+it+to+the+script.+However%2C+this+would+create+a+new+strange+state+for+units+to+be+in%2C+an+%3Cem%3E%28about-to-be-deleted%29%3C%2Fem%3E+state.+This+will+severely+increase+code+complexity+and+confusion+since+there+would+be+a+ton+of+places+where+you+would+have+to+check+if+you+were+dealing+with+a+%22real%22+unit+or+an+%22about-to-be-deleted%22+unit%2C+both+in+the+script+and+in+the+engine.+Horrible.%3C%2Fli%3E%0A%3Cli%3EWe+could+add+a+new+event+for+the+triggers+%3Cem%3EDestroyed%3C%2Fem%3E.+The+event+would+be+triggered+whenever+something+inside+the+trigger+was+destroyed.+The+event+would+not+pass+the+unit+%28because+the+unit+would+be+destroyed+by+the+time+it+was+triggered%29.+In+this+way%2C+you+could+react+to+the+%3Cem%3EDestroyed%3C%2Fem%3E+message+and+act+appropriately+%28e.g.%2C+scan+your+list+of+units+inside+the+trigger+for+any+deleted+units%29.+This+still+wouldn%27t+give+you+the+Enter%2FLeave+symmetry+that+you+perhaps+want...+instead+you+would+get+Enter%2FDestroy.+And+you+wouldn%27t+be+able+to+tell+which+unit+was+destroyed.%3C%2Fli%3E%0A%3Cli%3EWe+could+try+to+keep+track+of+which+units+are+inside+which+triggers+%28outside+the+physics+system%29%2C+so+that+when+you+called+%3Cem%3Eunspawn%28%29%3C%2Fem%3E+we+could+immediately+generate+%3Cem%3ELeave%3C%2Fem%3E+events+for+the+triggers%2C+before+destroying+the+unit.+This+would+give+you+a+%3Cem%3ELeave%3C%2Fem%3E+event+with+a+working+unit+variable.+However%2C+tracking+all+of+this+would+have+a+performance+cost.+Also%2C+we+still+wouldn%27t+have+a+perfectly+symmetric+solution%2C+because+this+%3Cem%3ELeave%3C%2Fem%3E+event+would+be+triggered+immediately+when+%3Cem%3Eunspawn%28%29%3C%2Fem%3E+was+called%2C+unlike+other+trigger+events+that+are+triggered+when+we+do+a+physics+update.%3C%2Fli%3E%0A%3C%2Ful%3E%0A%3Cp%3ENone+of+these+solutions+seem+really+good+to+me.+I%27m+not+so+found+of+implementing+a+bad+solution%2C+because+once+we+have+implemented+something+we+have+to+keep+supporting+it+or+break+backwards+compatibility%2C+which+means+that+if+we+pick+a+bad+solution+we+could+be+stuck+with+it+for+a+long+time.%3C%2Fp%3E' 12 1 INIT_FCALL 'preg_replace' 2 SEND_VAL '%2F%3C%5C%2Fp%3E%28%28.%7C%0A%29%2B%3F%29%28%3F%3D%3C%5C%2Fp%3E%29%2F' 3 SEND_VAL '%0A%241' 4 SEND_VAR !0 5 DO_ICALL $2 6 ASSIGN !0, $2 13 7 INIT_FCALL 'strip_tags' 8 SEND_VAR !0 9 DO_ICALL $4 10 ECHO $4 11 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0