Annotation of quake2/game/vwep.diff, revision 1.1

1.1     ! root        1: --- h:\quake2\code\game\p_weapon.c     Wed Apr 01 15:57:17 1998
        !             2: +++ p_weapon.c Wed Apr 01 14:43:35 1998
        !             3: @@ -152,6 +152,34 @@
        !             4:  current
        !             5:  ===============
        !             6:  */
        !             7: +
        !             8: +// ### Hentai ### BEGIN
        !             9: +void ShowGun(edict_t *ent)
        !            10: +{
        !            11: +      char heldmodel[128];
        !            12: +      int len;
        !            13: +
        !            14: +      if(ent->s.modelindex != 255 || ent->deadflag || !ent->client->pers.weapon)
        !            15: +      {
        !            16: +              ent->s.modelindex2 = 0;
        !            17: +              return;
        !            18: +      }
        !            19: +
        !            20: +      strcpy(heldmodel, "players/");
        !            21: +      strcat(heldmodel, Info_ValueForKey (ent->client->pers.userinfo, "skin"));
        !            22: +      for(len = 8; heldmodel[len]; len++)
        !            23: +      {
        !            24: +              if(heldmodel[len] == '/')
        !            25: +                      heldmodel[++len] = '\0';
        !            26: +      }
        !            27: +      strcat(heldmodel, ent->client->pers.weapon->icon);      
        !            28: +      strcat(heldmodel, ".md2");
        !            29: +      //gi.dprintf ("%s\n", heldmodel);
        !            30: +      ent->s.modelindex2 = gi.modelindex(heldmodel);  // Hentai's custom gun models
        !            31: +
        !            32: +}
        !            33: +// ### Hentai ### END
        !            34: +
        !            35:  void ChangeWeapon (edict_t *ent)
        !            36:  {
        !            37:        if (ent->client->grenade_time)
        !            38: @@ -167,9 +195,6 @@
        !            39:        ent->client->newweapon = NULL;
        !            40:        ent->client->machinegun_shots = 0;
        !            41:  
        !            42: -      // set visible model
        !            43: -      ent->s.skinnum = (ent - g_edicts - 1) || ((ent->client->pers.weapon->weapmodel & 0xff) << 8);
        !            44: -
        !            45:        if (ent->client->pers.weapon && ent->client->pers.weapon->ammo)
        !            46:                ent->client->ammo_index = ITEM_INDEX(FindItem(ent->client->pers.weapon->ammo));
        !            47:        else
        !            48: @@ -185,6 +210,7 @@
        !            49:        ent->client->ps.gunframe = 0;
        !            50:        ent->client->ps.gunindex = gi.modelindex(ent->client->pers.weapon->view_model);
        !            51:  
        !            52: +      // ### Hentai ### BEGIN
        !            53:        ent->client->anim_priority = ANIM_PAIN;
        !            54:        if(ent->client->ps.pmove.pm_flags & PMF_DUCKED)
        !            55:        {
        !            56: @@ -197,6 +223,10 @@
        !            57:                        ent->client->anim_end = FRAME_pain304;
        !            58:                        
        !            59:        }
        !            60: +      
        !            61: +      ShowGun(ent);   
        !            62: +
        !            63: +      // ### Hentai ### END
        !            64:  }
        !            65:  
        !            66:  /*
        !            67: @@ -354,11 +384,12 @@
        !            68:  {
        !            69:        int             n;
        !            70:  
        !            71: +      // ### Hentai ### BEGIN
        !            72:        if(ent->deadflag || ent->s.modelindex != 255) // VWep animations screw up corpses
        !            73:        {
        !            74:                return;
        !            75:        }
        !            76: -
        !            77: +      // ### Hentai ### END 
        !            78:        if (ent->client->weaponstate == WEAPON_DROPPING)
        !            79:        {
        !            80:                if (ent->client->ps.gunframe == FRAME_DEACTIVATE_LAST)
        !            81: @@ -366,7 +397,9 @@
        !            82:                        ChangeWeapon (ent);
        !            83:                        return;
        !            84:                }
        !            85: -              else if ((FRAME_DEACTIVATE_LAST - ent->client->ps.gunframe) == 4)
        !            86: +
        !            87: +                      // ### Hentai ### BEGIN
        !            88: +              else if((FRAME_DEACTIVATE_LAST - ent->client->ps.gunframe) == 4)
        !            89:                {
        !            90:                        ent->client->anim_priority = ANIM_REVERSE;
        !            91:                        if(ent->client->ps.pmove.pm_flags & PMF_DUCKED)
        !            92: @@ -381,6 +414,8 @@
        !            93:                                
        !            94:                        }
        !            95:                }
        !            96: +              // ### Hentai ### END
        !            97: +
        !            98:  
        !            99:                ent->client->ps.gunframe++;
        !           100:                return;
        !           101: @@ -403,8 +438,8 @@
        !           102:        {
        !           103:                ent->client->weaponstate = WEAPON_DROPPING;
        !           104:                ent->client->ps.gunframe = FRAME_DEACTIVATE_FIRST;
        !           105: -
        !           106: -              if ((FRAME_DEACTIVATE_LAST - FRAME_DEACTIVATE_FIRST) < 4)
        !           107: +                              // ### Hentai ### BEGIN
        !           108: +              if((FRAME_DEACTIVATE_LAST - FRAME_DEACTIVATE_FIRST) < 4)
        !           109:                {
        !           110:                        ent->client->anim_priority = ANIM_REVERSE;
        !           111:                        if(ent->client->ps.pmove.pm_flags & PMF_DUCKED)
        !           112: @@ -419,6 +454,7 @@
        !           113:                                
        !           114:                        }
        !           115:                }
        !           116: +              // ### Hentai ### END
        !           117:                return;
        !           118:        }
        !           119:  
        !           120: @@ -538,11 +574,7 @@
        !           121:        speed = GRENADE_MINSPEED + (GRENADE_TIMER - timer) * ((GRENADE_MAXSPEED - GRENADE_MINSPEED) / GRENADE_TIMER);
        !           122:        fire_grenade2 (ent, start, forward, damage, speed, timer, radius, held);
        !           123:  
        !           124: -      if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           125: -              ent->client->pers.inventory[ent->client->ammo_index]--;
        !           126: -
        !           127: -      ent->client->grenade_time = level.time + 1.0;
        !           128: -
        !           129: +      // ### Hentai ### BEGIN
        !           130:        if(ent->deadflag || ent->s.modelindex != 255) // VWep animations screw up corpses
        !           131:        {
        !           132:                return;
        !           133: @@ -560,6 +592,13 @@
        !           134:                ent->s.frame = FRAME_wave08;
        !           135:                ent->client->anim_end = FRAME_wave01;
        !           136:        }
        !           137: +      // ### Hentai ### END
        !           138: +
        !           139: +
        !           140: +      if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           141: +              ent->client->pers.inventory[ent->client->ammo_index]--;
        !           142: +
        !           143: +      ent->client->grenade_time = level.time + 1.0;
        !           144:  }
        !           145:  
        !           146:  void Weapon_Grenade (edict_t *ent)
        !           147: @@ -875,8 +914,8 @@
        !           148:                        else
        !           149:                                damage = 20;
        !           150:                        Blaster_Fire (ent, offset, damage, true, effect);
        !           151: -                      if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           152: -                              ent->client->pers.inventory[ent->client->ammo_index]--;
        !           153: +                      
        !           154: +                      // ### Hentai ### BEGIN
        !           155:  
        !           156:                        ent->client->anim_priority = ANIM_ATTACK;
        !           157:                        if (ent->client->ps.pmove.pm_flags & PMF_DUCKED)
        !           158: @@ -889,6 +928,12 @@
        !           159:                                ent->s.frame = FRAME_attack1 - 1;
        !           160:                                ent->client->anim_end = FRAME_attack8;
        !           161:                        }
        !           162: +      
        !           163: +                      // ### Hentai ### END
        !           164: +
        !           165: +
        !           166: +                      if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           167: +                              ent->client->pers.inventory[ent->client->ammo_index]--;
        !           168:                }
        !           169:  
        !           170:                ent->client->ps.gunframe++;
        !           171: @@ -990,8 +1035,7 @@
        !           172:  
        !           173:        PlayerNoise(ent, start, PNOISE_WEAPON);
        !           174:  
        !           175: -      if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           176: -              ent->client->pers.inventory[ent->client->ammo_index]--;
        !           177: +      // ### Hentai ### BEGIN
        !           178:  
        !           179:        ent->client->anim_priority = ANIM_ATTACK;
        !           180:        if (ent->client->ps.pmove.pm_flags & PMF_DUCKED)
        !           181: @@ -1004,6 +1048,12 @@
        !           182:                ent->s.frame = FRAME_attack1 - (int) (random()+0.25);
        !           183:                ent->client->anim_end = FRAME_attack8;
        !           184:        }
        !           185: +
        !           186: +      // ### Hentai ### END
        !           187: +
        !           188: +
        !           189: +      if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           190: +              ent->client->pers.inventory[ent->client->ammo_index]--;
        !           191:  }
        !           192:  
        !           193:  void Weapon_Machinegun (edict_t *ent)
        !           194: @@ -1059,6 +1109,8 @@
        !           195:                ent->client->weapon_sound = gi.soundindex("weapons/chngnl1a.wav");
        !           196:        }
        !           197:  
        !           198: +      // ### Hentai ### BEGIN
        !           199: +
        !           200:        ent->client->anim_priority = ANIM_ATTACK;
        !           201:        if (ent->client->ps.pmove.pm_flags & PMF_DUCKED)
        !           202:        {
        !           203: @@ -1071,6 +1123,10 @@
        !           204:                ent->client->anim_end = FRAME_attack8;
        !           205:        }
        !           206:  
        !           207: +
        !           208: +      // ### Hentai ### END
        !           209: +
        !           210: +
        !           211:        if (ent->client->ps.gunframe <= 9)
        !           212:                shots = 1;
        !           213:        else if (ent->client->ps.gunframe <= 14)
        !           214: @@ -1129,6 +1185,7 @@
        !           215:  
        !           216:        PlayerNoise(ent, start, PNOISE_WEAPON);
        !           217:  
        !           218: +      
        !           219:        if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
        !           220:                ent->client->pers.inventory[ent->client->ammo_index] -= shots;
        !           221:  }
        !           222: --- h:\quake2\code\game\p_view.c       Fri Feb 27 10:09:55 1998
        !           223: +++ p_view.c   Sun Mar 08 18:17:03 1998
        !           224: @@ -860,7 +860,16 @@
        !           225:        if (!ent->groundentity && client->anim_priority <= ANIM_WAVE)
        !           226:                goto newanim;
        !           227:  
        !           228: -      if (ent->s.frame < client->anim_end)
        !           229: +      // ### Hentai ### BEGIN
        !           230: +      if(client->anim_priority == ANIM_REVERSE)
        !           231: +      {
        !           232: +              if(ent->s.frame > client->anim_end)
        !           233: +              {
        !           234: +                      ent->s.frame--;
        !           235: +                      return;
        !           236: +              }
        !           237: +      }
        !           238: +      else if (ent->s.frame < client->anim_end) // ### Hentai ### END
        !           239:        {       // continue an animation
        !           240:                ent->s.frame++;
        !           241:                return;
        !           242: --- h:\quake2\code\game\p_client.c     Wed Apr 01 15:49:55 1998
        !           243: +++ p_client.c Sun Mar 08 18:27:09 1998
        !           244: @@ -956,6 +956,10 @@
        !           245:  a deathmatch.
        !           246:  ============
        !           247:  */
        !           248: +// ### Hentai ### BEGIN
        !           249: +void ShowGun(edict_t *ent);
        !           250: +// ###        Hentai ### END
        !           251: +
        !           252:  void PutClientInServer (edict_t *ent)
        !           253:  {
        !           254:        vec3_t  mins = {-16, -16, -24};
        !           255: @@ -1068,12 +1072,9 @@
        !           256:  
        !           257:        // clear entity state values
        !           258:        ent->s.effects = 0;
        !           259: -      ent->s.modelindex = 255;                // will use the skin specified model
        !           260: -      ent->s.modelindex2 = 255;               // custom gun model
        !           261: -      // sknum is player num and weapon number
        !           262: -      // weapon number will be added in changeweapon
        !           263:        ent->s.skinnum = ent - g_edicts - 1;
        !           264: -
        !           265: +      ent->s.modelindex = 255;                // will use the skin specified model
        !           266: +      ShowGun(ent);                                   // ### Hentai ### special gun model
        !           267:        ent->s.frame = 0;
        !           268:        VectorCopy (spawn_origin, ent->s.origin);
        !           269:        ent->s.origin[2] += 1;  // make sure off ground
        !           270: @@ -1250,6 +1251,7 @@
        !           271:  
        !           272:        // save off the userinfo in case we want to check something later
        !           273:        strncpy (ent->client->pers.userinfo, userinfo, sizeof(ent->client->pers.userinfo)-1);
        !           274: +      ShowGun(ent);
        !           275:  }
        !           276:  
        !           277:  
        !           278: --- h:\quake2\code\game\g_local.h      Wed Apr 01 15:57:37 1998
        !           279: +++ g_local.h  Wed Mar 25 13:32:45 1998
        !           280: @@ -9,7 +9,7 @@
        !           281:  #include "game.h"
        !           282:  
        !           283:  // the "gameversion" client command will print this plus compile date
        !           284: -#define       GAMEVERSION     "baseq2"
        !           285: +#define       GAMEVERSION     "VWep 3.14v4"
        !           286:  
        !           287:  // protocol bytes that can be directly added to messages
        !           288:  #define       svc_muzzleflash         1
        !           289: @@ -198,19 +198,6 @@
        !           290:  #define IT_KEY                        16
        !           291:  #define IT_POWERUP            32
        !           292:  
        !           293: -// gitem_t->weapmodel for weapons indicates model index
        !           294: -#define WEAP_BLASTER                  1 
        !           295: -#define WEAP_SHOTGUN                  2 
        !           296: -#define WEAP_SUPERSHOTGUN             3 
        !           297: -#define WEAP_MACHINEGUN                       4 
        !           298: -#define WEAP_CHAINGUN                 5 
        !           299: -#define WEAP_GRENADES                 6 
        !           300: -#define WEAP_GRENADELAUNCHER  7 
        !           301: -#define WEAP_ROCKETLAUNCHER           8 
        !           302: -#define WEAP_HYPERBLASTER             9 
        !           303: -#define WEAP_RAILGUN                  10
        !           304: -#define WEAP_BFG                              11
        !           305: -
        !           306:  typedef struct gitem_s
        !           307:  {
        !           308:        char            *classname;     // spawning name
        !           309: @@ -232,8 +219,6 @@
        !           310:        char            *ammo;                  // for weapons
        !           311:        int                     flags;                  // IT_* flags
        !           312:  
        !           313: -      int                     weapmodel;              // weapon model index (for weapons)
        !           314: -
        !           315:        void            *info;
        !           316:        int                     tag;
        !           317:  
        !           318: @@ -537,7 +522,6 @@
        !           319:  // and saving / loading games
        !           320:  //
        !           321:  #define FFL_SPAWNTEMP         1
        !           322: -#define FFL_NOSPAWN                   2
        !           323:  
        !           324:  typedef enum {
        !           325:        F_INT, 
        !           326: @@ -549,8 +533,6 @@
        !           327:        F_EDICT,                        // index on disk, pointer in memory
        !           328:        F_ITEM,                         // index on disk, pointer in memory
        !           329:        F_CLIENT,                       // index on disk, pointer in memory
        !           330: -      F_FUNCTION,
        !           331: -      F_MMOVE,
        !           332:        F_IGNORE
        !           333:  } fieldtype_t;
        !           334:  
        !           335: @@ -785,8 +767,10 @@
        !           336:  #define       ANIM_PAIN               3
        !           337:  #define       ANIM_ATTACK             4
        !           338:  #define       ANIM_DEATH              5
        !           339: -#define       ANIM_REVERSE    6
        !           340:  
        !           341: +// ### Hentai ### BEGIN
        !           342: +#define ANIM_REVERSE  6
        !           343: +// ### Hentai ### END
        !           344:  
        !           345:  // client data that stays across multiple level loads
        !           346:  typedef struct

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.