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; | ||||
| 	sprint(other, "You get "); | ||||
| 
 | ||||
| 	if(self.items && (other.items & self.items) == 0) { | ||||
| 	if(self.weapon && (other.items & self.weapon) == 0) { | ||||
| 		acount = 1; | ||||
| 		sprint(other, "the "); | ||||
| 		sprint(other, self.netname); | ||||
|  | @ -1301,25 +1301,18 @@ entity() DropBackpack = { | |||
| 	item = spawn(); | ||||
| 	item.origin = self.origin - '0 0 24'; | ||||
| 	item.items = self.weapon | (self.items & (IT_KEY1 | IT_KEY2)); | ||||
| 	item.weapon = self.weapon; | ||||
| 
 | ||||
| 	if(item.items == IT_AXE) { | ||||
| 		item.netname = WEPNAME_AXE; | ||||
| 	} else if(item.items == IT_SHOTGUN) { | ||||
| 		item.netname = WEPNAME_SHOTGUN; | ||||
| 	} else if(item.items == IT_SUPER_SHOTGUN) { | ||||
| 		item.netname = WEPNAME_SUPER_SHOTGUN; | ||||
| 	} else if(item.items == IT_NAILGUN) { | ||||
| 		item.netname = WEPNAME_NAILGUN; | ||||
| 	} else if(item.items == IT_SUPER_NAILGUN) { | ||||
| 		item.netname = WEPNAME_SUPER_NAILGUN; | ||||
| 	} 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 = ""; | ||||
| 	switch(item.weapon) { | ||||
| 		case IT_AXE:              item.netname = WEPNAME_AXE;              break; | ||||
| 		case IT_SHOTGUN:          item.netname = WEPNAME_SHOTGUN;          break; | ||||
| 		case IT_SUPER_SHOTGUN:    item.netname = WEPNAME_SUPER_SHOTGUN;    break; | ||||
| 		case IT_NAILGUN:          item.netname = WEPNAME_NAILGUN;          break; | ||||
| 		case IT_SUPER_NAILGUN:    item.netname = WEPNAME_SUPER_NAILGUN;    break; | ||||
| 		case IT_GRENADE_LAUNCHER: item.netname = WEPNAME_GRENADE_LAUNCHER; break; | ||||
| 		case IT_ROCKET_LAUNCHER:  item.netname = WEPNAME_ROCKET_LAUNCHER;  break; | ||||
| 		case IT_LIGHTNING:        item.netname = WEPNAME_LIGHTNING;        break; | ||||
| 		default:                  item.netname = "";                       break; | ||||
| 	} | ||||
| 
 | ||||
| 	item.ammo_shells  = self.ammo_shells; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user