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