MCPcopy Create free account
hub / github.com/ddnet/ddnet / PickupType_SixToSeven

Function PickupType_SixToSeven

src/engine/shared/protocolglue.cpp:115–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115int PickupType_SixToSeven(int Type6, int SubType6)
116{
117 switch(Type6)
118 {
119 case POWERUP_WEAPON:
120 switch(SubType6)
121 {
122 case WEAPON_HAMMER: return protocol7::PICKUP_HAMMER;
123 case WEAPON_GUN: return protocol7::PICKUP_GUN;
124 case WEAPON_SHOTGUN: return protocol7::PICKUP_SHOTGUN;
125 case WEAPON_GRENADE: return protocol7::PICKUP_GRENADE;
126 case WEAPON_LASER: return protocol7::PICKUP_LASER;
127 case WEAPON_NINJA: return protocol7::PICKUP_NINJA;
128 default:
129 dbg_assert_failed("invalid subtype %d", SubType6);
130 }
131 case POWERUP_NINJA: return protocol7::PICKUP_NINJA;
132 case POWERUP_HEALTH: return protocol7::PICKUP_HEALTH;
133 case POWERUP_ARMOR:
134 case POWERUP_ARMOR_SHOTGUN:
135 case POWERUP_ARMOR_GRENADE:
136 case POWERUP_ARMOR_NINJA:
137 case POWERUP_ARMOR_LASER:
138 return protocol7::PICKUP_ARMOR;
139 default:
140 dbg_assert_failed("invalid type %d", Type6);
141 }
142}

Callers 1

SnapPickupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected