1. Си / Говнокод #15806

    +141

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    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
    ...
    else if ( (!BG_InSpecialJump( legsAnim )//not in a special jump anim 
    						||BG_InReboundJump( legsAnim )//we're already in a rebound
    						||BG_InBackFlip( legsAnim ) )//a backflip (needed so you can jump off a wall behind you)
    					//&& pm->ps->velocity[2] <= 0 
    					&& pm->ps->velocity[2] > -1200 //not falling down very fast
    					&& !(pm->ps->pm_flags&PMF_JUMP_HELD)//have to have released jump since last press
    					&& (pm->cmd.forwardmove||pm->cmd.rightmove)//pushing in a direction
    					//&& pm->ps->forceRageRecoveryTime < pm->cmd.serverTime	//not in a force Rage recovery period
    					&& pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_2//level 3 jump or better
    					//&& WP_ForcePowerAvailable( pm->gent, FP_LEVITATION, 10 )//have enough force power to do another one
    					&& BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION)
    					&& (pm->ps->origin[2]-pm->ps->fd.forceJumpZStart) < (forceJumpHeightMax[FORCE_LEVEL_3]-(BG_ForceWallJumpStrength()/2.0f)) //can fit at least one more wall jump in (yes, using "magic numbers"... for now)
    					//&& (pm->ps->legsAnim == BOTH_JUMP1 || pm->ps->legsAnim == BOTH_INAIR1 ) )//not in a flip or spin or anything
    					)
    			{//see if we're pushing at a wall and jump off it if so
    				if ( allowWallGrabs )
    				{
    					//FIXME: make sure we have enough force power
    					//FIXME: check  to see if we can go any higher
    					//FIXME: limit to a certain number of these in a row?
    					//FIXME: maybe don't require a ucmd direction, just check all 4?
    					//FIXME: should stick to the wall for a second, then push off...
    ...

    Больше условий богу условий!
    Jedi Academy source, 2003

    Запостил: gost, 21 Апреля 2014

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

    • && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_2//level 3 jump or better
      Ответить
      • Ну если нумерация начинается с нуля, а уровни способностей заставили сделать с единицы, то почему бы и нет?
        Ответить
    • Ты с гейдева чтоли?
      Ответить
    • пффф.... это разве много условий?
      http://govnokod.ru/10595
      Ответить

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