intensity -= autocvar_g_sandbox_object_material_velocity_min; // start from minimum velocity, not actual velocity
intensity = bound(0, intensity * autocvar_g_sandbox_object_material_velocity_factor, 1);
intensity -= autocvar_g_sandbox_object_material_velocity_min; // start from minimum velocity, not actual velocity
intensity = bound(0, intensity * autocvar_g_sandbox_object_material_velocity_factor, 1);
- sound(self, CH_TRIGGER, strcat("object/impact_", self.material, "_", ftos(ceil(random() * 5)) , ".ogg"), VOL_BASE * intensity, ATTN_NORM);
+ sound(self, CH_TRIGGER, strcat("object/impact_", self.material, "_", ftos(ceil(random() * 5)) , ".wav"), VOL_BASE * intensity, ATTEN_NORM);
pointparticles(particleeffectnum(strcat("impact_", self.material)), self.origin, '0 0 0', ceil(intensity * 10)); // allow a count from 1 to 10
}
pointparticles(particleeffectnum(strcat("impact_", self.material)), self.origin, '0 0 0', ceil(intensity * 10)); // allow a count from 1 to 10
}
return world; // entity is not an object
if(!permissions)
return trace_ent; // don't check permissions, anyone can edit this object
return world; // entity is not an object
if(!permissions)
return trace_ent; // don't check permissions, anyone can edit this object
return trace_ent; // the player who spawned this object did not have an UID, so anyone can edit it
if not(trace_ent.realowner != self && autocvar_g_sandbox_editor_free < 2)
return trace_ent; // object does not belong to the player, and players can only edit their own objects on this server
return trace_ent; // the player who spawned this object did not have an UID, so anyone can edit it
if not(trace_ent.realowner != self && autocvar_g_sandbox_editor_free < 2)
return trace_ent; // object does not belong to the player, and players can only edit their own objects on this server
string sandbox_ObjectPort_Save(entity e, float database)
{
// save object properties, and return them as a string
string sandbox_ObjectPort_Save(entity e, float database)
{
// save object properties, and return them as a string
// separate objects between the ; symbols
n = tokenizebyseparator(s, "; ");
// separate objects between the ; symbols
n = tokenizebyseparator(s, "; ");
{
// since objects are being loaded for the first time, precache material sounds for each
for (i = 1; i <= 5; i++) // 5 sounds in total
{
// since objects are being loaded for the first time, precache material sounds for each
for (i = 1; i <= 5; i++) // 5 sounds in total
- precache_sound(strcat("object/impact_", e.material, "_", ftos(i), ".ogg"));
+ precache_sound(strcat("object/impact_", e.material, "_", ftos(i), ".wav"));
- precache_sound(strcat("object/impact_", argv(3), "_", ftos(i), ".ogg"));
+ precache_sound(strcat("object/impact_", argv(3), "_", ftos(i), ".wav"));
print_to(self, strcat("^2SANDBOX - INFO: ^7Object is owned by \"^7", e.netname, "^7\", created \"^3", e.message, "^7\", last edited \"^3", e.message2, "^7\""));
return TRUE;
case "mesh":
print_to(self, strcat("^2SANDBOX - INFO: ^7Object is owned by \"^7", e.netname, "^7\", created \"^3", e.message, "^7\", last edited \"^3", e.message2, "^7\""));
return TRUE;
case "mesh":
FOR_EACH_TAG(e)
s = strcat(s, "^7\"^5", gettaginfo_name, "^7\", ");
print_to(self, strcat("^2SANDBOX - INFO: ^7Object mesh is \"^3", e.model, "^7\" at animation frame ^3", ftos(e.frame), " ^7containing the following tags: ", s));
return TRUE;
case "attachments":
// this should show the same info as 'mesh' but for attachments
FOR_EACH_TAG(e)
s = strcat(s, "^7\"^5", gettaginfo_name, "^7\", ");
print_to(self, strcat("^2SANDBOX - INFO: ^7Object mesh is \"^3", e.model, "^7\" at animation frame ^3", ftos(e.frame), " ^7containing the following tags: ", s));
return TRUE;
case "attachments":
// this should show the same info as 'mesh' but for attachments