372 {
373 switch (attachment.Type())
374 {
378 EntityAI ent = GetInventory().FindAttachment(slot);
379 if (ent && ent.IsCookware())
380 {
381 vector direction = ent.GetDirection();
383
385 if (direction[0] < 0)
386 {
387 angle = -angle;
388 }
389
392 GetInventory().DropEntityInBounds(
InventoryMode.SERVER,
this, ent,
"2 0 2", angle, cos, sin);
393 }
394
395 attachment.Delete();
396 break;
397 }
398 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
static const vector Forward
static proto float Acos(float c)
Returns angle in radians from cosinus.
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static proto float Sin(float angle)
Returns sinus of angle in radians.