Items now have cooldowns and play anims

Grenades, heal stims, heavy weapons.

Heavy weapons seem to be considered usable items and it calls the heavy
weapon command dependent on the template in template_command_mapping.

You can't fire it from the toolbar due to a checkbox.
This commit is contained in:
Treeku
2014-04-14 11:55:40 +01:00
parent db33827e18
commit db3f0368a0
3 changed files with 63 additions and 11 deletions
@@ -51,7 +51,7 @@ public class TangibleMessageBuilder extends ObjectMessageBuilder {
buffer.put(getUnicodeString(object.getCustomName()));
buffer.putInt(object.getVolume());
buffer.putInt(0);
buffer.putInt(0); // faction vars
buffer.putInt(tangible.getFactionStatus()); // faction vars
if(tangible.getCustomization() == null || tangible.getCustomization().length <= 0)
buffer.putShort((short) 0);
@@ -67,7 +67,7 @@ public class TangibleMessageBuilder extends ObjectMessageBuilder {
if(tangible.getOptionsBitmask() == 0)
tangible.setOptionsBitmask(0x100);
buffer.putInt(tangible.getOptionsBitmask());
buffer.putInt(0); // number of item uses
buffer.putInt(tangible.getUses()); // number of item uses
buffer.putInt(tangible.getConditionDamage());
buffer.putInt(tangible.getMaxDamage());
buffer.put((byte) (tangible.isStaticObject() ? 1 : 0));