374 {
375 switch (attachment.Type())
376 {
380 EntityAI ent = GetInventory().FindAttachment(slot);
381 if (ent && ent.IsCookware())
382 {
383 vector direction = ent.GetDirection();
385
387 if (direction[0] < 0)
388 {
389 angle = -angle;
390 }
391
394 GetInventory().DropEntityInBounds(
InventoryMode.SERVER,
this, ent,
"2 0 2", angle, cos, sin);
395 }
396
397 attachment.Delete();
398 break;
399 }
400 }
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.