X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem%2Fammo.qh;h=e1d493fe975a7c50dfcd11af3d9fba717a67c1da;hb=34e7f534e2015466228eb3a78c9857741b736dca;hp=70c4ef1efad17c8b3348133458dd354299a4ef21;hpb=18727bca9e59c2e1c6ce19a0159accc236f1c594;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index 70c4ef1ef..e1d493fe9 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -1,12 +1,94 @@ -#ifndef AMMO_H -#define AMMO_H +#pragma once + #include "pickup.qh" CLASS(Ammo, Pickup) - ATTRIB(Ammo, m_ammoPic, string, string_null) #ifdef SVQC - ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc) - ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo)) - ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo)) + ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc); + ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo)); + ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo)); #endif ENDCLASS(Ammo) + +#ifdef SVQC + #include +#endif + +#ifdef GAMEQC +MODEL(Bullets_ITEM, Item_Model("a_bullets.mdl")); +#endif + +REGISTER_ITEM(Bullets, Ammo) { +#ifdef GAMEQC + this.m_model = MDL_Bullets_ITEM; +#endif + this.m_name = "bullets"; + this.m_icon = "ammo_bullets"; +#ifdef SVQC + this.m_botvalue = 2000; + this.m_itemid = IT_NAILS; +#endif +} + +#ifdef GAMEQC +MODEL(Cells_ITEM, Item_Model("a_cells.md3")); +#endif + +REGISTER_ITEM(Cells, Ammo) { +#ifdef GAMEQC + this.m_model = MDL_Cells_ITEM; +#endif + this.m_name = "cells"; + this.m_icon = "ammo_cells"; +#ifdef SVQC + this.m_botvalue = 2000; + this.m_itemid = IT_CELLS; +#endif +} + +#ifdef GAMEQC +MODEL(Plasma_ITEM, Item_Model("a_cells.md3")); +#endif + +REGISTER_ITEM(Plasma, Ammo) { +#ifdef GAMEQC + this.m_model = MDL_Plasma_ITEM; +#endif + this.m_name = "plasma"; + this.m_icon = "ammo_plasma"; +#ifdef SVQC + this.m_botvalue = 2000; + this.m_itemid = IT_PLASMA; +#endif +} + +#ifdef GAMEQC +MODEL(Rockets_ITEM, Item_Model("a_rockets.md3")); +#endif + +REGISTER_ITEM(Rockets, Ammo) { +#ifdef GAMEQC + this.m_model = MDL_Rockets_ITEM; +#endif + this.m_name = "rockets"; + this.m_icon = "ammo_rockets"; +#ifdef SVQC + this.m_botvalue = 3000; + this.m_itemid = IT_ROCKETS; +#endif +} + +#ifdef GAMEQC +MODEL(Shells_ITEM, Item_Model("a_shells.md3")); +#endif + +REGISTER_ITEM(Shells, Ammo) { +#ifdef GAMEQC + this.m_model = MDL_Shells_ITEM; +#endif + this.m_name = "shells"; + this.m_icon = "ammo_shells"; +#ifdef SVQC + this.m_botvalue = 500; + this.m_itemid = IT_SHELLS; #endif +}