DarKGunZ Anti-Lead

Results 1 to 20 of 20
  1. #1
    Proficient Member Mr_Troy is offline
    MemberRank
    Jun 2007 Join Date
    172Posts

    DarKGunZ Anti-Lead

    As DG is currently on the verge of closing (not saying it is, but it's definitely close), I do not want my work to go to waste, so I'm releasing the anti-lead system I've been constantly making optimizations to. I do not say it's perfect, but it does beat the public anti-leads out there. There's better ways to do it and this way is based on Jacob's approach.

    Okay let's get to business :

    MCommandSharedTable.h (no description needed)
    Code:
    #define MC_GUNZ_ANTILEAD                        50020
    MCommandSharedTable.cpp (no description needed)
    Code:
        C(MC_GUNZ_ANTILEAD, "Game.Lead", "Lead", MCDT_PEER2PEER)
            P(MPT_CHAR, "SelType");
            P(MPT_BLOB, "Blob");
    ZCharacter.h (public section of the ZCharacter class)
    Code:
        void OnDamaged_AntiLead(ZObject* pAttacker, rvector srcPos, char nSelType, char nPartsType, ZDAMAGETYPE damageType, MMatchWeaponType weaponType, float fDamage, float fPiercingRatio=1.f, int nMeleeType=-1);
        void OnDamaged_AntiLead(ZObject* pOwner, vector<ZAntiLeadTemporaryInfo*> vInfo, char nSelType);
    ZGame.h (before the ZGame class)
    Code:
    struct ZAntiLeadTemporaryInfo
    {
        unsigned long    m_nVictimLowID;
        char            m_nPartsType;
    };
    
    
    struct ZAntiLead_UIDListNode
    {
        unsigned long                    LowID;
        vector<ZAntiLeadTemporaryInfo*>    Info;
    };
    ZGame.h (replace the OnPeerShotgun_Damaged function prototype with this)
    Code:
        ZAntiLeadTemporaryInfo *OnPeerShotgun_Damaged(ZObject* pOwner, float fShotTime, const rvector& pos, rvector &dir, ZPICKINFO pickinfo, DWORD dwPickPassFlag, rvector& v1, rvector& v2, ZItem *pItem, rvector& BulletMarkNormal, bool& bBulletMark, ZTargetType& nTargetType, bool& bHitEnemy);
    ZGame.h (protected or private section of the ZGame class)
    Code:
        void OnPeerAntiLead( const MUID& uidSender, MMatchCharItemParts nSelType, void* ZAntiLeadTemporaryInfoBlob );
    ZCharacter.cpp (add the two ZCharacter::OnDamaged_AntiLead functions somewhere)
    Code:
    void ZCharacter::OnDamaged_AntiLead(ZObject* pAttacker, rvector srcPos, char nSelType, char nPartsType, ZDAMAGETYPE damageType, MMatchWeaponType weaponType, float fDamage, float fPiercingRatio, int nMeleeType)
    {
        if (pAttacker != NULL && fDamage > 0)
        {
            if (pAttacker == ZGetGame()->m_pMyCharacter && this != pAttacker && !ZGetGame()->m_pMyCharacter->IsDie())
            {
                void* pBlobArray = MMakeBlobArray(sizeof(ZAntiLeadTemporaryInfo), 1);
                void* pBlobElement = MGetBlobArrayElement(pBlobArray, 0);
    
    
                memcpy(pBlobElement, &nPartsType, sizeof(nPartsType));
    
    
                MCommand* pAntiLead = ZNewCmd(MC_GUNZ_ANTILEAD);
    
    
                pAntiLead->m_Receiver = GetUID();
                pAntiLead->AP(MCommandParameterChar(nSelType));
                pAntiLead->AP(MCommandParameterBlob(pBlobArray, MGetBlobArraySize(pBlobArray)));
    
    
                ZPostCommand(pAntiLead);
            }
        }
    }
    void ZCharacter::OnDamaged_AntiLead(ZObject* pOwner, vector<ZAntiLeadTemporaryInfo*> vInfo, char nSelType)
    {
        if (vInfo.size() > 0)
        {
            if (ZGetGameClient()->GetPlayerUID().Low != GetUID().Low && pOwner == ZGetGame()->m_pMyCharacter && pOwner != this && !ZGetGame()->m_pMyCharacter->IsDie())
            {
                int nCount = 0;
                void* pBlobArray = MMakeBlobArray(sizeof(ZAntiLeadTemporaryInfo), vInfo.size());
                for (vector<ZAntiLeadTemporaryInfo*>::iterator itor = vInfo.begin(); itor != vInfo.end(); ++itor)
                {
                    char nPartsType = (*itor)->m_nPartsType;
                    void* pBlobElement = MGetBlobArrayElement(pBlobArray, nCount);
                    memcpy(pBlobElement, &nPartsType, sizeof(nPartsType));
    
    
                    nCount++;
                }
    
    
                MCommand* pAntiLead = ZNewCmd(MC_GUNZ_ANTILEAD);
    
    
                pAntiLead->m_Receiver = GetUID();
                pAntiLead->AP(MCommandParameterChar(nSelType));
                pAntiLead->AP(MCommandParameterBlob(pBlobArray, MGetBlobArraySize(pBlobArray)));
    
    
                ZPostCommand(pAntiLead);
            }
        }
    }
    ZGame.cpp (replace OnPeerShot_Range, OnPeerShot_Range_Damaged, OnPeerShot_Shotgun and OnPeerShotgun_Damaged and add OnPeerAntiLead)
    Code:
    //jintriple3 µð¹ö±× ·¹Áö½ºÅÍ ÇØÅ· ¹æÁö ÄÚµå »ðÀÔ
    void ZGame::OnPeerShot_Range_Damaged(ZObject* pOwner, float fShotTime, const rvector& pos, const rvector& to, ZPICKINFO pickinfo, DWORD dwPickPassFlag, rvector& v1, rvector& v2, ZItem *pItem, rvector& BulletMarkNormal, bool& bBulletMark, ZTargetType& nTargetType)
    {
        MMatchItemDesc *pDesc = pItem->GetDesc();
        bool bReturnValue = !pDesc;
        if(!pDesc) PROTECT_DEBUG_REGISTER(bReturnValue){ return; }
    
    
        rvector dir = to - pos;
    
    
        bReturnValue = !(ZGetGame()->PickHistory(pOwner,fShotTime,pos,to, &pickinfo,dwPickPassFlag));
        if(!(ZGetGame()->PickHistory(pOwner,fShotTime,pos,to, &pickinfo,dwPickPassFlag)))
        {
            PROTECT_DEBUG_REGISTER(bReturnValue)
            {
                v1 = pos;
                v2 = pos+dir*10000.f;
                nTargetType    = ZTT_NOTHING;
                return;
            }
        }
    
    
        // ¶«»§ -bird 
        //jintriple3 µð¹ö±× ·¹Áö½ºÅÍ ÇØÅ· ¹æÁö ÄÚµå
        bReturnValue = (!pickinfo.pObject) && (!pickinfo.bBspPicked);
        if(pickinfo.bBspPicked)
        {
            PROTECT_DEBUG_REGISTER(pickinfo.nBspPicked_DebugRegister == FOR_DEBUG_REGISTER)
            {
                nTargetType = ZTT_OBJECT;
    
    
                v1 = pos;
                v2 = pickinfo.bpi.PickPos;
    
    
                // ÃÑź ÈçÀû
                BulletMarkNormal.x = pickinfo.bpi.pInfo->plane.a;
                BulletMarkNormal.y = pickinfo.bpi.pInfo->plane.b;
                BulletMarkNormal.z = pickinfo.bpi.pInfo->plane.c;
                Normalize(BulletMarkNormal);
                bBulletMark = true;
                return;
            }
        }
        else if( (!pickinfo.pObject) && (!pickinfo.bBspPicked) )
        {
            PROTECT_DEBUG_REGISTER(bReturnValue)
            {
                //_ASSERT(false);
                return;
            }
        }
        //À§¿¡±îÁö´Â °Ë»ç ´Ü°è...
    
    
        ZObject *pObject = pickinfo.pObject;
        bool bGuard = pObject->IsGuard() && (pickinfo.info.parts!=eq_parts_legs) &&        // ´Ù¸®´Â ¸·À»¼ö¾ø´Ù
                        DotProduct(dir,pObject->GetDirection())<0;
    
    
        if(pObject->IsGuard() && (pickinfo.info.parts!=eq_parts_legs) &&        // ´Ù¸®´Â ¸·À»¼ö¾ø´Ù
                        DotProduct(dir,pObject->GetDirection())<0) //¿©±âµµ..
        {
            PROTECT_DEBUG_REGISTER(bGuard)
            {
                nTargetType = ZTT_CHARACTER_GUARD;
                // ¸·¾Ò´Ù
                rvector t_pos = pObject->GetPosition();
                t_pos.z += 100.f;
                ZGetEffectManager()->AddSwordDefenceEffect(t_pos+(-dir*50.f),-dir);
                pObject->OnGuardSuccess();
                v1 = pos;
                v2 = pickinfo.info.vOut;
                return;
            }
        }
        
        nTargetType = ZTT_CHARACTER;
    
    
        ZActor* pATarget = MDynamicCast(ZActor,pickinfo.pObject);
    
    
        bool bPushSkip = false;
    
    
        if(pATarget) 
        {
            bPushSkip = pATarget->GetNPCInfo()->bNeverPushed;
        }
    
    
        float fKnockbackForce = pItem->GetKnockbackForce();
    
    
        if(bPushSkip) 
        {
    //                    ZGetSoundEngine()->PlaySound("fx_bullethit_mt_met");
            rvector vPos = pOwner->GetPosition() + (pickinfo.pObject->GetPosition() - pOwner->GetPosition()) * 0.1f; 
            ZGetSoundEngine()->PlaySound("fx_bullethit_mt_met", vPos );
            fKnockbackForce = 1.0f;
        }
    
    
        pickinfo.pObject->OnKnockback( pOwner->m_Direction, fKnockbackForce );
    
    
        float fActualDamage = CalcActualDamage(pOwner, pickinfo.pObject, (float)pDesc->m_nDamage.Ref());
        float fRatio = pItem->GetPiercingRatio( pDesc->m_nWeaponType.Ref(), pickinfo.info.parts );
        ZDAMAGETYPE dt = (pickinfo.info.parts==eq_parts_head) ? ZD_BULLET_HEADSHOT : ZD_BULLET;
    
    
        if(pickinfo.pObject->IsNPC() || strstr(ZGetGameClient()->GetStageName(), "[L]") || (pOwner->GetUID().Low != ZGetGameClient()->GetPlayerUID().Low && pickinfo.pObject->GetUID().Low != ZGetGameClient()->GetPlayerUID().Low))
        {
            pickinfo.pObject->OnDamaged(pOwner, pOwner->GetPosition(), dt, pDesc->m_nWeaponType.Ref(), fActualDamage, fRatio );
        }
        else if(pOwner->GetUID().Low == ZGetGameClient()->GetPlayerUID().Low && !(((ZCharacter*)pickinfo.pObject)->m_dwStatusBitPackingValue.Ref().m_bLostConEffect))
        {
            ((ZCharacter*)pickinfo.pObject)->OnDamaged_AntiLead(pOwner, pOwner->GetPosition(), ((ZCharacter*)pOwner)->GetItems()->GetSelectedWeaponParts(), pickinfo.info.parts, dt, pDesc->m_nWeaponType.Ref(), fActualDamage, fRatio );
            pickinfo.pObject->OnDamaged(pOwner, pOwner->GetPosition(), dt, pDesc->m_nWeaponType.Ref(), fActualDamage, fRatio );
        }
    
    
        if(pOwner == m_pMyCharacter) 
        {
            CheckCombo(m_pMyCharacter,pickinfo.pObject,!bPushSkip);
            CheckStylishAction(m_pMyCharacter);
        }
    
    
        v1 = pos;
        v2 = pickinfo.info.vOut;
    }
    void ZGame::OnPeerShot_Range(const MMatchCharItemParts sel_type, const MUID& uidOwner, float fShotTime, const rvector& pos, const rvector& to)
    {
        ZObject *pOwner = m_ObjectManager.GetObject(uidOwner);
        if(!pOwner) return;
    
    
        ZItem *pItem = pOwner->GetItems()->GetItem(sel_type);
        if(!pItem) return;
        MMatchItemDesc *pDesc = pItem->GetDesc();
        if(!pDesc) {  return; }
    
    
        rvector dir = to - pos;
    
    
        Normalize(dir);
    
    
        rvector v1, v2;
        rvector BulletMarkNormal;
        bool bBulletMark = false;
        ZTargetType nTargetType = ZTT_OBJECT;
    
    
        // ZCharacter* pCharacter = NULL;
    
    
        ZPICKINFO pickinfo;
    
    
        memset(&pickinfo,0,sizeof(ZPICKINFO));
    
    
        // ÃѾËÀº ·ÎÄÏÀÌ Åë°úÇϴ°÷µµ Åë°úÇÑ´Ù
        const DWORD dwPickPassFlag=RM_FLAG_ADDITIVE | RM_FLAG_HIDE | RM_FLAG_PASSROCKET | RM_FLAG_PASSBULLET;
    
    
        // ½î´Â ij¸¯ÅÍ Èçµé¾î ÁÖ±â..
        pOwner->Tremble(8.f, 50, 30);
    
    
        //jintriple3 µð¹ö±× ·¹Áö½ºÅÍ ÇÙ ¹æÁö¸¦ À§ÇØ ÇÔ¼ö·Î »°´Ù..±Ùµ¥ ÀÎÀÚ°¡ ³ÑÈå ¸¹¾Æ..¤Ì¤Ì
        OnPeerShot_Range_Damaged(pOwner, fShotTime, pos, to, pickinfo, dwPickPassFlag,v1, v2, pItem, BulletMarkNormal, bBulletMark, nTargetType);
    
    
    
    
        bool bPlayer = false;
        //bool b3D = (pOwnerCharacter!=m_pMyCharacter);    // ÀڱⰡ ³»´Â »ç¿îµå´Â 2D·Î Ãâ·ÂÇÑ´Ù.
        //rvector Pos = pOwnerCharacter->GetPosition();
        rvector Pos = v1;
        if(pOwner==m_pMyCharacter)
        {
    
    
            Pos = RCameraPosition;
            bPlayer = true;
        }
    
    
        ZCharacter *pTargetCharacter=ZGetGameInterface()->GetCombatInterface()->GetTargetCharacter();
        ZApplication::GetSoundEngine()->PlaySEFire(pDesc, Pos.x, Pos.y, Pos.z, bPlayer);
        //if(nTargetType == ZTT_OBJECT) { ZApplication::GetSoundEngine()->PlaySERicochet(v2.x, v2.y, v2.z); }
    #define SOUND_CULL_DISTANCE 1500.0F
        if( D3DXVec3LengthSq(&(v2 - pTargetCharacter->GetPosition())) < (SOUND_CULL_DISTANCE * SOUND_CULL_DISTANCE) )
        {
            if(nTargetType == ZTT_OBJECT) { 
                ZGetSoundEngine()->PlaySEHitObject( v2.x, v2.y, v2.z, pickinfo.bpi ); 
            }
    
    
            if(nTargetType == ZTT_CHARACTER) { 
                ZGetSoundEngine()->PlaySEHitBody(v2.x, v2.y, v2.z); 
            }
        }
    
    
        //// º¸ÀÌÁö ¾ÊÀ¸¸é ÀÌÆåÆ®¸¦ ±×¸±ÇÊ¿ä´Â ¾ø´Ù - Á¤È®ÇÑ ÄøµÀ» ¿ä¸Á.. by bird
        //if(!pOwner->IsRendered()) return;
    
    
    
    
        // ½î´Â°÷ ¹Ý°æ 100cm °¡ È­¸é¿¡ µé¾î°¡´ÂÁö üũÇÑ´Ù
        bool bDrawFireEffects = isInViewFrustum(v1,100.f,RGetViewFrustum());
    
    
        if(!isInViewFrustum(v1,v2,RGetViewFrustum()) // ½î´Â°÷¿¡¼­ ¸Â´Â°÷ÀÇ ¶óÀÎÀÌ º¸ÀÌ´ÂÁö..
            && !bDrawFireEffects) return;                    // ½î´Â°÷¿¡¼­µµ ±×¸±°Ô ¾ø´ÂÁö..
    
    
        bool bDrawTargetEffects = isInViewFrustum(v2,100.f,RGetViewFrustum());
    
    
    
    
    
    
        /////////////////////// ÀÌÈÄ´Â ÀÌÆåÆ® Ãß°¡
    
    
        // ¹°Æ¢´Â ÀÌÆåÆ® üũ
        GetWorld()->GetWaters()->CheckSpearing( v1, v2, 250, 0.3 );
    
    
    
    
    
    
        // TODO: NPC ÀÇ Ãѱ¸À§Ä¡ ÀÎÅÍÆäÀ̽º°¡ È®Á¤µÇ¸é ¸¶Àú Ãß°¡ÇÏÀÚ.
    //    ZCharacter *pOwnerCharacter = m_CharacterManager.Find(uidOwner);
    
    
        
        ZCharacterObject* pCOwnerObject = MDynamicCast(ZCharacterObject, pOwner);
    
    
        if(pCOwnerObject) 
        {
    
    
            // Ãѱ¸ È­¿°ÀÌÆåÆ®
            rvector pdir = v2-v1;
            Normalize(pdir);
    
    
            int size = 3;
    
    
            rvector v[6];
    
    
    //        size = GetWeapondummyPos(pOwnerCharacter,v);
            if(pCOwnerObject->IsRendered())
                size = pCOwnerObject->GetWeapondummyPos(v);
            else
            {
                size = 6;
                v[0] = v[1] = v[2] = v1;
                v[3] = v[4] = v[5] = v[0];
            }
    
    
    
    
            MMatchWeaponType wtype = pDesc->m_nWeaponType.Ref();
            bool bSlugOutput = pDesc->m_bSlugOutput; // źÇÇÀûÃâ(true, false) 
    
    
            // Effect
            if(bBulletMark==false) BulletMarkNormal = -pdir;
    
    
            ZGetEffectManager()->AddShotEffect( v , size , v2, BulletMarkNormal, nTargetType, wtype, bSlugOutput, pCOwnerObject,bDrawFireEffects,bDrawTargetEffects);
    
    
            // ÃÑ ½ò¶§ ¶óÀÌÆ® Ãß°¡
            ZCharacterObject* pChar;
    
    
            if( ZGetConfiguration()->GetVideo()->bDynamicLight && pCOwnerObject != NULL )
            {
                pChar = pCOwnerObject;
            
                if( pChar->m_bDynamicLight )
                {
                    pChar->m_vLightColor = g_CharLightList[GUN].vLightColor;
                    pChar->m_fLightLife = g_CharLightList[GUN].fLife;
                }
                else
                {
                    pChar->m_bDynamicLight = true;
                    pChar->m_vLightColor = g_CharLightList[GUN].vLightColor;
                    pChar->m_vLightColor.x = 1.0f;
                    pChar->m_iDLightType = GUN;
                    pChar->m_fLightLife = g_CharLightList[GUN].fLife;
                }
            }
        }
        
        // ±ê¹ß¿¡ Èû Àû¿ë               p
        GetWorld()->GetFlags()->CheckSpearing( v1, v2, BULLET_SPEAR_EMBLEM_POWER );
        if(Z_VIDEO_DYNAMICLIGHT)
            ZGetStencilLight()->AddLightSource( v1, 2.0f, 75 );
    }
    
    
    
    
    
    
    void ZGame::OnPeerShot_Shotgun(ZItem *pItem, ZCharacter* pOwnerCharacter, float fShotTime, const rvector& pos, const rvector& to)
    {
        vector<ZAntiLeadTemporaryInfo*> vInfo;
        char nSelType = 0;
    
    
        // ³» ij¸¯ÅÍ È¤Àº ³»°¡ º¸°íÀִ ij¸¯ÅÍ
        ZCharacter *pTargetCharacter = ZGetGameInterface()->GetCombatInterface()->GetTargetCharacter();
        if(!pTargetCharacter) return;
    
    
        MMatchItemDesc *pDesc = pItem->GetDesc();
        if(!pDesc) {  return; }
    
    
    
    
    #define SHOTGUN_BULLET_COUNT    12
    #define SHOTGUN_DIFFUSE_RANGE    0.1f
    
    
        if (pOwnerCharacter == NULL) return;
    
    
        // ¸ðµç»ç¶÷ÀÌ °°Àº random seed ¸¦ °®µµ·Ï °°Àº°ªÀ¸·Î ÃʱâÈ­ ÇØÁØ´Ù
        int *seed=(int*)&fShotTime;
        srand(*seed);
    
    
        bool bHitGuard=false,bHitBody=false,bHitGround=false,bHitEnemy=false;
        rvector GuardPos,BodyPos,GroundPos;
        bool waterSound = false;
    
    
        rvector v1, v2;
        rvector dir;
    
    
        rvector origdir = to - pos;
        Normalize(origdir);
    
    
        int nHitCount = 0;
    
    
        int nPelletCount = SHOTGUN_BULLET_COUNT;
    
    
        for(int i=0;i<nPelletCount;i++)
        {
            dir = origdir;
            {
                // ¿ÀÂ÷°ª - ¹Ýµ¿´ë½Å ½Ã¹ü»ï¾Æ ³ÖÀ½
                rvector r, up(0,0,1), right;
                D3DXQUATERNION q;
                D3DXMATRIX mat;
    
    
                float fAngle = (rand() % (31415 * 2)) / 1000.0f;
                float fForce = RANDOMFLOAT*SHOTGUN_DIFFUSE_RANGE;
    
    
                D3DXVec3Cross(&right,&dir,&up);
                D3DXVec3Normalize(&right,&right);
                D3DXMatrixRotationAxis(&mat, &right, fForce);
                D3DXVec3TransformCoord(&r, &dir, &mat);
    
    
                D3DXQuaternionRotationAxis(&q, &dir, fAngle);
                D3DXMatrixRotationQuaternion(&mat, &q);
                D3DXVec3TransformCoord(&r, &r, &mat);
    
    
                dir=r;
            }
            rvector BulletMarkNormal;
            bool bBulletMark = false;
            ZTargetType nTargetType = ZTT_OBJECT;
    
    
            ZPICKINFO pickinfo;
    
    
            memset(&pickinfo,0,sizeof(ZPICKINFO));
    
    
            // ÃѾËÀº ·ÎÄÏÀÌ Åë°úÇϴ°÷µµ Åë°úÇÑ´Ù
            const DWORD dwPickPassFlag=RM_FLAG_ADDITIVE | RM_FLAG_HIDE | RM_FLAG_PASSROCKET | RM_FLAG_PASSBULLET;
            //jintriple3 µð¹ö±× ·¹Áö½ºÅÍ ÇÙ ¹æ¾î ÇÔ¼ö..
            ZAntiLeadTemporaryInfo *pShotInfo = OnPeerShotgun_Damaged( pOwnerCharacter, fShotTime, pos, dir, pickinfo, dwPickPassFlag, v1, v2, pItem, BulletMarkNormal, bBulletMark, nTargetType, bHitEnemy);
    
    
            if(pShotInfo)
                vInfo.push_back(pShotInfo);
        }
    
    
        if(bHitEnemy) {
            CheckStylishAction(pOwnerCharacter);
            CheckCombo(pOwnerCharacter, NULL,true);
                        }
        if(strstr(ZGetGameClient()->GetStageName(), "[L]"))
        {
            if(vInfo.size() > 0) 
                vInfo.clear();
        }
        else if (vInfo.size() > 0 && !ZGetGameInterface()->GetCombatInterface()->GetObserverMode())
        {
            ZCharacter* pCharacter = NULL;//ZGetCharacterManager()->Find(MUID(0, vInfo[0]->m_nVictimLowID));
            int nCount = 0;
    
    
            bool bUidCheck = false;
            vector<ZAntiLead_UIDListNode> v_UIDList;
    
    
            for (vector<ZAntiLeadTemporaryInfo*>::iterator itor = vInfo.begin(); itor != vInfo.end(); ++itor)
            {
                if(!v_UIDList.size() && (*itor)->m_nVictimLowID > 0)
                {
                    ZAntiLeadTemporaryInfo * pInfo = new ZAntiLeadTemporaryInfo();
                    pInfo->m_nPartsType = (*itor)->m_nPartsType;
                    pInfo->m_nVictimLowID = (*itor)->m_nVictimLowID;
    
    
                    ZAntiLead_UIDListNode List;
                    List.Info.push_back(pInfo);
                    List.LowID = (*itor)->m_nVictimLowID;
    
    
                    v_UIDList.push_back(List);
                }
                else
                {
                    for (vector<ZAntiLead_UIDListNode>::iterator it = v_UIDList.begin(); it != v_UIDList.end(); ++it)
                    {
                        if((*it).LowID == (*itor)->m_nVictimLowID)
                        {
                            bUidCheck = true;
    
    
                            ZAntiLeadTemporaryInfo * pInfo = new ZAntiLeadTemporaryInfo();
                            pInfo->m_nPartsType = (*itor)->m_nPartsType;
                            pInfo->m_nVictimLowID = (*itor)->m_nVictimLowID;
    
    
                            (*it).Info.push_back(pInfo);
    
    
                            break;
                        }
                
                    }
    
    
                    if(!bUidCheck && (*itor)->m_nVictimLowID > 0)
                    {
                        ZAntiLeadTemporaryInfo * pInfo = new ZAntiLeadTemporaryInfo();
                        pInfo->m_nPartsType = (*itor)->m_nPartsType;
                        pInfo->m_nVictimLowID = (*itor)->m_nVictimLowID;
    
    
                        ZAntiLead_UIDListNode List;
                        List.Info.push_back(pInfo);
                        List.LowID = (*itor)->m_nVictimLowID;
    
    
                        v_UIDList.push_back(List);
                    }
    
    
                    bUidCheck = false;
                }
            }
            if(v_UIDList.size() > 0)
            {
                for (vector<ZAntiLead_UIDListNode>::iterator it = v_UIDList.begin(); it != v_UIDList.end(); ++it)
                {
                    pCharacter = ZGetCharacterManager()->Find(MUID(0, (*it).LowID));
                    if (pCharacter && pOwnerCharacter->GetUID().Low == ZGetGameClient()->GetPlayerUID().Low && !(pCharacter->m_dwStatusBitPackingValue.Ref().m_bLostConEffect))
                    {
                        nSelType = ((ZCharacter*)pOwnerCharacter)->GetItems()->GetSelectedWeaponParts();
                        if (!GetMatch()->IsTeamPlay())
                        {
                            pCharacter->OnDamaged_AntiLead(pOwnerCharacter, (*it).Info, nSelType);
                        }
                        else if (GetMatch()->IsTeamPlay() && ZGetGame()->GetMatch()->GetTeamKillEnabled() && pCharacter->IsTeam(pOwnerCharacter))
                        {
                            pCharacter->OnDamaged_AntiLead(pOwnerCharacter, (*it).Info, nSelType);
                        }
                        else if (GetMatch()->IsTeamPlay() && !pCharacter->IsTeam(pOwnerCharacter))
                        {
                            pCharacter->OnDamaged_AntiLead(pOwnerCharacter, (*it).Info, nSelType);
                        }
                    }
                }
                v_UIDList.clear();
            }
            for(vector<ZAntiLeadTemporaryInfo*>::iterator i = vInfo.begin(); i != vInfo.end(); i++)
            {
                ZAntiLeadTemporaryInfo* p = *i;
                delete p;
            }
        vInfo.clear();
        }
    
    
        ZApplication::GetSoundEngine()->PlaySEFire(pItem->GetDesc(), pos.x, pos.y, pos.z, (pOwnerCharacter==m_pMyCharacter));
    
    
        // º¸ÀÌÁö ¾ÊÀ¸¸é ÀÌÆåÆ®¸¦ ±×¸±ÇÊ¿ä´Â ¾ø´Ù
        if(!pOwnerCharacter->IsRendered()) return;
    
    
        rvector v[6];
    
    
        int _size = pOwnerCharacter->GetWeapondummyPos(v);
    
    
        dir = to - pos;
        Normalize(dir);
    
    
        ZGetEffectManager()->AddShotgunEffect(const_cast<rvector&>(pos),v[1],dir,pOwnerCharacter);
    
    
        // ÃÑ ½ò¶§ ¶óÀÌÆ® Ãß°¡
        ZCharacter* pChar;
        if( ZGetConfiguration()->GetVideo()->bDynamicLight && pOwnerCharacter != NULL )
        {
            pChar = pOwnerCharacter;
    
    
            if( pChar->m_bDynamicLight )
            {
                pChar->m_vLightColor = g_CharLightList[SHOTGUN].vLightColor;
                pChar->m_fLightLife = g_CharLightList[SHOTGUN].fLife;
            }
            else
            {
                pChar->m_bDynamicLight = true;
                pChar->m_vLightColor = g_CharLightList[SHOTGUN].vLightColor;
                pChar->m_vLightColor.x = 1.0f;
                pChar->m_iDLightType = SHOTGUN;
                pChar->m_fLightLife = g_CharLightList[SHOTGUN].fLife;
            }
        }
    //    m_flags.CheckSpearing( v1, v2, SHOTGUN_SPEAR_EMBLEM_POWER );
        if(Z_VIDEO_DYNAMICLIGHT)
            ZGetStencilLight()->AddLightSource(v1, 2.0f, 200 );
    }
    
    
    //jintriple3 µð¹ö±× ·¹Áö½ºÅÍ ÇØÅ· ¹æÁö ÄÚµå »ðÀÔ
    ZAntiLeadTemporaryInfo* ZGame::OnPeerShotgun_Damaged(ZObject* pOwner, float fShotTime, const rvector& pos, rvector& dir, ZPICKINFO pickinfo, DWORD dwPickPassFlag, rvector& v1, rvector& v2, ZItem *pItem, rvector& BulletMarkNormal, bool& bBulletMark, ZTargetType& nTargetType, bool& bHitEnemy)
    {
        ZCharacter *pTargetCharacter = ZGetGameInterface()->GetCombatInterface()->GetTargetCharacter();
        bool bReturnValue = !pTargetCharacter;
        if(!pTargetCharacter)PROTECT_DEBUG_REGISTER(bReturnValue) return NULL;
        
        MMatchItemDesc *pDesc = pItem->GetDesc();
        bReturnValue = !pDesc;
        if(!pDesc)PROTECT_DEBUG_REGISTER(bReturnValue) { _ASSERT(FALSE); return NULL; }
    
    
        //rvector dir = to - pos;
    
    
        bool waterSound = false;
        //¿©±â¿¡ ¹æ¾îÄڵ尡 µé¾î°¡¾ßµÅ~
        bReturnValue = !(ZGetGame()->PickHistory(pOwner,fShotTime,pos,pos+10000.f*dir, &pickinfo,dwPickPassFlag));
        if(!(ZGetGame()->PickHistory(pOwner,fShotTime,pos,pos+10000.f*dir, &pickinfo,dwPickPassFlag)))
        {
            PROTECT_DEBUG_REGISTER(bReturnValue)
            {
                v1 = pos;
                v2 = pos+dir*10000.f;
                nTargetType    = ZTT_NOTHING;
                waterSound = GetWorld()->GetWaters()->CheckSpearing( v1, v2, 250, 0.3, !waterSound );
                return NULL;
            }
        }
            //¿©±âµµ..
        bReturnValue = (!pickinfo.pObject) && (!pickinfo.bBspPicked);
        if(pickinfo.bBspPicked)
            {
                PROTECT_DEBUG_REGISTER(pickinfo.nBspPicked_DebugRegister == FOR_DEBUG_REGISTER)
                {
                    nTargetType = ZTT_OBJECT;
    
    
                    v1 = pos;
                    v2 = pickinfo.bpi.PickPos;
    
    
                    // ÃÑź ÈçÀû
                    BulletMarkNormal.x = pickinfo.bpi.pInfo->plane.a;
                    BulletMarkNormal.y = pickinfo.bpi.pInfo->plane.b;
                    BulletMarkNormal.z = pickinfo.bpi.pInfo->plane.c;
                    Normalize(BulletMarkNormal);
                    bBulletMark = true;
    
    
                    // ¸Â´Â°÷ ¹Ý°æ 20cm °¡ È­¸é¿¡ µé¾î¿À¸é ±×¸°´Ù
                    bool bDrawTargetEffects = isInViewFrustum(v2,20.f,RGetViewFrustum());
                    if(bDrawTargetEffects)
                    {
                        rvector pdir = v2-v1;
                        Normalize(pdir);
    
    
                        int size = 3;
                        bool bDrawFireEffects = isInViewFrustum(v1,100.f,RGetViewFrustum());
                        rvector v[6];
    
    
                //        size = GetWeapondummyPos(pOwnerCharacter,v);
                        ZCharacterObject* pCOwnerObject = MDynamicCast(ZCharacterObject, pOwner);
                        if(pCOwnerObject->IsRendered())
                            size = pCOwnerObject->GetWeapondummyPos(v);
                        else
                        {
                            size = 6;
                            v[0] = v[1] = v[2] = v1;
                            v[3] = v[4] = v[5] = v[0];
                        }
    
    
    
    
                        MMatchWeaponType wtype = pDesc->m_nWeaponType.Ref();
                        bool bSlugOutput = pDesc->m_bSlugOutput; 
                        ZGetEffectManager()->AddBulletMark(v2,BulletMarkNormal, rvector(0,0,0));
                        if(ZGetConfiguration()->GetExtra()->bShotgunSmoke == true) {
                        ZGetEffectManager()->AddShotEffect(&v1, size , v2, BulletMarkNormal, nTargetType, wtype, bSlugOutput, pCOwnerObject,bDrawFireEffects,bDrawTargetEffects);
                        }
                    }
            }
                waterSound = GetWorld()->GetWaters()->CheckSpearing( v1, v2, 250, 0.3, !waterSound );
                return NULL;
            }
        else if( (!pickinfo.pObject) && (!pickinfo.bBspPicked) )
        {
            PROTECT_DEBUG_REGISTER(bReturnValue)
            {
                _ASSERT(false);
                return NULL;
            }
        }
    
    
        //À§¿¡±îÁö´Â °Ë»ç ´Ü°è...
    
    
        ZObject *pObject = pickinfo.pObject;
        bool bGuard = pObject->IsGuard() && (pickinfo.info.parts!=eq_parts_legs) &&        // ´Ù¸®´Â ¸·À»¼ö¾ø´Ù
                        DotProduct(dir,pObject->GetDirection())<0;
    
    
        if(pObject->IsGuard() && (pickinfo.info.parts!=eq_parts_legs) &&
                        DotProduct(dir,pObject->GetDirection())<0) 
        {
            PROTECT_DEBUG_REGISTER(bGuard)
            {
                nTargetType = ZTT_CHARACTER_GUARD;
                // ¸·¾Ò´Ù
                rvector t_pos = pObject->GetPosition();
                t_pos.z += 100.f;
                ZGetEffectManager()->AddSwordDefenceEffect(t_pos+(-dir*50.f),-dir);
                pObject->OnGuardSuccess();
                v1 = pos;
                v2 = pickinfo.info.vOut;
                return NULL;
            }
        }
    
    
        ZActor* pATarget = MDynamicCast(ZActor,pObject);
        nTargetType = ZTT_CHARACTER;
    
    
        bool bPushSkip = false;
    
    
        if(pATarget) 
        {
            bPushSkip = pATarget->GetNPCInfo()->bNeverPushed;
        }
    
    
        int nPelletCount = SHOTGUN_BULLET_COUNT;
    
    
        float fKnockbackForce = pItem->GetKnockbackForce()/ (.5f*float(nPelletCount));
    
    
        if(bPushSkip) 
        {
    //                    ZGetSoundEngine()->PlaySound("fx_bullethit_mt_met");
            rvector vPos = pOwner->GetPosition() + (pickinfo.pObject->GetPosition() - pOwner->GetPosition()) * 0.1f; 
            ZGetSoundEngine()->PlaySound("fx_bullethit_mt_met", vPos );
            fKnockbackForce = 1.0f;
        }
    
    
        pObject->OnKnockback( dir, fKnockbackForce );
    
    
        float fActualDamage = CalcActualDamage(pOwner, pObject, (float)pDesc->m_nDamage.Ref());
        float fRatio = pItem->GetPiercingRatio( pDesc->m_nWeaponType.Ref(), pickinfo.info.parts );
        ZDAMAGETYPE dt = (pickinfo.info.parts==eq_parts_head) ? ZD_BULLET_HEADSHOT : ZD_BULLET;
    
    
        ZAntiLeadTemporaryInfo* pShotInfo = NULL;
    
    
        if(pickinfo.pObject->IsNPC() == true || strstr(ZGetGameClient()->GetStageName(), "[L]") || (pOwner->GetUID().Low != ZGetGameClient()->GetPlayerUID().Low && pickinfo.pObject->GetUID().Low != ZGetGameClient()->GetPlayerUID().Low))
            pickinfo.pObject->OnDamaged(pOwner, pOwner->GetPosition(), dt, pDesc->m_nWeaponType.Ref(), fActualDamage, fRatio );
        else if(pOwner->GetUID().Low == ZGetGameClient()->GetPlayerUID().Low && pickinfo.pObject->GetUID().Low != ZGetGameClient()->GetPlayerUID().Low)
        {
            pShotInfo = new ZAntiLeadTemporaryInfo;
    
    
            pShotInfo->m_nVictimLowID = pickinfo.pObject->GetUID().Low;
            pShotInfo->m_nPartsType = pickinfo.info.parts;
    
    
            pickinfo.pObject->OnDamaged(pOwner, pOwner->GetPosition(), dt, pDesc->m_nWeaponType.Ref(), fActualDamage, fRatio );
        }
    
    
        if(!m_Match.IsTeamPlay() || (pTargetCharacter->GetTeamID()!=pObject->GetTeamID()))
        {
            bHitEnemy = true;
        }
    
    
        v1 = pos;
        v2 = pickinfo.info.vOut;
    
    
        waterSound = GetWorld()->GetWaters()->CheckSpearing( v1, v2, 250, 0.3, !waterSound );
    
    
        return pShotInfo;
    }
    void ZGame::OnPeerAntiLead( const MUID& uidSender, MMatchCharItemParts nSelType, void* ZAntiLeadTemporaryInfoBlob)
    {
        int nSize = MGetBlobArrayCount(ZAntiLeadTemporaryInfoBlob);
        if(!nSize || nSize > 12) return;
    
    
        ZCharacter* pCharacter = (ZCharacter*)ZGetCharacterManager()->Find(uidSender);
        if(!pCharacter) return;
    
    
        ZItem *pItem = (MMCIP_MELEE <= nSelType && nSelType <= MMCIP_SECONDARY) ? pCharacter->GetItems()->GetItem((MMatchCharItemParts)nSelType) : 0;
        if(!pItem || !pItem->GetDesc()) return;
    
    
        MMatchWeaponType wt = pItem->GetDesc()->m_nWeaponType.Ref();
    
    
        for (int i = 0; i < nSize; ++i)
        {
            char nPartsType = (char)MGetBlobArrayElement(ZAntiLeadTemporaryInfoBlob, i);
            if(!nPartsType) break;
    
    
            float fRatio = pItem->GetPiercingRatio( pItem->GetDesc()->m_nWeaponType.Ref(), (RMeshPartsType)nPartsType);
            float fDamage = CalcActualDamage(pCharacter, m_pMyCharacter, (float)pItem->GetDesc()->m_nDamage.Ref());
            ZDAMAGETYPE dt = (nPartsType==eq_parts_head) ? ZD_BULLET_HEADSHOT : ZD_BULLET;
                
            if (m_pMyCharacter && ZGetGameClient()->GetPlayerUID().Low != uidSender.Low)
                if (pCharacter && !ZGetGame()->GetMatch()->IsTeamPlay() ||  ((m_pMyCharacter->IsTeam(pCharacter) && ZGetGame()->GetMatch()->GetTeamKillEnabled()) || !m_pMyCharacter->IsTeam(pCharacter)))
                    m_pMyCharacter->OnDamaged(pCharacter, pCharacter->GetPosition(), dt, wt, fDamage, fRatio);
        }
    }
    ZGame.cpp (add this case to the switch block in ZGame::OnCommand_Immidiate)
    Code:
        case MC_GUNZ_ANTILEAD:
            {
                char nSelType;
    
    
                pCommand->GetParameter(&nSelType, 0, MPT_CHAR);
                MCommandParameter* pParam = pCommand->GetParameter(1);
    
    
                if (pParam->GetType() != MPT_BLOB || !nSelType) break;
                void* pBlob = pParam->GetPointer();
    
    
                OnPeerAntiLead(pCommand->GetSenderUID(), (MMatchCharItemParts)nSelType, pBlob);
    
    
                break;
            }
    Notes:

    - Security can be improved (think of item delays etc.)
    - There might be references to the DG source in these snippets.
    - No further support will be given.
    Last edited by Mr_Troy; 07-05-13 at 04:18 PM.


  2. #2
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: DarKGunZ Anti-Lead

    You put a lot of work into this, I'm sure everyone will appreciate the release

  3. #3
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by wesman2232 View Post
    You put a lot of work into this, I'm sure everyone will appreciate the release
    not offense but i still prefer jacob's source !
    still nice work meh !



    OT: DG closing because ? ...

  4. #4
    Retired. Don't PM. SecretsOThePast is offline
    DeveloperRank
    Jan 2009 Join Date
    643Posts

    Re: DarKGunZ Anti-Lead

    You should've just put the packet as a blob instead of multiple packets being sent at once. Too many packets in rapid succession will result in packet loss.

    Send the blob packet to everyone in the room, and take out the ones you need. I did have a bug in mine which is why you opted to rewrite it, it would break instead of continue on the loop to read the packet.

    I'm surprised that you didn't do that considering I had multiple UID targets done already. This vector overcomplicates things.

  5. #5
    Proficient Member Mr_Troy is offline
    MemberRank
    Jun 2007 Join Date
    172Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by SecretsOThePast View Post
    You should've just put the packet as a blob instead of multiple packets being sent at once. Too many packets in rapid succession will result in packet loss.

    I'm surprised that you didn't do that considering I had done that for you.
    If you look closely enough, you'll see it'll send just 1 packet to 1 person. If it hits multiple persons, it will send multiple packets.

    And wouldn't sending the packet to everyone in the room cause the same packet loss issue?

  6. #6
    Retired. Don't PM. SecretsOThePast is offline
    DeveloperRank
    Jan 2009 Join Date
    643Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by Mr_Troy View Post
    If you look closely enough, you'll see it'll send just 1 packet to 1 person. If it hits multiple persons, it will send multiple packets.

    And wouldn't sending the packet to everyone in the room cause the same packet loss issue?
    It wouldn't due to the less amount of stress through UDP caused by smaller packets being sent rapidly via GunZ's SafeUDP class... I'm fairly certain the queue has a bug that MAIET tried to avoid, then again it's UDP so who knows. Technically, this data should be getting sent through a TCP socket to avoid packet loss via matchserver (or honestly, all traffic should be going through matchagent via TCP unless you have a foolproof way of doing error handling which SafeUDP does not presently as far as i'm aware)

    I am going to likely attempt to convert 1) all traffic to TCP through the use of a dedicated server or 2) implement GunZ2 networking which is host based and chooses the best host available if I ever were to do a gunz project again. Though, hopefully I won't have to deal with private servers ever again soon.

  7. #7
    Enthusiast juanjunio is offline
    MemberRank
    Jul 2010 Join Date
    49Posts

    Re: DarKGunZ Anti-Lead

    if it works?

    that is with the tag [Lead] or [L] creating a room?

  8. #8
    Fuck Army. sahar042 is offline
    MemberRank
    Jul 2009 Join Date
    833Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by juanjunio View Post
    if it works?

    that is with the tag [Lead] or [L] creating a room?
    [L]....BTW, Great release.

  9. #9

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by SecretsOThePast View Post
    I am going to likely attempt to convert 1) all traffic to TCP through the use of a dedicated server or 2) implement GunZ2 networking which is host based and chooses the best host available if I ever were to do a gunz project again. Though, hopefully I won't have to deal with private servers ever again soon.
    GunZ 2 is host-based, but I don't think it chooses the next best host available(at-least not that I've seen or experienced), I don't think they ever got around to finishing it, instead, they just made it into a command.

  10. #10
    Immortal GunZ :D maxy2010 is offline
    MemberRank
    Sep 2009 Join Date
    357Posts

    Re: DarKGunZ Anti-Lead

    plz some one xplain the zgame.h and zgame.cpp part properly :(..im not getting it

  11. #11
    ❀◕ ‿ ◕❀ Zujirawa is offline
    MemberRank
    Aug 2004 Join Date
    凸(¬‿¬)凸Location
    473Posts

    Re: DarKGunZ Anti-Lead

    yo Mr_troy, I know you cant remember me on this site. But Im one of the old dev on DG. By the way nice release but the Anti lead on DG not too good.
    For example:
    30 below ping on duel room using SG if you are a pro your trying to hit the feet of our enemy but sadly to say how much you strike or hit the character on the feet its useless. Its not more powerful or can DIRECT HIT.
    The anti lead you release is good for sprayer by hitting the body.

    Advantage:
    Noobs(sprayer) can be a pro.

    DisAdvantage:
    Pro will be useless.


    But Nice job you release it. Love you man.

  12. #12
    Hakuna Matata bulli10 is offline
    MemberRank
    Feb 2011 Join Date
    697Posts

    Re: DarKGunZ Anti-Lead

    thanks man :) great release

  13. #13
    Proficient Member Mr_Troy is offline
    MemberRank
    Jun 2007 Join Date
    172Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by Zujirawa View Post
    yo Mr_troy, I know you cant remember me on this site. But Im one of the old dev on DG. By the way nice release but the Anti lead on DG not too good.
    For example:
    30 below ping on duel room using SG if you are a pro your trying to hit the feet of our enemy but sadly to say how much you strike or hit the character on the feet its useless. Its not more powerful or can DIRECT HIT.
    The anti lead you release is good for sprayer by hitting the body.

    Advantage:
    Noobs(sprayer) can be a pro.

    DisAdvantage:
    Pro will be useless.


    But Nice job you release it. Love you man.
    That's because in our current patch, I fucked it up, I truly did lol.

  14. #14
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by maxy2010 View Post
    plz some one xplain the zgame.h and zgame.cpp part properly :(..im not getting it
    That's done on purpose.

  15. #15
    Valued Member Killer1478 is offline
    MemberRank
    Apr 2011 Join Date
    101Posts

    Re: DarKGunZ Anti-Lead



    I wonder if its protected.

    Also I remember Aiden making a slight hint at something about this.
    ZGetGameClient()->GetPlayerUID().Low != GetUID().Low
    Did you flip the high and low or is Aiden just on drugs?

  16. #16
    Proficient Member Mr_Troy is offline
    MemberRank
    Jun 2007 Join Date
    172Posts

    Re: DarKGunZ Anti-Lead

    MAIET uses the low ID as the unique ID number.

  17. #17
    ❀◕ ‿ ◕❀ Zujirawa is offline
    MemberRank
    Aug 2004 Join Date
    凸(¬‿¬)凸Location
    473Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by Mr_Troy View Post
    That's because in our current patch, I fucked it up, I truly did lol.
    Lol do you really do it? hahaha I thought its only a bug. :D
    Some pro Players on DG dont know that thing. The Direct hit. :P

  18. #18
    Apprentice Bonfire is offline
    MemberRank
    Jul 2012 Join Date
    5Posts

    Re: DarKGunZ Anti-Lead

    Thank you, nice release.

  19. #19
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: DarKGunZ Anti-Lead

    PHP Code:
     c:\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4563): error C2660'ZCharacter::OnDamaged_AntiLead' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4567): error C2660'ZCharacter::OnDamaged_AntiLead' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4571): error C2660'ZCharacter::OnDamaged_AntiLead' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4712): error C2660'ZEffectManager::AddBulletMark' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4713): error C2039'bShotgunSmoke' is not a member of 'ZCONFIG_ETC'
            
    c:\Users\Chris\Desktop\United Dev\Source\Gunz\ZConfiguration.h(116) : see declaration of 'ZCONFIG_ETC'
    c:\Users\Chris\Desktop\United Dev\Source\Gunz\ZCharacter.cpp(764): error C2511'void ZCharacter::OnDamaged_AntiLead(ZObject *,std::vector<_Ty>,char)' overloaded member function not found in 'ZCharacter'
            
    with
            
    [
                
    _Ty=ZAntiLeadTemporaryInfo *
            ] 

  20. #20
    Proficient Member Mr_Troy is offline
    MemberRank
    Jun 2007 Join Date
    172Posts

    Re: DarKGunZ Anti-Lead

    Quote Originally Posted by Duluxe View Post
    PHP Code:
     c:\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4563): error C2660'ZCharacter::OnDamaged_AntiLead' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4567): error C2660'ZCharacter::OnDamaged_AntiLead' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4571): error C2660'ZCharacter::OnDamaged_AntiLead' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4712): error C2660'ZEffectManager::AddBulletMark' : function does not take 3 arguments
    c
    :\Users\Chris\Desktop\United Dev\Source\Gunz\ZGame.cpp(4713): error C2039'bShotgunSmoke' is not a member of 'ZCONFIG_ETC'
            
    c:\Users\Chris\Desktop\United Dev\Source\Gunz\ZConfiguration.h(116) : see declaration of 'ZCONFIG_ETC'
    c:\Users\Chris\Desktop\United Dev\Source\Gunz\ZCharacter.cpp(764): error C2511'void ZCharacter::OnDamaged_AntiLead(ZObject *,std::vector<_Ty>,char)' overloaded member function not found in 'ZCharacter'
            
    with
            
    [
                
    _Ty=ZAntiLeadTemporaryInfo *
            ] 
    The ZEffectManager::AddBulletMark and bShotgunSmoke errors are cause of a change in DG's source (so synch them with your source). The other errors can easily be fixed by using your common sense.



Advertisement