Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10707 in orxonox.OLD


Ignore:
Timestamp:
Jun 16, 2007, 12:32:59 AM (17 years ago)
Author:
rennerc
Message:

player can kill adm now

Location:
branches/presentation/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/bsp_weapon.cc

    r10705 r10707  
    157157        WorldEntity* target = aimingSystem->getNearestTarget();
    158158        aimingSystem->flushList();
    159 
    160         bool hit = false;
    161159       
    162         PRINTF(0)("groups: %d %d %d %d\n", this->getOMListNumber(), this->aimingSystem->getOMListNumber(), OM_GROUP_01, OM_GROUP_00);
     160        PRINTF(0)("---------------------------------------groups: %d %d %d %d\n", this->getOMListNumber(), this->aimingSystem->getOMListNumber(), OM_GROUP_01, OM_GROUP_00);
    163161
    164162        if ( target == NULL )
     
    172170                        float p = 1 - res*res/range/range;
    173171                        if (r < p ){
    174                                 hit = true;
    175172                                printf( "HIT %s\n", target->getClassName().c_str() );
    176173                                target->hit( this->damage, this );
     
    180177                       
    181178                }
    182                 else hit = true;
     179                else
     180                {
     181                        printf( "HIT %s\n", target->getClassName().c_str() );
     182                        target->hit( this->damage, this );
     183                }
    183184        }
    184185
  • branches/presentation/src/world_entities/weapons/weapon.h

    r10698 r10707  
    173173    bool tickW(float dt); //!< this is a function that must be called by the weaponManager, or any other weaponHandler, all other functions are handled from within
    174174
    175     virtual void tick(float dt) { tickW(dt); };
     175    virtual void tick(float dt) { WorldEntity::tick(dt); tickW(dt); };
    176176
    177177    bool check() const;
Note: See TracChangeset for help on using the changeset viewer.