388 {
389 switch (attachment.Type())
390 {
394 EntityAI ent = GetInventory().FindAttachment(slot);
395 if (ent && ent.IsCookware())
396 {
397 vector direction = ent.GetDirection();
399
401 if (direction[0] < 0)
402 {
403 angle = -angle;
404 }
405
408 GetInventory().DropEntityInBounds(
InventoryMode.SERVER,
this, ent,
"2 0 2", angle, cos, sin);
409 }
410
411 attachment.Delete();
412 break;
413 }
414 }
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.