BGE: Fix for T42341 Sensor.frequency is badly named

"Frequency" parameter is renamed to "Skip" in the LogicBricks sensors as it represents skipped frames between pulses.

Naming something (frequency) the exact opposite of what it represents (period) was the worst choice.

Also, a new BGE python attribute 'skippedTicks' was introduced. 'frequency' attribute is maintained but deprecated.

Internally, freq variable is used yet at DNA_Sensor to maintain compability and to avoid do_versions.

Thanks to Sybren for the investigation.

{F162440}

Reviewers: campbellbarton, sybren, moguri, hg1

Reviewed By: sybren, hg1

Differential Revision: https://developer.blender.org/D1229
This commit is contained in:
Jorge Bernal
2015-04-16 06:31:25 +02:00
parent b466a82fa5
commit 8c98b1649d
8 changed files with 52 additions and 20 deletions

View File

@@ -107,7 +107,7 @@ bool SCA_RandomSensor::Evaluate()
bool evaluateResult = false;
if (++m_interval > m_pulse_frequency) {
if (++m_interval > m_skipped_ticks) {
bool drawResult = false;
m_interval = 0;
if (m_iteration > 31) {