fix backpack item logic (separate items and weapons)
This commit is contained in:
		
							parent
							
								
									aa963a319f
								
							
						
					
					
						commit
						cee2b4b67a
					
				| 
						 | 
					@ -1193,7 +1193,7 @@ void() BackpackTouch = {
 | 
				
			||||||
	acount = 0;
 | 
						acount = 0;
 | 
				
			||||||
	sprint(other, "You get ");
 | 
						sprint(other, "You get ");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(self.items && (other.items & self.items) == 0) {
 | 
						if(self.weapon && (other.items & self.weapon) == 0) {
 | 
				
			||||||
		acount = 1;
 | 
							acount = 1;
 | 
				
			||||||
		sprint(other, "the ");
 | 
							sprint(other, "the ");
 | 
				
			||||||
		sprint(other, self.netname);
 | 
							sprint(other, self.netname);
 | 
				
			||||||
| 
						 | 
					@ -1301,25 +1301,18 @@ entity() DropBackpack = {
 | 
				
			||||||
	item = spawn();
 | 
						item = spawn();
 | 
				
			||||||
	item.origin = self.origin - '0 0 24';
 | 
						item.origin = self.origin - '0 0 24';
 | 
				
			||||||
	item.items = self.weapon | (self.items & (IT_KEY1 | IT_KEY2));
 | 
						item.items = self.weapon | (self.items & (IT_KEY1 | IT_KEY2));
 | 
				
			||||||
 | 
						item.weapon = self.weapon;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(item.items == IT_AXE) {
 | 
						switch(item.weapon) {
 | 
				
			||||||
		item.netname = WEPNAME_AXE;
 | 
							case IT_AXE:              item.netname = WEPNAME_AXE;              break;
 | 
				
			||||||
	} else if(item.items == IT_SHOTGUN) {
 | 
							case IT_SHOTGUN:          item.netname = WEPNAME_SHOTGUN;          break;
 | 
				
			||||||
		item.netname = WEPNAME_SHOTGUN;
 | 
							case IT_SUPER_SHOTGUN:    item.netname = WEPNAME_SUPER_SHOTGUN;    break;
 | 
				
			||||||
	} else if(item.items == IT_SUPER_SHOTGUN) {
 | 
							case IT_NAILGUN:          item.netname = WEPNAME_NAILGUN;          break;
 | 
				
			||||||
		item.netname = WEPNAME_SUPER_SHOTGUN;
 | 
							case IT_SUPER_NAILGUN:    item.netname = WEPNAME_SUPER_NAILGUN;    break;
 | 
				
			||||||
	} else if(item.items == IT_NAILGUN) {
 | 
							case IT_GRENADE_LAUNCHER: item.netname = WEPNAME_GRENADE_LAUNCHER; break;
 | 
				
			||||||
		item.netname = WEPNAME_NAILGUN;
 | 
							case IT_ROCKET_LAUNCHER:  item.netname = WEPNAME_ROCKET_LAUNCHER;  break;
 | 
				
			||||||
	} else if(item.items == IT_SUPER_NAILGUN) {
 | 
							case IT_LIGHTNING:        item.netname = WEPNAME_LIGHTNING;        break;
 | 
				
			||||||
		item.netname = WEPNAME_SUPER_NAILGUN;
 | 
							default:                  item.netname = "";                       break;
 | 
				
			||||||
	} else if(item.items == IT_GRENADE_LAUNCHER) {
 | 
					 | 
				
			||||||
		item.netname = WEPNAME_GRENADE_LAUNCHER;
 | 
					 | 
				
			||||||
	} else if(item.items == IT_ROCKET_LAUNCHER) {
 | 
					 | 
				
			||||||
		item.netname = WEPNAME_ROCKET_LAUNCHER;
 | 
					 | 
				
			||||||
	} else if(item.items == IT_LIGHTNING) {
 | 
					 | 
				
			||||||
		item.netname = WEPNAME_LIGHTNING;
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		item.netname = "";
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	item.ammo_shells  = self.ammo_shells;
 | 
						item.ammo_shells  = self.ammo_shells;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user