Кресты / Говнокод #20073 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
//Collisions
static float collisionradius;
if(numplayers>1)
	for(k=0;k<numplayers;k++){
	for(i=k;i<numplayers;i++){
	if(i==k)i++;
   			if(i<numplayers)
   					if((animation[player[i].targetanimation].attack!=reversed&&animation[player[i].targetanimation].attack!=reversal&&animation[player[k].targetanimation].attack!=reversed&&animation[player[k].targetanimation].attack!=reversal)||(i!=0&&k!=0))
   						if((animation[player[i].currentanimation].attack!=reversed&&animation[player[i].currentanimation].attack!=reversal&&animation[player[k].currentanimation].attack!=reversed&&animation[player[k].currentanimation].attack!=reversal)||(i!=0&&k!=0))
   							if(player[i].howactive<=typesleeping&&player[k].howactive<=typesleeping)
   								if(player[i].howactive!=typesittingwall&&player[k].howactive!=typesittingwall)
   									if(i!=k&&player[i].whichpatchx==player[k].whichpatchx&&player[i].whichpatchz==player[k].whichpatchz&&player[k].skeleton.oldfree==player[k].skeleton.free&&player[i].skeleton.oldfree==player[i].skeleton.free&&player[i].targetanimation!=climbanim&&player[i].targetanimation!=hanganim&&player[k].targetanimation!=climbanim&&player[k].targetanimation!=hanganim)
   										if(player[i].coords.y>player[k].coords.y-3)
   											if(player[i].coords.y<player[k].coords.y+3)
   												if(player[i].coords.x>player[k].coords.x-3)
   													if(player[i].coords.x<player[k].coords.x+3)
   														if(player[i].coords.z>player[k].coords.z-3)
   															if(player[i].coords.z<player[k].coords.z+3){
   																if(findDistancefast(&player[i].coords,&player[k].coords)<3*((player[i].scale+player[k].scale)*2.5)*((player[i].scale+player[k].scale)*2.5)){
  																	if(player[i].onfire||player[k].onfire){
  																		if(!player[i].onfire)player[i].CatchFire();
   																		if(!player[k].onfire)player[k].CatchFire();
   																	}
   																}
   																...

http://hg.icculus.org/icculus/lugaru/file/97b303e79826/Source/GameTick.cpp#l7276

Запостил: gammaker gammaker, (Updated )

Комментарии (3) RSS

  • Бляяяя... 10к строк вот такого говна без всяких пробелов и с десятками уровней вложенности... Что-то мне нехорошо стало, пойду валидола выпью...

    PS, шедевр:
    rotatetarget=player[k].velocity-player[i].velocity;
    if(((player[i].targetanimation!=getupfrombackanim&&player[i].targetanimation!=getupfromfrontanim)||player[i].skeleton.free)&&((player[k].targetanimation!=getupfrombackanim&&player[k].targetanimation!=getupfromfrontanim)||player[k].skeleton.free))
        if(((((findLengthfast(&rotatetarget)>150&&(i!=0&&k!=0))||(findLengthfast(&rotatetarget)>50&&player[0].rabbitkickragdoll/*currentanimation==rabbitkickanim*/&&(i==0||k==0)))&&normaldotproduct(rotatetarget,player[k].coords-player[i].coords)>0)&&((i==0||k==0)||((player[i].skeleton.oldfree==1&&k!=0&&animation[player[k].currentanimation].attack==neutral)||(player[k].skeleton.oldfree==1&&i!=0&&animation[player[i].currentanimation].attack==neutral)||(player[i].isFlip()&&!player[i].skeleton.oldfree&&(i==0||k==0))||(player[k].isFlip()&&!player[k].skeleton.oldfree&&(i==0||k==0))||(i==0||k==0))))||((player[i].targetanimation==jumpupanim||player[i].targetanimation==jumpdownanim||player[i].isFlip())&&(player[k].targetanimation==jumpupanim||player[k].targetanimation==jumpdownanim||player[k].isFlip())&&(i==0||k==0)&&(!player[i].skeleton.oldfree&&!player[k].skeleton.oldfree))){
            //If hit by body
            if((i!=0||player[i].skeleton.free)&&(k!=0||player[k].skeleton.free)||(animation[player[i].targetanimation].height==highheight&&animation[player[k].targetanimation].height==highheight)){
                static float gLoc[3];
                // ...
    Ответить

Добавить комментарий

Где здесь C++, guest?!

    А не использовать ли нам bbcode?


    8