Skip to content
  • ChatWithThisName's avatar
    Update MQ2Melee.cpp · 7c8b0bdc
    ChatWithThisName authored
    Change as per EQMule convo in discord. 
    
    
    Chatwiththisname - Today at 11:32 PM
    static inline PSPAWNINFO SpawnMe() {
        return GetCharInfo()->pSpawn;
    }
    I think that's the reference that @Kaen01 was looking for.
    eqmule - Today at 11:33 PM
    dont do that if getcharinfo is NULL u will crash
    
    Line 1449 to 1451 MQ2Melee.cpp
    how would you do it to avoid crash?
    
    
    eqmule - Today at 11:37 PM
    so:
    
    static inline PSPAWNINFO SpawnMe() {
       if(pCharSpawn) {
               return (PSPAWNINFO)pCharSpawn;
       }
       return NULL;
    }
    7c8b0bdc