MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ItemObject

Method ItemObject

Source/Objects/itemobject.cpp:268–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268ItemObject::ItemObject() : thrown_(kSafe),
269 active_time_(0.0f),
270 sun_ray_clear_(-1.0f),
271 new_clear_(0.0f),
272 shadow_group_id_(-1),
273 whoosh_sound_handle_(0),
274 impact_sound_delay_(0.0f),
275 whoosh_sound_delay_(0.0f),
276 whoosh_volume_(0.0f),
277 whoosh_pitch_(0.0f),
278 using_physics_(true),
279 bullet_object_(NULL),
280 interp_count_(1),
281 interp_period_(1),
282 stuck_in_environment_(false),
283 sticking_collision_occured_(false),
284 flare_(NULL),
285 flashing_(false),
286 flash_delay_(0.0f),
287 last_held_char_id_(-1),
288 char_impact_delay_(0.0f),
289 blood_surface_getter_(this),
290 blood_surface_(&blood_surface_getter_),
291 abstract_bullet_object_(NULL) {
292 permission_flags &= ~Object::CAN_SCALE;
293
294 batch_.gl_state.depth_test = true;
295 batch_.gl_state.cull_face = true;
296 batch_.gl_state.depth_write = true;
297 batch_.gl_state.blend = false;
298
299 depth_batch_.gl_state = batch_.gl_state;
300
301 batch_.AddUniformFloat("fade", 0.0f);
302
303 batch_.use_cam_pos = true;
304 batch_.use_light = true;
305
306 Textures* ti = Textures::Instance();
307
308 batch_.texture_ref[4] = ti->GetBlankTextureRef();
309 batch_.texture_ref[5] = ti->GetBlankTextureRef();
310
311 texture_spatterdecal_ = Engine::Instance()->GetAssetManager()->LoadSync<TextureAsset>("Data/Textures/spatterdecal.tga");
312}
313
314ItemObject::~ItemObject() {
315 InvalidateReaders();

Callers

nothing calls this directly

Calls 3

AddUniformFloatMethod · 0.80
GetBlankTextureRefMethod · 0.80
GetAssetManagerMethod · 0.80

Tested by

no test coverage detected