Changeset 7fa452f in network-game for common


Ignore:
Timestamp:
Nov 8, 2014, 1:38:54 AM (10 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
master
Children:
347d768
Parents:
306758e
Message:

Change the player team variable so that 0 means no team, 1 means blue team, and 2 means red team (before, -1 meant no team, 0 meant blue team, and 1 meant red team)

Location:
common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • common/Game.cpp

    r306758e r7fa452f  
    184184         switch (it->type) {
    185185            case OBJECT_BLUE_FLAG:
    186                if (p->team == 1) {
     186               if (p->team == 2) {
    187187                  p->hasBlueFlag = true;
    188188                  itemId = it->id;
     
    190190               break;
    191191            case OBJECT_RED_FLAG:
    192                if (p->team == 0) {
     192               if (p->team == 1) {
    193193                  p->hasRedFlag = true;
    194194                  itemId = it->id;
  • common/Player.cpp

    r306758e r7fa452f  
    3030   this->range = 0;
    3131   this->attackCooldown = 0;
    32    this->team = 0;   // blue team by default
     32   this->team = 0;   // no team by default
    3333   this->hasBlueFlag = false;
    3434   this->hasRedFlag = false;
     
    104104   this->range = 0;
    105105   this->attackCooldown = 0;
    106    this->team = 0;   // blue team by default
     106   this->team = 0;   // no team by default
    107107   this->hasBlueFlag = false;
    108108   this->hasRedFlag = false;
  • common/Player.h

    r306758e r7fa452f  
    8484   int range;
    8585   unsigned long long attackCooldown;
    86    int team; // 0 is blue, 1 is red
     86   int team; // 0 is none, 1 is blue, 2 is red
    8787   bool hasBlueFlag;
    8888   bool hasRedFlag;
Note: See TracChangeset for help on using the changeset viewer.