181 int experienceOrbDropCount = (int)MathF.Ceiling(
m_componentCreature.ComponentHealth.AttackResilience / 12f);
182 bool calculateInKill =
true;
186 loader.OnCreatureDied(
this, injury, ref experienceOrbDropCount, ref calculateInKill);
194 Day = m_subsystemTimeOfDay.Day, Location = m_componentCreature.ComponentBody.Position, Cause = CauseOfDeath
199 if (componentPlayer !=
null) {
200 if (calculateInKill) {
217 for (
int i = 0; i < Math.Min(100, experienceOrbDropCount); i++)
220 int dropInWave = experienceOrbDropCount / 100;
221 if (i < experienceOrbDropCount % 100) {
235 for (
int i = 0; i < experienceOrbDropCount; i++) {
263 num = 0.00166666671f;
266 num = 0.00111111114f;
270 num = 0.00111111114f;
284 Air = m_componentCreature.ComponentBody.ImmersionFactor > 0.25f || m_componentCreature.ComponentBody.IsEmbeddedInIce
297 float num2 = 1.1f + 0.1f * (float)Math.Sin(12.0 *
m_subsystemTime.GameTime);
306 "CalculateFallDamage",
308 loader.CalculateFallDamage(
this, ref fallDamage);
312 if (fallDamage > 0f) {
315 m_wasStanding = m_componentCreature.ComponentBody.StandingOnValue.HasValue
316 || m_componentCreature.ComponentBody.StandingOnBody !=
null;
319 && (position.
Y < 0f || position.
Y > 296f)
326 if (num5 &&
Air == 0f) {
360 bool playPainSound =
true;
361 int healthBarFlashCount = Math.Clamp((
int)((0f -
HealthChange) * 30f), 0, 10);
362 if (redScreenFactorCalculated > 0.01f) {
363 redScreenFactorCalculated *= MathF.Pow(0.2f, dt);
366 redScreenFactorCalculated = 0f;
370 creatureModelRedFactorCalculated = 1f;
373 "ChangeVisualEffectOnInjury",
375 loader.ChangeVisualEffectOnInjury(
378 ref redScreenFactorCalculated,
380 ref healthBarFlashCount,
381 ref creatureModelRedFactorCalculated
393 m_componentCreature.ComponentCreatureModel.m_injuryColorFactor = creatureModelRedFactorCalculated;
395 m_componentPlayer.ComponentScreenOverlays.RedoutFactor =
MathUtils.
Max(
401 m_componentPlayer.ComponentGui.HealthBarWidget.Value =
Health;
406 Vector3 position2 = m_componentCreature.ComponentBody.Position
410 bool dropAllItems =
true;
414 loader.DeadBeforeDrops(
this, ref killParticleSystem, ref dropAllItems);
418 if (killParticleSystem !=
null) {
449 FallResilience = valuesDictionary.GetValue<
float>(
"FallResilience");
450 FireResilience = valuesDictionary.GetValue<
float>(
"FireResilience");
451 CorpseDuration = valuesDictionary.GetValue<
float>(
"CorpseDuration");
453 CanStrand = valuesDictionary.GetValue<
bool>(
"CanStrand");
454 Health = valuesDictionary.GetValue<
float>(
"Health");
455 Air = valuesDictionary.GetValue<
float>(
"Air");
456 AirCapacity = valuesDictionary.GetValue<
float>(
"AirCapacity");
457 double value = valuesDictionary.GetValue<
double>(
"DeathTime");
461 HealFactor = valuesDictionary.GetValue<
float>(
"HealFactor");
469 DeathTime = value >= 0.0 ?
new double?(value) :
null;
470 CauseOfDeath = valuesDictionary.GetValue<
string>(
"CauseOfDeath");